Created
May 1, 2020 07:32
-
-
Save Nukem9/0276f7c7c874a1c8d07a13316124177e to your computer and use it in GitHub Desktop.
Random IDA Pro python scripts I've made
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Export all functions to an array in a header file | |
# | |
ftable = open(idc.AskFile(1, "func_list.h", "Save output file"), "w") | |
ftable.write("struct FunctionEntry\n{\n") | |
ftable.write("\tuintptr_t StartAddr;\n") | |
ftable.write("\tuintptr_t EndAddr;\n") | |
ftable.write("} const FunctionEntries[] =\n") | |
ftable.write("{\n") | |
for func in Functions(): | |
# xrefCount = len(list(XrefsTo(func))) | |
# if xrefCount < 500: | |
# continue; | |
ftable.write("\t{ 0x%X, 0x%X },\n" % (func, idaapi.get_func(func).endEA)) | |
ftable.write("};\n") | |
ftable.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment