View previous topic :: View next topic |
Author |
Message |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Oct 12, 2021 8:34 am Post subject: enumModules failed? |
|
|
Code: |
local pid = getProcessIDFromProcessName('calc.exe')
modules = enumModules(pid)
print(modules)
|
When I execute the above lua script, there is no output, maybe my approach is wrong? Help :oops:
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25778 Location: The netherlands
|
Posted: Tue Oct 12, 2021 9:16 am Post subject: |
|
|
instead of
do
in lua engine
_________________
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 |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Tue Oct 12, 2021 9:17 am Post subject: |
|
|
You're passing the filename rather than the name of the process. This will return the process ID of the name if it matches 'Calculator':
Code: |
local pid = getProcessIDFromProcessName('Calculator')
local modules = enumModules(pid)
print(pid)
|
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
Posted: Tue Oct 12, 2021 3:57 pm Post subject: |
|
|
Dark Bytes suggestion will print part of the table but does cut itself off if there are more than a handful of entries. You can also iterate the returned tables and dump it manually, such as something like this:
Code: |
for _, v in pairs(enumModules(getProcessIDFromProcessName('calc.exe'))) do
for kk, vv in pairs(v) do
print(string.format('%s - %s', kk, vv));
end
print('--');
end
|
_________________
- Retired. |
|
Back to top |
|
 |
yazigegeda Expert Cheater
Reputation: 0
Joined: 22 Jan 2019 Posts: 183
|
Posted: Tue Oct 12, 2021 7:12 pm Post subject: |
|
|
Thank you for your help, it is already working :)
|
|
Back to top |
|
 |
|