title: radare2 categories: [cheatsheets]
1) Renaming Variables
r2> afvn [old_name] [new_name]
2) Print out variable
r2> .afvd [variable_name]
Find the Addr of a Libraryr and symbol
r2> dm // Show loaded Libarys
r2> dmi [library]~symbol // show symbols for lib and grep for symbol name
sh> ragg2 -P 100 -r
// & to then get the Offset
r2> wopO esp
create a rarun script: runprofile.rr2
#!/usr/bin/rarun2
program=./a.out
arg1=AAAA
arg2=!python exploit.py
stdio=/dev/pty/1 // use another tty as stdio (tty to get terminal name + let the terminal sleep with sleep 9999999)
To use this script in radare:
r2> e dbg.profile=runprofile.rr2