View previous topic :: View next topic |
Author |
Message |
dinsmoreb How do I cheat? Reputation: 0
Joined: 06 Aug 2011 Posts: 1
|
Posted: Sat Aug 27, 2011 10:25 am Post subject: how to compute offsets from address strings? |
|
|
For some reason I can't seem to figure out how I can compute an offset from an address returned by the AOBScan.
local myid = getProcessIDFromProcessName("test.exe")
openProcess(myid)
results = AOBScan("00 00 BC 41 00 00 B1 45 00 00 B0 41 0C 01 00 00")
address = stringlist_getString(results,0)
now that I have the address as a string stored in the variable called address how do I convert the variable to hex to calculate offsets? for e.g. addresss+02.
_________________
jmpXor |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sat Aug 27, 2011 10:49 am Post subject: |
|
|
that address is in string form.
You have 2 options. You pass the string as a string to the routine that makes use of it, or convert it to a integer.
if you use the string method:
address = address .. "+02"
and then pass address on to readInteger, writeInteger, etc... (they can handle string input in CE format)
or you can convert it to an integer:
address=tonumber( "0x" .. address)+2
_________________
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 |
|
|
GH*master Expert Cheater Reputation: 8
Joined: 10 Jan 2008 Posts: 159
|
Posted: Sat Aug 27, 2011 4:38 pm Post subject: |
|
|
Code: | processName = 'test.exe'
openProcess(processName)
stringList = AOBScan("00 00 BC 41 00 00 B1 45 00 00 B0 41 0C 01 00 00")
if strings_getCount(stringList)>0 do
address = '0x'..stringlist_getString(stringList,0)
address = address + 2
...
end
...
|
Last edited by GH*master on Sat Aug 27, 2011 4:52 pm; edited 2 times in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sat Aug 27, 2011 4:46 pm Post subject: |
|
|
ah, that actually works, didn't know lua would do that
_________________
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 |
|
|
|