Help with Hack

Posts 1–14 of 14 · Page 1 of 1
Help with Hack
Hello Guys,

Im having a problem with my Mem Hack:
Here is the Code: (CREDITS GO TO @Brimir ! for the good Tutorial!)
Code:
#include "stdafx.h"

BOOL WINAPI runner(LPVOID) {
	Sleep(9800);
	try {
		DWORD dllfile = (DWORD)GetModuleHandleA("Cshell.dll");
		if(dllfile == false) {
			throw 1;
		}
	} 
	catch (int error) {
		switch(error) {
		case 1:
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
			return false;
		default:
			//Unkown error!
			return false;
		}
	}
	Beep(1000,1000);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Thing, NULL, NULL, NULL);
	return true;
}

DWORD WINAPI Thing(LPVOID param) {
	#define WeaponMgr 0xAAC3D0
	#define WallMgr 0xAAC3BC
	#define BasicPlayerInfo 0xA452C8
	
	bool hak = true;
	DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
	DWORD pWallMgr = *(PDWORD)(CShell+WallMgr);
	DWORD pBasicPlayerInfo = *(DWORD*)(CShell + BasicPlayerInfo);
	DWORD pWeaponMgr = *(PDWORD)(CShell+WeaponMgr);
	DWORD* m16 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+25*4);
	DWORD* m14 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+479*4);

		if (hak){
		*m16 = *m14; 
			}

}
It says that "Thing" is a undeclared identifier. Can anyone help? DI d i miss some Brackets?
This base don't worj its patched
Thats ok.
I want to learn from it first. So what could the problem be is says

Code:
Error	1	error C2065: 'Thing' : undeclared identifier
Quote Originally Posted by grannycrazy View Post
Thats ok.
I want to learn from it first. So what could the problem be is says

Code:
Error	1	error C2065: 'Thing' : undeclared identifier
You have to put Runner under Thing XD
Sorry, What?
Under it? Show with code please.
ike this change the BOOL with DWORD but this you must made more then this
Code:
#include "stdafx.h"

DWORD WINAPI Thing(LPVOID param) {
	#define WeaponMgr 0xAAC3D0
	#define WallMgr 0xAAC3BC
	#define BasicPlayerInfo 0xA452C8
	
	bool hak = true;
	DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
	DWORD pWallMgr = *(PDWORD)(CShell+WallMgr);
	DWORD pBasicPlayerInfo = *(DWORD*)(CShell + BasicPlayerInfo);
	DWORD pWeaponMgr = *(PDWORD)(CShell+WeaponMgr);
	DWORD* m16 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+25*4);
	DWORD* m14 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+479*4);

		if (hak){
		*m16 = *m14; 
			}

}

BOOL WINAPI runner(LPVOID) {
	Sleep(9800);
	try {
		DWORD dllfile = (DWORD)GetModuleHandleA("Cshell.dll");
		if(dllfile == false) {
			throw 1;
		}
	} 
	catch (int error) {
		switch(error) {
		case 1:
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
			return false;
		default:
			//Unkown error!
			return false;
		}
	}
	Beep(1000,1000);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Thing, NULL, NULL, NULL);
	return true;
}
and watch your Pointers its old
in the first place you don't have a "dll main" secound one that base is patched you need to edit it
@-[I]fLuX Thank you @bandi12 I know its outdated as I said befor i first want to learn from it. Oh and this is my dllmain. Did i mix something up?
thats not dllmain
Code:
BOOL WINAPI runner(LPVOID) {
	Sleep(9800);
	try {
		DWORD dllfile = (DWORD)GetModuleHandleA("Cshell.dll");
		if(dllfile == false) {
			throw 1;
		}
	} 
	catch (int error) {
		switch(error) {
		case 1:
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
			return false;
		default:
			//Unkown error!
			return false;
		}
	}
	Beep(1000,1000);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Thing, NULL, NULL, NULL);
	return true;
}
this is a dll main i copy'ed from the sticky so it's detected but it's good to learn what is a dll main

it's called "main" bk this theard is called automaticaly on the dll attach (if you don't make a dll main your code will not start when you inject it )

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
	DisableThreadLibraryCalls(hDll);
	char msg[10] = {unic[5],unic[0],unic[6],unic[5],unic[4],unic[1],unic[3],unic[1],unic[2]};
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
	}
	return true;
}
Ok Thanks alot. Sorry for being abit stupid.
Oh and there is currently now new updated list of pointers and addys is there?
I made a dump of the Cshell and looked in it with Ollydbg but it cant find the textstring im looking for...
But thanks anyways
Quote Originally Posted by grannycrazy View Post
Ok Thanks alot. Sorry for being abit stupid.
Oh and there is currently now new updated list of pointers and addys is there?
I made a dump of the Cshell and looked in it with Ollydbg but it cant find the textstring im looking for...
But thanks anyways
Here you got


Code:
#define WeaponMgr           0xAB2940
#define LTClient            0x35AC34
#define WallMgr             0xAB292C
#define FallMgr             0xAB2924
#define BasicPlayerInfo     0xA4B830
#define InjectionMsg        0x84570
#define DamageZone          0x310F5C
#define Wallhack            0x6CE76C
#define SeeGhost1           0x88
#define SeeGhost2           0x8C
#define SeeGhost3           0x90
#define NoKnockBack         0x27B0
#define CrouchSpeed         0xC
#define AmmoDamage          0x818
#define NoRecoil1           0x53C
#define NoRecoil2           0x6A4
#define NoRecoil3           0x1958
#define NoRecoil4           0x1964
#define NoRecoil5           0x1FC0
#define NoRecoil6           0x2128
#define NoRecoil7           0x2290
#define RepeatFire          0xAC4
#define ShotGunSpread       0x828
#define NoWeaponWeight      0xAEC
#define NoGrenadeDmg        0x818
#define NoChangeDelay       0x26C8
#define FlashbangBoom       0x7ED
#define NoReload            0x26C4
#define NoScope             0xACC
#define KnifeOHK1           0xBDC
#define KnifeOHK2           0xBE8
#define FastKnife1          0xA4C
#define FastKnife2          0xA70
#define C4PlantTime         0x7C
#define C4DefuseTime        0x80
#define MaxDefuseDistance   0x84
#define DistFallDmgStart    0x4
#define MoveDelayFire       0x2484
#define ZoomSpeedPenalty    0x2480
#define ConShotInterval     0x26E0
#define ConShotKeyInterval  0x26E4
#define DamageCamera        0x2444
#define ZoomTargetType      0x2488
#define StunTime            0xAE4
#define WeaponRange         0x80C
#define EdgeShotEnabled     0x4E8
#define WallShotEnabled     0x4EC
#define PerfectWallShot     0x4F0
Ok we did it!
I KNOW ITS DETECTED BUT IT IS FINISHED!
Thanks alot to @bandi12 who helped alot! (I +rep you )
So here is the finished Code so other people can learn from it if they want to!
Code:
#include"windows.h"
#define WeaponMgr 0xABF8F0
#define WallMgr 0xAA6B6C
#define BasicPlayerInfo 0xA587E0

bool hak = true;

DWORD WINAPI Thing(LPVOID param) {
	
	
    DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
	DWORD pWallMgr = *(PDWORD)(CShell+WallMgr);
	DWORD pBasicPlayerInfo = *(DWORD*)(CShell + BasicPlayerInfo);
	DWORD pWeaponMgr = *(PDWORD)(CShell+WeaponMgr);
	DWORD* m16 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+25*4);
	DWORD* m14 = (DWORD*)((*(DWORD*)(CShell + WeaponMgr))+479*4);

		if (hak){
		*m16 = *m14; 
			}
	return true;
}

BOOL WINAPI runner(LPVOID) {
	Sleep(9800);
	try {
		DWORD dllfile = (DWORD)GetModuleHandleA("Cshell.dll");
		if(dllfile == false) {
			throw 1;
		}
	} 
	catch (int error) {
		switch(error) {
		case 1:
			CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
			return false;
		default:
			//Unkown error!
			return false;
		}
	}
	Beep(1000,1000);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Thing, NULL, NULL, NULL);
	return true;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
	DisableThreadLibraryCalls(hDll);
	
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)runner, NULL, NULL, NULL);
	
	return true;
}
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us