Another program is generated in the program
This is an old topic. I believe everyone knows. I didn't want to say more. But recently in the forum, QQ is asked by netizens, to generate a program, and to specify some information in the program, Such as Email and QQ, how do you do it? This question reminds me of "Jinshan Ranger". When you play games, I like to use it to modify the game. In addition to powerful features, it also provides a special modifier production. Tool. Produced dedicated modifiers are just a separate EXE file, there is a certain description of each address, (if this address is money or physical strength, there are some production information, etc. Is it What is made? This question is really difficult - because there are a lot of methods, while the purpose is only one: As long as you save those information in the exe file, you can have the current problem: those information should be saved? How? Visit those materials? Let's take a simple code: INT I, J; // global variable void main () {printf ("i =% dj =% D / N", I, j);} i and j What is the value? Ghost know how much this? INT i = 0, j = 1; rely, of course, you know !!! Please answer me a question: INT i = 0 What is the difference between INT I?
A initialization of another is not initialization? Just this??
Not too! The difference between them is very good, for example, (slightly PE knowledge 10,0003445 words) For this article, the biggest difference is: INT I is not assigned To the file space INT i = 0 is assigned to the file space to switch the sentence, the 0 after INT i = 0 is the inside of the exe file! What do you mean !! That is, we just have to find it 0 Save which location of the file can change its value! So how do you find it? (For your convenience, we give I to take another initial value, such as int i = 0x12345678;) Because the compiled file is A binary file, we must of course use a binary editing tool to find it, but because I don't know if there are two-one editing tools, I have to use the hex editing tools to complete, WinHex, UltraEdit, etc. can be (advertising time: the younger brother Write a hex editing tool, named Xhex, it only appears in www.aogosoft.com for learning, everyone can try to open the exe file with WinHex, press Ctrl Alt F, enter 78563412 ( Pay attention to the order), press the Enter key. If you didn't find it, it means that your operation is incorrect, please find it again, if you haven't found it, congratulations, the address I just found is the hiding place. If you try to change it to other values, run the program, is it changed? No change ?? Please go back to Winhex, press Ctrl S, if you find it, please change the initial value of I, or also Give the J initial value, such as int i = 0x1235678, j = 0xAbcdef then look for 78563412efcdab until you can only find one
In fact, there is a simpler way: just look at the address of i, in general, its address is 40xxxx, then its address in the file is xxxx (different compiler may have different results, I use VC6.0)
Come here, you should know how to specify Email or QQ in the program ?? Please generate EXE in the program to change Email and QQ value CHAR SEMAIL [255] = {0}; char SQQ [255] = {0}; void main () {Printf ("Your Email Was:% S / NAND Your QQ WAS:% S / N", SEMAIL, SQQ);}
In fact, in addition to using the global variable, you can use the resource file to add data to the end of the EXE file. For VB programmers, the principle and the practice are the same, as long as it is defined a string variable, then this The string will exist within the exe file but because VB is unicode, you want to convert it when search, write data (or read).
I hope that my expression ability will make everyone understand .. Amen