Files
pancake 6145ad5fd7 Improve command error reporting in r2pipe.cmd2 paths
- R2CommandError now carries the command output and formatted logs
- _exec raises only on real radare2 command errors, not on soft ERROR logs
- curr_seek_addr uses cmd2 directly and clears the temporary seek
- Add tests for _exec raising and _exec_quiet swallowing parse errors
2026-08-28 17:20:09 +02:00
..
2025-10-14 06:29:40 +05:30
2025-10-09 23:04:06 +02:00
2026-08-28 15:40:25 +02:00
2024-01-10 17:20:33 +01:00

R2Papi for Python

This is PoC of the future autogenerated API bindings for r2pipe.

Usage example

We need to have a common API definition for all languages across r2pipe.

import r2pipe
from r2papi import R2Api

r = R2Api (r2pipe.open("/bin/ls"))
if r.info().stripped:
	print "This binary is stripped"

r.searchIn('io.sections.exec')
r.analyzeCalls()
print r.at('entry0').hexdump(16)
print r.at('sym.imp.setenv').hexdump(16)

print r.at('entry0').disasm(10)

r.seek('entry0');
r.analyzeFunction()
print r.disasmFunction()
for fcn in r.functions():
	print fcn.name

r[0:10]
# '\x7fELF\x02\x01\x01\x00\x00\x00'

r[1]
# 'E'

r.quit()