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 


memory scanner scanning string/text

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
draegon1
How do I cheat?
Reputation: 0

Joined: 15 Sep 2010
Posts: 5

PostPosted: Mon Oct 11, 2010 7:05 pm    Post subject: memory scanner scanning string/text Reply with quote

Hello,

i implemented a copy of HadFuny memory scanner and got it working wonderfully. trying to make it so i can scan for string but seem to be having a problem. Can someone please explain the concept to me?

I assume, get a string, convert it to virtual key code, and search for this keycode?

if someone already have the code and don't mind sharing, much appreciated.

just trying to make sure i am heading in the right direction while i figure out how to convert key code to string and vice versa

many thanks
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Oct 11, 2010 7:42 pm    Post subject: Reply with quote

Strings are just an array of characters, you would search for the bytes of the string.

For example:
Code:

char szHello[] = { "Hello world!" };

/*
Letter   Decimal        Hex
--------------------------------------------
H        =  72       = 0x48
e        = 101       = 0x65
l        = 108       = 0x6c
l        = 108       = 0x6c
o        = 111       = 0x6f
*/


So you could look for the array of bytes of the string.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
draegon1
How do I cheat?
Reputation: 0

Joined: 15 Sep 2010
Posts: 5

PostPosted: Tue Oct 12, 2010 8:47 pm    Post subject: Reply with quote

ok thank you
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Oct 19, 2010 1:21 pm    Post subject: Reply with quote

There's not really a need for conversion. Just compare it like a block of memory. There exist many algorithms for that such as memcmp or you could even use strcmp. Depending on the size of your string to be compared, some algorithms could be more efficient than others.
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Thu Nov 11, 2010 8:32 pm    Post subject: Reply with quote

Search for an array of bytes by converting your string into bytes and using functions like memcpy to find possible strings. Remember, strings are a basically a repsentation of bytes.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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