75 Commits
Author SHA1 Message Date
Anton Kochkov 072737b7fb Update to the latest Rizin API (#4) 2022-05-25 16:00:28 +08:00
Riccardo Schirone e1518e3803 Fix 'core' not found while loading lang_python 2022-02-16 16:23:06 +01:00
Aswin C 36c04f3333 Add and run clang-format 2021-07-10 16:23:57 +05:30
Aswin C 1b53743036 Fix compiler warnings and update to Rizin
* Remove `python/core.c`, a reference of `Rizin_plugin_core` from `python.c`
and fix the CI
2021-07-10 16:23:57 +05:30
pancake a9888b1da5 Fix all warnings in rlang-python 2021-07-07 10:30:03 +05:30
Anton Kochkov 6ebd999e01 Rename r2 to rizin 2020-12-11 14:08:34 +08:00
pancake 7e45856a29 Import csharp, lua, perl, python, ruby, tcc and vlang plugins 2020-10-13 13:54:29 +02:00
pancake 880d917849 Move duktape into a directory and add configure workflow 2020-10-13 13:13:13 +02:00
pancake 15465a9f58 Move python plugin out of the root directory 2020-10-13 13:00:35 +02:00
Anton Kochkov f81122ef99 Fix build with the latest r2 API 2020-08-09 16:53:39 +08:00
Riccardo Schirone f78735bc6b Not all systems have the right libraries in <prefix>/lib (#17)
* Not all systems have the right libraries in `<prefix>/lib`

Some use /usr/lib64 and providing -L/usr/lib would confuse the linker.

* Avoid compiler errors on some compilers because of multiple definitions
2020-08-09 16:53:39 +08:00
Anton Kochkov 8088d98e6b Fix compilation warning 2020-08-09 16:53:39 +08:00
Vasilij Schneidermann de796cecf0 Introduce endianness PyEnums (#13) 2020-08-09 16:53:39 +08:00
Lev Aronsky 2ad3672ac8 Use the mnemonic field in RAnalOp to avoid warnings in r2 (#11) 2020-08-09 16:53:39 +08:00
Anton Kochkov d8107dddaf Remove check_bytes, use check_buffer 2020-08-09 16:53:39 +08:00
Anton Kochkov 32f5b382b3 Cleanup before repository extraction 2020-08-09 16:53:39 +08:00
Lev Aronsky ca154e9f2c Check bytes to check buffer (#223)
* Remove deprecated function
* Change check_bytes to check_buffer
2019-11-05 00:31:06 -06:00
ckanibal ce56de3156 lang-python: set operation delay slots from plugin 2019-06-12 12:25:24 +02:00
ckanibal e302d1c52e lang-python: set architecture endianess from plugin 2019-06-12 12:25:24 +02:00
ckanibal 86c388fcdd Update python-bindings to be compatible with new RBinPlugin api (#220)
* Update python-bindings to be compatible with new RBinPlugin api (see radare/radare2#1aa0571)
* Follow coding guidelines more strictly.
* More refactoring to support RBinPlugin changes.
2019-06-07 18:42:41 +02:00
Lev Aronsky ccfb139f33 Pass current PC to assemble. Required for (#219)
assembling instructions encoded with relative
addresses, but written with absolute addresses.
2019-04-14 17:37:54 +02:00
Lev Aronsky a6a1f8df3e Switch python bin plugin to memoryview (#217) 2019-04-14 13:54:16 +02:00
Anton Kochkov 3f9d89f44a Fix r2lang python build 2019-03-29 14:16:42 +08:00
pancake f7c4496a68 Fix python build 2019-03-28 23:01:15 +01:00
Lev Aronsky 3d53c34dc8 Tidy up python.c (#215)
* Removed inclusion of C files from python.c,
using headers and proper compilation instead.
2019-03-14 20:54:16 +08:00
Lev Aronsky 885a3a9043 Removed unnecessary defines (that were used to
unify between Python 2 and 3)
2019-03-13 23:03:45 +08:00
Lev Aronsky db7cab8067 Drop Python2 support 2019-03-13 23:03:45 +08:00
Lev Aronsky f5418645ae Added explicit casting of buf to void *, to avoid
compiler warning.
2019-03-12 02:31:13 +08:00
Lev Aronsky ce0faee5cf Use PyMemoryView_FromBuffer 2019-03-12 02:31:13 +08:00
Lev Aronsky 117ccb0724 Decrease reference counters correctly in py_anal 2019-03-12 02:31:13 +08:00
Lev Aronsky b827d8d0d4 Use MemoryView and Py_buffer when passing
data to Python's disassembly and analysis functions
2019-03-12 02:31:13 +08:00
ckanibal e12b721cd7 python-bindings: Fix parameters for analysis-operation. (#209) 2019-03-06 10:11:42 +01:00
Lev Aronsky 43e6f57203 Fix use-after-free bug in py_disassemble (#212)
* Fix use-after-free bug in py_disassemble

`opstr` points to a string under Python control, which can
be released before its value is copied into `op->buf_asm`.
The fix copies the value immediately, before decrementing
Python's ref counter.

* Forgot to remove the old `r_strbuf_set`, and actually set the default
value to "invalid"

* Init RAsmOp in the beginning of the function (prior to accessing it).
2019-03-06 10:11:05 +01:00
Lev Aronsky 453797abb9 Add support for archinfo callbacks in Python (#211) 2019-03-01 11:42:18 +01:00
Florian Märkl 42990b236e Minor Fixes for Python r2lang asm (#210) 2019-02-18 21:56:34 +01:00
pancake 61eb1cf686 Fix refleaks in r2lang.python.io 2019-01-22 11:13:13 +01:00
pancake 3110468dc0 r2lang.python.io.read supports string and bytearray now 2019-01-22 00:46:54 +01:00
pancake 5f1ac0955c Fix uaf in py-lang-disasm 2019-01-18 01:30:59 +01:00
pancake b1f013491b Fix crash in lang/python 2019-01-18 00:42:46 +01:00
pancake 9b5f37d125 Use RAsmOp.setbuf() 2019-01-16 10:39:05 +01:00
pancake 02d4222659 Fix segflute 2019-01-13 13:35:04 +01:00
pancake cf8e81e436 Fix segfault in disasm 2019-01-13 13:11:49 +01:00
pancake b911ff3efb Fix null deref 2019-01-11 20:20:14 +01:00
pancake 5b35317b04 Expose offset in disasm pylang callback 2019-01-11 14:50:45 +01:00
pancake 53a3d06de3 More fixes for py3 2019-01-11 14:05:21 +01:00
pancake 071aa4ea6c Fix possible null deref in py-anal 2019-01-11 13:00:27 +01:00
pancake d134fa62b2 Fixes for lang-python{2,3} 2019-01-11 12:30:20 +01:00
rfc2119 08a356d7a3 fix lang-python2: remove R_NOTNULL and rename srwx to perm (see #11601, #11679 in r2) (#199) 2018-11-10 11:00:11 +01:00
Guillaume Valadon 962d563f2b Fix Python IO plugin (#194) 2018-09-05 19:31:09 +02:00
Guillaume Valadon 94e5dd655d User r_strbuf_get() (#193) 2018-09-04 01:50:03 +02:00