Skip to content

Instantly share code, notes, and snippets.

@radare
radare / assnam.py
Created October 23, 2019 09:57
radare2 script to autoname functions by taking it from the assert calls
#!/usr/bin/env python3
import r2pipe
r2 = r2pipe.open()
a = r2.cmd('ii~__assert_rtn[1]').strip()
if not a:
print('[assnam] Cannot find assert_rtn import')
exit(1)
if int(r2.cmd('aflc')) == 0: