MCPcopy Create free account
hub / github.com/call-042PE/PyInjector / GetAllFunctions

Function GetAllFunctions

src/GetAllFunctions.py:4–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3hexaPattern = re.compile(r'\b0x[0-9A-F]+\b')
4def GetAllFunctions(): # get all function in a script
5 functionFile = open("dumpedMembers.txt","w+")
6 members = inspect.getmembers(sys.modules[__name__]) # the code will take all the members in the __main__ module, the main problem is that it can't dump main code function
7 for member in members:
8 match = re.search(hexaPattern,str(member[1]))
9 if(match):
10 functionFile.write("{\"functionName\":\""+str(member[0])+"\",\"functionAddr\":\""+match.group(0)+"\"}\n")
11 else:
12 functionFile.write("{\"functionName\":\""+str(member[0])+"\",\"functionAddr\":null}\n")
13 functionFile.close()
14
15GetAllFunctions()

Callers 1

GetAllFunctions.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected