mirror of
https://github.com/radareorg/radare2-r2pipe.git
synced 2026-11-08 09:39:32 -10:00
24 lines
407 B
Python
24 lines
407 B
Python
import r2pipe
|
|
|
|
r2 = r2pipe.open("-")
|
|
r2.cmd("aa")
|
|
hello = r2.cmd("?e hello").strip()
|
|
if hello != "hello":
|
|
exit(1)
|
|
print(hello)
|
|
world = r2.cmd("?e world").strip()
|
|
if world != "world":
|
|
exit(1)
|
|
print(world)
|
|
r2.quit()
|
|
|
|
r2 = r2pipe.open("-")
|
|
hello = r2.cmd("?e hello").strip()
|
|
if hello != "hello":
|
|
exit(1)
|
|
print(hello)
|
|
world = r2.cmd("?e world").strip()
|
|
if world != "world":
|
|
exit(1)
|
|
print(world)
|