|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Wed Jul 19, 2017 8:46 am Post subject: In CE Lua, how to do an aobscan within a memory range? |
|
|
In CE Lua, how to do an aobscan within a memory range? Say, I want to search after 0x10000000.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
|
Back to top |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Wed Jul 19, 2017 1:26 pm Post subject: |
|
|
Thanks for the example.
I use the following code to perform an AOBScan, but it always returns 0:
Code: |
local ms = createMemScan()
local AOB = "EB 81 C4 B5 C4 D1 A4 55 00"
local startAddress = getAddress(process)
local stopAddress = startAddress + getModuleSize(process)
ms.firstScan(soExactValue, vtByteArray, nil, AOB, nil, startAddress, stopAddress,
"", nil, nil , true, nil, nil, nil)
ms.waitTillDone()
local fl = createFoundList(ms)
fl.initialize()
print(fl.Count) <---------fl.Count is always 0
fl.destroy()
ms.destroy()
|
This code always print out "0". I am sure the AOB string is correct, because I can use it to find the result I want by using the built-in AOB scan of CE.
So what is the problem?
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Wed Jul 19, 2017 1:59 pm Post subject: |
|
|
Hm, that seems correct so the best I can suggest is double checking the start and stop addresses and making sure that the address you get from the built-in AOB is actually in that range...
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Jul 19, 2017 2:32 pm Post subject: |
|
|
are you sure that the AOB is inside the executable?
_________________
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 |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Wed Jul 19, 2017 7:20 pm Post subject: |
|
|
Dark Byte wrote: | are you sure that the AOB is inside the executable? |
@FreeER @Dark Byte
Actually I am not sure if the AOB is inside the executable, it's not a static address. So how do I search that address range? Say, if the address is 0x10000000, how do I assign this address to firstscan function as a parameter?
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Wed Jul 19, 2017 7:38 pm Post subject: |
|
|
Dr.Disrespect wrote: | Say, if the address is 0x10000000, how do I assign this address to firstscan function as a parameter? |
Just set the start address to that value and stopAddress to whatever you want.
Code: | local startAddress = 0x10000000
local stopAddress = startAddress + 0x2000
-- scans 0x2000 bytes starting from 0x1000000
-- you could also set the stopAddress to the default the CE builtin uses
-- 0x7FFFFFFFFFFFFFFF I think, though it might be all Fs
|
You don't need them to be variables by the way, you could just as easily use
Code: |
ms.firstScan(soExactValue, vtByteArray, nil, "EB 81 C4 B5 C4 D1 A4 55 00", nil, 0x10000000, 0x30000000,
"", nil, nil , true, nil, nil, nil)
|
|
|
Back to top |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Wed Jul 19, 2017 7:48 pm Post subject: |
|
|
FreeER wrote: | Dr.Disrespect wrote: | Say, if the address is 0x10000000, how do I assign this address to firstscan function as a parameter? |
Just set the start address to that value and stopAddress to whatever you want.
Code: | local startAddress = 0x10000000
local stopAddress = startAddress + 0x2000
-- scans 0x2000 bytes starting from 0x1000000
-- you could also set the stopAddress to the default the CE builtin uses
-- 0x7FFFFFFFFFFFFFFF I think, though it might be all Fs
|
You don't need them to be variables by the way, you could just as easily use
Code: |
ms.firstScan(soExactValue, vtByteArray, nil, "EB 81 C4 B5 C4 D1 A4 55 00", nil, 0x10000000, 0x30000000,
"", nil, nil , true, nil, nil, nil)
|
|
Thanks a lot, it worked. +Rep
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
|
|
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
|
|