Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 09:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



DLL Hook -> Edit GameIP Problem

Discussion on DLL Hook -> Edit GameIP Problem within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1

 
elite*gold: 134
Join Date: May 2010
Posts: 397
Received Thanks: 255
DLL Hook -> Edit GameIP Problem

Hello everyone,

i have the following problem, i have a game exe in this is e.g. this IP 127.0.0.1 <- String[9] i want to replace with 11.111.11.11 <- string[12]. With my code below it only replaces the first number of the old IP but not the complete IP... I found a way to replace the ip in the format string[9] so the last three characters are missing (.11)... i think of my code as something completely wrong... because i've been working with c++ for only about 2 weeks i hope someone from here can help me... Thanks

Code:
#include "pch.h"
#include <string>
using namespace std;

#define Offset 0x00B310CC

void RewriteValues() {
	char* ip;
	ip = (char*)Offset;
	*ip = (const char) *"11.111.11.11";
}


BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		RewriteValues();
		break;
	}
	return TRUE;
}



xKeRnx is offline  
Old 12/03/2019, 05:23   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 283
Received Thanks: 100
EDIT:

Try changing the value with cheat engine, make sure the string ends with null character in memory,
if that doesn't work, read below

Of course some characters are missing, your string is writting where it shouldn't. The correct way to do this is to replace the value of the pointers to that string not the value itself.

This is a c++ code to show what i mean.
Code:
	//original value at address X
	char ip[] = "127.0.0.1";
	//some pointer to the value (should find the pointer or pointers with CE)
	char *pip = ip;
	
    printf("pointer points to address: %X \n", &ip);
	//replace string
	 char replace[] = "123.4.5.6.7.8.9";
	 printf("Replace address is at %X\n", &replace);
	 printf("Current value: %s\n", pip);
	 system("pause");
	 //replace target pointer with replace string address
	 pip = replace;
	 printf("Current value: %s\n", pip);
	 system("pause");
elmarcia is offline  
Reply



« [Video Tutorial] Internal Signature Scanning | Electra Project is calling Developers »

Similar Threads
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den ganzen Kram könnt ihr auch als Text haben: Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung: Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen und...
GameIP To Local IP ,From Local IP To GameIP ?
09/04/2013 - General Coding - 11 Replies
Hallo ich wersuche ein Packet logger zu machen habe jetzt bei vb6 Listen packet etc. gemacht und Bei firefox Mit Proxy 127.0.0.1:80 gemacht beim tool Listen port:80 gemacht es kommen packete etc. aber die website öffnet sich nicht, und eigentlich wil ich es bei einem spiel machen Die Spiel IP zu 127.0.01 forwarden und von 127.0.0.1 zu die Spiel IP (mit das spiel Kein DC gibt,das spiel ist online und hat kein hackschield) Wie kan ich das machen das Die IP von spiel zu 127.0.0.1 forwarded...
[DLL]How to change injector if i want inject granny22.dll not python22.dll ?
10/07/2012 - Metin2 Private Server - 0 Replies
Hello i have a laucher protected and can not run launcher if i modify granny22.dll in python22.dll I want inject hack intro granny22.dll What can i do ? I give you thaks for good answer.
[Dll] For persons who have problem with mcvr100.dll, mscvrp100.dll and others
11/19/2011 - S4 League Hacks, Bots, Cheats & Exploits - 0 Replies
Hi :) I post for persons who have problem with mcvr100.dll, mscvrp100.dll and other dll. -Go here -Download you(s) DLL(s) -Put on C:\Windows\System32 and C:\Program Files\alaplaya\S4League Bye ...
Dll edit and dll editor sofware
09/02/2010 - Combat Arms - 2 Replies
Hi, first question is how to edit hack Which program should be editing and hacking Would you recommend a resource or type your program You'd expect a professional advice, please help me to hack Dll



All times are GMT +1. The time now is 09:48.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.