Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: Beginner
Apr 3, 1998

find and replace values loaded in memory

Question:
I am trying to write a program that will search memory for a hexadecimal string and replace it with the values hardcoded in my program. It's a game cheat program that is executed after the game is started. I assume this will work similarly to a virus scanning program that scans memory for a character string. I'm somewhat new to C++, but have programmed in Assembly and Pascal. Your help would be greatly appreciated. Thanks, Phillip D. Howard ps. I have searched your Q&A files and found nothing related.

Answer:
You didn't indicate which platform you are working on. In 32-bit Windows, other programs are protected from such behavior, and you generally cannot directly access memory owned by another process.

While this might be possible in DOS, it is generally considered bad form to read and write memory that your program does not own. If you want to go ahead with this technique, you will need to find some unique sequence of bytes specific to the program you want to modify and then search for that sequence in memory. There is no reliable method I can give you without studying the program myself. But, in general, it is very difficult to perform such tasks in a reliable manner.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date