View previous topic :: View next topic |
Author |
Message |
blitz02 Cheater
Reputation: 0
Joined: 28 Feb 2007 Posts: 44
|
Posted: Fri Apr 23, 2010 9:38 am Post subject: [HELP] AOB Search functions for C++ |
|
|
Hi there specially to DB.
I was wondering about this AOB Search.
I have surfed and searched the internet for almost 2 days trying to find a code on C++ that will basically search for an array of byte and replaces it.
I am trying to create an InGame Menu Trainer, the only problem left is the AOB Search and replace function.
So far my research came up with the Signature Scanning, but I'm getting errors prompt to compilation. Can somebody help me with this problem?
I'm know java language, and i'm really new into C++.
So bear with me people
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Apr 23, 2010 12:26 pm Post subject: |
|
|
why not code your own one. if you're not familiar with byte searching, just pretend the byte signature is a string and imagine how you would implement that ? it's exactly the same
|
|
Back to top |
|
 |
NoMercy Master Cheater
Reputation: 1
Joined: 09 Feb 2009 Posts: 289
|
Posted: Fri Apr 23, 2010 3:40 pm Post subject: |
|
|
Code: | BYTE* ScanAOB(BYTE* AOB, BYTE* memdump, unsigned long searchsize, int aobsize)
{
unsigned long a = 0, i = 0;
for(i = 0; i < searchsize; i++)
{
while(AOB[a] == '?')
{
a++;
i++;
}
if(memdump[i] == AOB[a])
{
if(a == (aobsize - 1))
{
return &memdump[i-a];
}
a++;
}
else a = 0;
}
return 0;
} |
and this is how to call it
Code: | byte SendAob[9] = {0xB8, 0xb8, 0xb8, 0xb8, 0, 0xE8, 0xCD, 0x0E, 0x43};
DWORD SendAddy = (DWORD)ScanAOB(SendAob, (byte*)0x00400000, 0x600000, 9); |
|
|
Back to top |
|
 |
blitz02 Cheater
Reputation: 0
Joined: 28 Feb 2007 Posts: 44
|
Posted: Fri Apr 23, 2010 8:19 pm Post subject: |
|
|
Thanks for the code! I kinda got a Clear Idea.
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Apr 24, 2010 6:52 am Post subject: |
|
|
wuttt are you sure that function even works.. ?!
|
|
Back to top |
|
 |
blitz02 Cheater
Reputation: 0
Joined: 28 Feb 2007 Posts: 44
|
Posted: Sat Apr 24, 2010 7:24 am Post subject: |
|
|
No it says,
First-chance exception in myfirsttry.exe: 0xC0000005: Access Violation.
but I am making another from that concept, although his function does really do the job. What does that error means? Access Violation?
[EDIT]
Thanks again, I got it.. I'll do it later, i combined it with LPVOID now its working.. gotta eat first thanks for the answer to my Q. Good day
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Apr 24, 2010 9:54 am Post subject: |
|
|
it seems to me that if that code finds a partial match, it would fail then instead of scanning from that partial match's address + 1, it would scan from where it was different.
access violation is when your application tries to access memory in a page that is not accessible in the way you are trying with the current page access rights assigned to it.
either way, that is a yucky algo
|
|
Back to top |
|
 |
blitz02 Cheater
Reputation: 0
Joined: 28 Feb 2007 Posts: 44
|
Posted: Sat Apr 24, 2010 12:53 pm Post subject: |
|
|
Got It
another question.. If I succesfully Injected a DLL, am I granted to access the memory? Even if it has gameguard?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Apr 24, 2010 1:45 pm Post subject: |
|
|
yes, the virtual memory mapped to the process you have injected into is fully accessible to your dll. since it is in the same memory space, all previous page protections hold
|
|
Back to top |
|
 |
blitz02 Cheater
Reputation: 0
Joined: 28 Feb 2007 Posts: 44
|
Posted: Sun Apr 25, 2010 8:30 am Post subject: |
|
|
Thanks for the INFOS Very Happy
I'm currently progressing on my thing Razz
[edit]
Hey guys, I need a little help..
The code that was posted above was working,
but the main exe we're closing when the code cannot find any match..
I am using SendAddy function and WriteProcessMemory.
[edit]
Another problem, help me..
I succesfully injected the code..
The menu displayed on the exe.
but it doesn't work.
I tried some several test,
I scan memory with CE, saw the whole memory regions.
but a bit later, all memory was gone..
Did gameguard hide it again?
I have no clue on this.. Need help pretty bad.
|
|
Back to top |
|
 |
|