| View previous topic :: View next topic |
| Author |
Message |
Praefator Newbie cheater
Reputation: 0
Joined: 26 Feb 2016 Posts: 10
|
Posted: Sat Mar 19, 2016 3:03 pm Post subject: Can't use define() with aobscanmodule() |
|
|
So I'm trying to clean up my AA script by moving the array of bytes to a definition above the [ENABLE] section but when I'm activating the script the injection does not happen.
| Code: |
define(aobbytes,D9 96 E0 00 00 00 D9 EE)
[ENABLE]
aobscanmodule(aob,Game.exe,aobbytes)
alloc(newmem,$1000)
|
I'm certain it must be a noob issue but I can't solve it by myself.
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Mar 19, 2016 3:15 pm Post subject: |
|
|
Seems "aobbyte" is the issue. Use any other word.
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Mar 19, 2016 3:24 pm Post subject: |
|
|
| So what's special about the word "aobbyte" which causes the script to not activate at all?
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Mar 19, 2016 3:30 pm Post subject: |
|
|
When you paste that string, CE will group it like this:
step1
ao bb yt es
step2
A? BB ?? E?
step3
memoryscanner, type aob, pattern A? BB ?? E?, get the first occurrence.
this will work
| Code: | | aobscan(test, 01 02 03 04 05 06 07 08 09) |
pattern passed to memoryscanner is
01 02 03 04 05 06 07 08 09
this won't
| Code: | define(blabla,06)
aobscan(test, 01 02 03 04 05 blabla 07 08 09) |
pattern passed to memoryscanner is
01 02 03 04 05 B? AB ?A 07 08 09
_________________
Last edited by mgr.inz.Player on Sat Mar 19, 2016 3:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
Praefator Newbie cheater
Reputation: 0
Joined: 26 Feb 2016 Posts: 10
|
Posted: Sat Mar 19, 2016 3:34 pm Post subject: |
|
|
I see... So this is why it was activating but nothing happened at the expected address.
Bummer...
Thank You, mgr.inz.Player!
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Mar 19, 2016 3:43 pm Post subject: |
|
|
You can use several {$lua} blocks. Like this:
| Code: |
{$lua}
myAOBSignature='D9 96 E0 00 00 00 D9 EE'
myAobscanmodule="aobscanmodule(aob,Game.exe,"..myAOBSignature..")"
return "define(aobbytes,"..myAOBSignature..")"
{$asm}
[ENABLE]
{$lua}
return myAobscanmodule
{$asm}
alloc(newmem,$1000) |
_________________
|
|
| Back to top |
|
 |
Praefator Newbie cheater
Reputation: 0
Joined: 26 Feb 2016 Posts: 10
|
Posted: Sat Mar 19, 2016 4:07 pm Post subject: |
|
|
Interesting... I guess I could try to use Lua to clean up my code.
This way the define statement becomes unnecessary.
Thank you.
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Mar 19, 2016 6:08 pm Post subject: |
|
|
How often are you referring to your AOB anyway?
Should only be once.
|
|
| Back to top |
|
 |
|