View previous topic :: View next topic |
Author |
Message |
Stacktrace Expert Cheater
Reputation: 1
Joined: 04 Jul 2015 Posts: 105
|
Posted: Wed Jul 06, 2016 3:07 am Post subject: Hmm, I'm clueless on how to do this in Lua |
|
|
I'm trying to write a debugger code that changes the register of two addresses. This game uses ASLR so I'm unable to use the address itself only. I need to use the module addresses (Game.exe+153FA but I'm not sure how to do this in Lua.
Could you by any chance write a script for me that does this? I've noticed that if I normally change the register of two addresses It'll only trigger for one and cause a crash so I need to lablel and registersymbol them or do something like this
Adr1 = 0xblabla; Reg1 = 5
Addr2 = 0xblabla; Reg2 = 9
Debugger code here that changes two registers of two module addresses
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Jul 06, 2016 7:15 pm Post subject: |
|
|
Code: | debug_setBreakpoint(address1, 1, bptExecute, function()
EAX = 5
end)
debug_setBreakpoint(address2, 1, bptExecute, function()
EAX = 9
end) |
|
|
Back to top |
|
 |
Stacktrace Expert Cheater
Reputation: 1
Joined: 04 Jul 2015 Posts: 105
|
Posted: Fri Jul 08, 2016 1:23 am Post subject: |
|
|
Zanzer wrote: | Code: | debug_setBreakpoint(address1, 1, bptExecute, function()
EAX = 5
end)
debug_setBreakpoint(address2, 1, bptExecute, function()
EAX = 9
end) |
|
Now that's a better looking register changing code than the ones I've dealt with.
Thanks, there's an issue though.
debug_setBreakpoint("Game.exe+3FB3DB", 1, bptExecute, function() --THIS LINE WORKED FINE BY THE WAY
EIP = "Game.exe+3FB3DE" --I can only set the registers to numbers, not the addresses itself.
end)
read the comments I added next to the lines.
because I need to have addresses into the EIP register to jump over some addresses.
|
|
Back to top |
|
 |
cooleko Grandmaster Cheater
Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Fri Jul 08, 2016 3:11 am Post subject: |
|
|
an address IS just a number...
tonumber("0x" .. EIPaddr)
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jul 08, 2016 6:13 am Post subject: |
|
|
Code: | EIP = getAddress("Game.exe+3FB3DE") |
|
|
Back to top |
|
 |
Stacktrace Expert Cheater
Reputation: 1
Joined: 04 Jul 2015 Posts: 105
|
Posted: Sat Jul 09, 2016 4:13 am Post subject: |
|
|
Zanzer wrote: | Code: | EIP = getAddress("Game.exe+3FB3DE") |
|
You're a life saver, thank you so much. I'll try and give you you an reputation.
|
|
Back to top |
|
 |
|