Skip to content

Instantly share code, notes, and snippets.

@XMPPwocky
Last active October 9, 2016 21:00
Show Gist options
  • Save XMPPwocky/35f3010a56d72124a5d5176f07ca7b55 to your computer and use it in GitHub Desktop.
Save XMPPwocky/35f3010a56d72124a5d5176f07ca7b55 to your computer and use it in GitHub Desktop.
# useful sigs: 558bec, 56578bf9
def auto_discover_functions(funcsig="\x55\x8b\xec"): # push ebp; mov ebp, esp
last_match = bv.start
while True:
match = bv.find_next_data(last_match, funcsig)
if match is None: break
if bv.is_offset_executable(match):
if bv.get_function_at(bv.platform, match) is None:
bv.add_function(bv.platform, match)
last_match = match + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment