I am reverse engineering a game whose .exe contains the address " http://example.com " and I want to replace it with a specific IP to create a server myself. It is an experimental project, I already managed to edit the .exe in a HEX editor and replace the http with the IP, but it keeps connecting me to example.com
I know that the issue is in the .exe, since another company created a server for the same game and they only give you the download link of the .exe as "Patch" to connect to their server
Do you have any idea what I'm doing wrong?
If you are working on Windows, you can use the HOSTS file to redirect all requests to example.com to your local IP.
I opened this file:
C:\Windows\System32\Drivers\etc\hosts
And add the line:
The changes are immediate, but some programs keep an internal cache of the DNS that they resolve, so if that doesn't work, reboot the machine.
Note that this applies to the entire operating system, and you won't be able to access example.com in any way as long as that line exists in your HOSTS file.