Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


scan array of byte
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sat May 28, 2011 8:47 pm    Post subject: Reply with quote

Code:
01 00 00 00 00 73 74 65 72 2F


This AOB is 10 bytes long, so your going to be doing this:

Code:

SIZE_T bytesRead;
BYTE    bytesFound [9] = {0};

ReadProcessMemory ( hProcess, lpPtr, &bytesFound, 10, &bytesRead );
 


Then, your going to compare the values.

Code:

// I think its in reverse order
for ( int i = 0; i < 10; i ++ )
{
   if ( bytesFound [i] == '\x01' )
   {
      etc...
   }
}


hope I helped somewhat.
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Sat May 28, 2011 9:25 pm    Post subject: This post has 1 review(s) Reply with quote

not sure if there is a specific reason why you do '\x01' (perhaps it's a specific coding style, like urban speech)

anyhow, you can also do "if ( bytesFound [i] == 0x01 ) ", it's 2 characters less and actually reads a bit easier

_________________
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
View user's profile Send private message MSN Messenger
TiMBuS
Cheater
Reputation: 0

Joined: 27 Jun 2006
Posts: 44

PostPosted: Sat May 28, 2011 11:03 pm    Post subject: Reply with quote

if you're scanning a huge area it would likely pay to employ an algorithm smarter than 'check every single byte' because that's.. not so good..
soak your brain in these wiki pages for a while: http://en.wikipedia.org/wiki/String_searching_algorithm (the boyer-moore algorithm is particularly good)

now im not saying you NEED to go ahead and implement a better algorithm, especially at this point when you just want a working program -- not something fancy. im just trying to get you to take a few steps towards making something that works well instead of something that merely works. this is a programming board after all

_________________
Build something even a fool can use and only a fool will use it.
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun May 29, 2011 2:32 am    Post subject: Reply with quote

A Fast Generic Sequence Matching Algorithm - A combination of BM and KMP.
_________________
Back to top
View user's profile Send private message
Elsin10
How do I cheat?
Reputation: 0

Joined: 25 Aug 2013
Posts: 1

PostPosted: Sun Aug 25, 2013 5:16 am    Post subject: Reply with quote

sry for resurrecting this but i need help.

I dont know nothing about programming and i need to find an AoB. One guy posted on youtube a cheat video about a game (King's Road) but he wont share his cheat/hack (scritps/oab) so i need help in finding the code.

How can i find it ?

thx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites