Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is there a way to get enumerated dll info in LUA?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
vidness
How do I cheat?
Reputation: 0

Joined: 21 May 2021
Posts: 3

PostPosted: Fri May 21, 2021 8:02 am    Post subject: Is there a way to get enumerated dll info in LUA? Reply with quote

Hi fellow CE'rs!

Love this app! I've been messing with so many games. There is this one game that returns duplicate names when I use "Enumerate DLLs and Symbols", so when using getSymbolInfo, it just returns the first match.

May I ask for an example on how to parse through the list of Symbols for all that match a certain name?

I think I can figure out my target symbol from the size.

Thanks!!

_________________
Killing time until I'm back in the Matrix...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Fri May 21, 2021 8:07 am    Post subject: Reply with quote

Not really, unless you manually spawn the "enumerate dll's and symbols" window, wait for it to be full populated and then parse the treeview for the symbol you're looking for.

But before you go do that, are both symbols in the same module ? If not, you can use modulename.symbolname

_________________
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
Back to top
View user's profile Send private message MSN Messenger
vidness
How do I cheat?
Reputation: 0

Joined: 21 May 2021
Posts: 3

PostPosted: Fri May 21, 2021 8:21 am    Post subject: Reply with quote

Thanks for the quick reply!

Ah no wonder I couldn't find the solution in previous threads.

The game is tModLoader for Terraria. And the symbols are all within the same module. I suppose it's no biggie. Hmm...is there a way I can update my Enumerate function to create unique names?

_________________
Killing time until I'm back in the Matrix...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Fri May 21, 2021 8:43 am    Post subject: Reply with quote

oh terraria. I assume that tModLoader is also a .NET program?

In that case there's the dotnet data collector which is what i'm expecting you're interested in

Code:

allmethods={}

print("this may take a while. Please be patient")
processMessages()

dnc=getDotNetDataCollector()
d=dnc.enumDomains()
for di=1,#d do
  ml=dnc.enumModuleList(d[di].DomainHandle)
  for mli=1,#ml do
    td=dnc.enumTypeDefs(ml[mli].ModuleHandle)

    for tdi=1,#td do
      local methods=dnc.getTypeDefMethods(ml[mli].ModuleHandle, td[tdi].TypeDefToken)
      for mi=1,#methods do
        local method=methods[mi]
        method.classname=td[tdi].Name
        table.insert(allmethods, method)
      end

    end
  end
end
print("you can now check out the allmethods table")

_________________
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
Back to top
View user's profile Send private message MSN Messenger
vidness
How do I cheat?
Reputation: 0

Joined: 21 May 2021
Posts: 3

PostPosted: Fri May 21, 2021 8:54 am    Post subject: Reply with quote

Ooh sexy!

I will play around with this, thanks Dark Byte!

Next round of pint is on me!

_________________
Killing time until I'm back in the Matrix...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites