Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Sat Sep 02, 2023 11:44 pm Post subject: get .NET method list for codefilter |
|
|
Lets say you wish to get the list of all methods of Terraria for the codefilter
You can use this code for that:
Code: |
waitforDotNet()
local d=getDotNetDataCollector()
modulehandle=d.enumModuleList(d.enumDomains()[1].DomainHandle)[1].ModuleHandle --adjust this if the code isn't in the main module, or loop this whole thing as well
local classlist=d.enumTypeDefs(modulehandle)
local addresslist=createStringList()
for i=1,#classlist do
local methods=d.getTypeDefMethods(modulehandle, classlist[i].TypeDefToken)
for j=1,#methods do
if methods[j].NativeCode and methods[j].NativeCode~=0 then
addresslist.add(string.format('%x', methods[j].NativeCode))
end
end
end
if addresslist.Count==0 then
addresslist.destroy()
error('No addresses found')
end
sd=createSaveDialog()
sd.defaultExt='.txt'
sd.Filter=[[Text File (*.txt)|*.txt]]
if sd.Execute() then
addresslist.saveToFile(sd.FileName)
end
sd.destroy()
addresslist.destroy()
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|