Answer the question
In order to leave comments, you need to log in
How to replace string in exe using hex editor?
Hello, I would like to know how to do this and whether it can be done by inserting a string of a different length.
Answer the question
In order to leave comments, you need to log in
Open file, find line, replace, save.
The ability to change the length depends on many factors: compiler, linker, luck.
As described above, making a shorter string is no problem. To make a string longer than the original one, you need to find a free space in the file filled with zeros (usually this happens at the end of the segment), enter the necessary text there, and then change the line call address to a new one (you need a HEX editor with a disassembler and minimal concepts of assembly mnemocodes) .
Take a hex editor, open the file, edit.
In 90% of cases, inserting a string of a different length will not work, since most often in the code the data comes first, and then the code. When inserting data, all links in the code will fly.
Insert a shorter line - it will, do not forget to put 00 at the end of the line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question