Yet anohter radare2 python bindings.
Project description
pyr2
Yet another radare2 python bindings.
Install
pip3 install pyr2
No need to install radare2 since all dynamic libraries are bundled with the Python wheels.
Example
from r2 import libr
r2c = libr.r_core_new()
libr.r_core_init(r2c)
fh = libr.r_core_file_open(r2c, ctypes.create_string_buffer(b"/bin/ls"), 0b101, 0)
libr.r_core_bin_load(r2c, ctypes.create_string_buffer(b"/bin/ls"), (1<<64) - 1)
libr.r_core_cmd_str(r2c, ctypes.create_string_buffer(b"ieq"))
libr.r_core_cmd_str(r2c, ctypes.create_string_buffer(b"aaa"))
print(ctypes.string_at(libr.r_core_cmd_str(r2c, ctypes.create_string_buffer(b"pdj"))))
libr.r_core_file_close(r2c, fh)
libr
is the core library of radare2 which implements all low-level APIs. Note that it's exported as a bare ctypes library, be cautious with c-style strings.
Build Instructions
Clone the repository and submodules.
git clone https://github.com/wtdcode/pyr2
cd pyr2
git submodule update --init --recursive
Since radare2 chooses meson
as their alternative building system, the first step is install meson
.
pip3 install meson
Build the package.
python3 setup.py build
Install and use.
# Or pip3 install -e .
pip3 install .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for pyr2-1.1.1-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4fe6d00e18eca6f1261712e07f641acab83c44ed8724c6b603e4f28e2e2ccd |
|
MD5 | e722056144c61d93a2a236c591f65524 |
|
BLAKE2b-256 | b4f8a47131a17379016e519482b44afcb2b2321dd7aae74ee94dc87a63885d95 |
Close
Hashes for pyr2-1.1.1-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654607f55a614f34a9cfe2be72b52cc747852b77e19f25cccd09261b35697a1a |
|
MD5 | 283d209cffe8bc6296adbb85b3a6c744 |
|
BLAKE2b-256 | 6895be632039db7817ecd6bc5f08e312614fcdc8791a1e1ab59e58439cb1cff9 |
Close
Hashes for pyr2-1.1.1-py3-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d425496da892f252683dd3517fd0296fb0dc52c261229df0ae439d9b7470ae3e |
|
MD5 | 01304ce3e6db1a6a57a4b802cfb1885f |
|
BLAKE2b-256 | 633903ed48c1269e71309331b63f72078ef6a7a7c5a951055fff840d8152399f |