how to print a list of modules
how to print a list of modules
hey i need to print the module list in lua script, how can i make a function which will give me the names of all game modules?
ideally it should only show modules that start with 'gam'
ideally it should only show modules that start with 'gam'
Re: how to print a list of modules
You can use "enumModules". And lua's "string.find" or "string.sub" to see if the name starts with the match you want.
This is from the "celua.txt" file in the CE directory.
This is from the "celua.txt" file in the CE directory.
Code: Select all
enumModules(processid OPTIONAL):
Returns a table containing information about each module in the current process, or the specified processid
Each entry is a table with fields
Name : String containing the modulename
Address: Integer representing the address the module is loaded
Is64Bit: Boolean set to true if it's a 64-bit module
PathToFile: String to the location this module is loaded
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: how to print a list of modules
No but you can use the address and "getModuleSize" to determine the address range of a given module.GreenHouse wrote: ↑Sun Aug 01, 2021 11:14 am...
I don't think that gives you addresses inside each module. But module name, address, etc.
Code: Select all
getModuleSize(modulename): Returns the size of a given module (Use getAddress to get the base address)
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: how to print a list of modules
OP asked how to print a list of module name if they start with "gam", they never said anything about the module addresses.GreenHouse wrote: ↑Sun Aug 01, 2021 11:21 am...
I know. What I mean is that using that, I don't think you can dump every address inside of each module with its name.
You can get the address range and iterate through the addresses and dump whatever you want.
As an example I use this to make a lua AOBScanModule.
Code: Select all
function AOBScanModule(strModule, strSignature, aobSignaturePrivileges, alignmentType, alignmentParam)
index = index or 1
local msa = getAddress(strModule)
local mea = msa + getModuleSize(strModule)
local ms = createMemScan()
ms.firstScan(soExactValue, vtByteArray, nil, strSignature, nil, msa, mea,
aobSignaturePrivileges, alignmentType, alignmentParam, true, true, false, false)
ms.waitTillDone()
local result = createFoundList(ms)
result.initialize()
ms.destroy()
return result
end
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: how to print a list of modules
Well, I imagined that by getting what starts with "gam'", he means everything from inside a module that includes game functions, like for example Terraria does. Or there's also an engine in which the executable of the game is always called "game.exe", that also does include some generic functions. Otherwise I don't think that dumping the list in itself makes sense. There's no use for that.
Re: how to print a list of modules
I could make a million guesses as to what OP wants and all could be wrong. I've found it better to just work based on what they ask for. You're welcome to answer questions based on what you speculate they really mean, but that's not what I do.GreenHouse wrote: ↑Sun Aug 01, 2021 11:41 am...
Well, I imagined that by getting what starts with "gam'", he means everything from inside a module that includes game functions, like for example Terraria does. Or there's also an engine in which the executable of the game is always called "game.exe", that also does include some generic functions. Otherwise I don't think that dumping the list in itself makes sense. There's no use for that.
Re: how to print a list of modules
ThanksShyTwig16 wrote: ↑Sun Aug 01, 2021 11:12 amYou can use "enumModules". And lua's "string.find" or "string.sub" to see if the name starts with the match you want.
This is from the "celua.txt" file in the CE directory.Code: Select all
enumModules(processid OPTIONAL): Returns a table containing information about each module in the current process, or the specified processid Each entry is a table with fields Name : String containing the modulename Address: Integer representing the address the module is loaded Is64Bit: Boolean set to true if it's a 64-bit module PathToFile: String to the location this module is loaded
I just worked with the game fear, where there are two modules that start with gam and then have a random prefix of type gamXXXX.tmp. so I needed to download the list of game modules to update the base address of the pointers.GreenHouse wrote: ↑Sun Aug 01, 2021 11:14 amI don't think that gives you addresses inside each module. But module name, address, etc.
-
- Expert Cheater
- Posts: 852
- Joined: Fri Oct 12, 2018 10:25 pm
- Reputation: 896
Re: how to print a list of modules
Makes sense then. What Tim said should work perfectly then. Also, remember that in the Cheat Engine folder, you have a file called "celua.txt" which has lots of useful things you can use. If you need anything module related, you could for example search "module" and find that one.
Who is online
Users browsing this forum: No registered users