Anmeldungsdatum: Aug 2011
Beiträge: 1
|
Hey leute, ich beschäftige mich seit gut einer woche damit einen schönen CoD4 hack zu coden. Dazu nutzte ich C++ mit der standart <windows.h> libary. Als Dll injector benuttzte ich Fu's Injector. Bei mir funktioniert auch alles wunderbar doch wenn ich die dll einem Kummple schicken kann er sie zwar injecten aber im spiel ist nicht davon zusehen. Weiß jemand vielleicht weiter?
Würde mich über antwort sehr freuen
Source: main.cpp
CPP Code: #define DLL_EXPORT #include "main.h" #include <windows.h> HANDLE CallOfDuty4 = GetCurrentProcess(); DWORD GameBase = 0x400000; DWORD NORECOIL = GameBase + 0x057CCF; DWORD MINIMAP = GameBase + 0x02A0B4; DWORD MINIMAP1 = GameBase + 0x02A0B5; DWORD MINIMAP2 = GameBase + 0x02A0B6; DWORD MINIMAP3 = GameBase + 0x02A0B7; DWORD MINIMAP4 = GameBase + 0x02A0B8; DWORD LASER = GameBase + 0x056E78; DWORD NAMETAGS = GameBase + 0x02E1CE; DWORD NAMETAGS1 = GameBase + 0x02E1CF; DWORD NAMETAGS2 = GameBase + 0x02E1AC; DWORD NAMETAGS3 = GameBase + 0x02E1AD; DWORD NAMETAGS4 = GameBase + 0x02E1AF; DWORD NAMETAGS5 = GameBase + 0x02E1B0; DWORD NAMETAGS6 = GameBase + 0x02E1B1; DWORD FOG = GameBase + 0x23DB0D; DWORD FOG1 = GameBase + 0x23DB0E; DWORD DVAR = GameBase + 0x16B386; DWORD WALLHACK = GameBase + 0x045480; DWORD ESP1 = 0x0040326E; DWORD ESP2 = 0x00403281; DWORD Crosshair = 0x430EE3; DWORD Crosshair2 = 0x430ED5; BYTE NoRecoil[] = {0x75, 0x12}; BYTE Wallhack[] = {0x6a, 0x12}; BYTE Laser[] = {0x74, 0x04}; BYTE NameTags[] = {0x75, 0x12}; BYTE Dvar[] = {0x74, 0x19}; BYTE ESP1A[] = {0x75, 0x2C}; BYTE ESP2A[] = {0x90, 0x90}; BYTE NopOne[] = {0x90}; BYTE NopTwo[] = {0x90,0x90}; BYTE NopThree[] = {0x90,0x90,0x90}; BYTE NopFour[] = {0x90,0x90,0x90,0x90}; void SendCommandToConsole(char* command) { __asm { push command push 0 push 0 mov esi, 0x004F9AB0 call esi add esp, 0x0C } } DWORD WINAPI SetupDvars(LPVOID) { SendCommandToConsole("dvar_int laser 0 0 1"); SendCommandToConsole("dvar_int wallhack 0 0 1"); SendCommandToConsole("dvar_int nofog 0 0 1"); SendCommandToConsole("dvar_int dvarunlock 0 0 1"); SendCommandToConsole("dvar_int minimap 0 0 1"); SendCommandToConsole("dvar_int norecoil 0 0 1"); SendCommandToConsole("dvar_int esp 0 0 1"); return true; } BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved) { if (dwAttached==DLL_PROCESS_ATTACH) { WriteProcessMemory(CallOfDuty4, (void*)LASER, &Laser, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)MINIMAP, &NopTwo, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)MINIMAP1, &NopTwo, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)MINIMAP2, &NopTwo, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)MINIMAP3, &NopTwo, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS1, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS2, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS3, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS4, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS5, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)NAMETAGS6, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)FOG, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)FOG1, &NopOne, 1, 0); WriteProcessMemory(CallOfDuty4, (void*)DVAR, &Dvar, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)WALLHACK, &Wallhack, 2, 0); WriteProcessMemory(CallOfDuty4, (void*)NORECOIL, &NoRecoil, 2, 0); WriteProcessMemory(CallOfDuty4,(void*) ESP1,&ESP1A,1,0); WriteProcessMemory(CallOfDuty4,(void*) ESP2,&ESP2A,2,0); WriteProcessMemory(CallOfDuty4, (void*) Crosshair, &NopTwo,2,0); WriteProcessMemory(CallOfDuty4, (void*) Crosshair2, &NopTwo,2,0); CreateThread(0,0,SetupDvars,0,0,0); Beep(150,150); } return 1; }
Source: main.h
CPP Code: #ifndef DLLHEADER_H_INCLUDED #define DLLHEADER_H_INCLUDED #ifdef DLL_EXPORT # define EXPORT __declspec (dllexport) #else # define EXPORT #endif extern EXPORT void foo (); #endif
|