1

I need to write a script that uses the r2pipe API to call the radare2 instance, analyze notepad.exe, and have it return a JSON-represented list of each function in the binary along with its virtual address. I used the link below for help, but I still can't figure out how to do it. I have installed r2pipe bindings and radare2. My python file looks somewhat like this,

import r2pipe
import json

r2 = r2pipe.open("/bin/ls")
x=(r2.cmd("pd 10"))
json.dumps(x)

Links i used to understand,

https://github.com/radare/radare2/wiki/R2PipeAPI

https://github.com/pwntester/cheatsheets/blob/master/radare2.md

  • Use cmdj not cmd and a command like pdj and you'll be good to go. – Maijin Jul 7 '16 at 14:23

Browse other questions tagged or ask your own question.