Siedler
Active member
- Joined
- Oct 21, 2013
- Messages
- 34
- Reaction score
- 1
Today i begun with dll hacking and looked a few tutorials,
now i tried to inject this infinite Run hack but it didnt worked (Crash my GTA)
(I know, it exists a faster way(0xB7CEE4) i try the longer way with Pointers because i want to follow a tutorial)
#include <windows.h>
#include <iostream>
using namespace std;
DWORD BasePointer = 0;
#define Points 0x51c
#define Point2 0x39c
bool State = false;
void punkte()
{
if (State)
{
DWORD dwBasePointer = *(DWORD*)BasePointer;
if (dwBasePointer != 0)
{
DWORD dwPoints1 = *(DWORD*)(dwBasePointer + Points);
DWORD &dwPoints = *(DWORD*)(dwPoints1 + Point2);
dwPoints = 1;
}
}
else
{
DWORD dwBasePointer = *(DWORD*)BasePointer;
if (dwBasePointer != 0)
{
DWORD dwPoints1 = *(DWORD*)(dwBasePointer + Points);
DWORD &dwPoints = *(DWORD*)(dwPoints1 + Point2);
dwPoints = 0;
}
}
}
DWORD WINAPI HackThread(LPVOID unused)
{
DWORD ImageBase = (DWORD)"THREADSTACK0";
BasePointer = ImageBase + -0x00001000;
for (;
//
{
punkte(); //unsere main funktion wird ausgeführt
if (GetAsyncKeyState(VK_F1) & 1)State = !State; // Mit F1 aktivieren und deaktivieren wir den Hack
Sleep(10);
}
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch (DWORD_GRUND)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, &HackThread, 0, 0, 0);
break;
case DLL_PROCESS_DETACH:
MessageBoxA(0, "Not Loaded", "Info", 0);
break;
}
return TRUE;
}
now i tried to inject this infinite Run hack but it didnt worked (Crash my GTA)
(I know, it exists a faster way(0xB7CEE4) i try the longer way with Pointers because i want to follow a tutorial)
#include <windows.h>
#include <iostream>
using namespace std;
DWORD BasePointer = 0;
#define Points 0x51c
#define Point2 0x39c
bool State = false;
void punkte()
{
if (State)
{
DWORD dwBasePointer = *(DWORD*)BasePointer;
if (dwBasePointer != 0)
{
DWORD dwPoints1 = *(DWORD*)(dwBasePointer + Points);
DWORD &dwPoints = *(DWORD*)(dwPoints1 + Point2);
dwPoints = 1;
}
}
else
{
DWORD dwBasePointer = *(DWORD*)BasePointer;
if (dwBasePointer != 0)
{
DWORD dwPoints1 = *(DWORD*)(dwBasePointer + Points);
DWORD &dwPoints = *(DWORD*)(dwPoints1 + Point2);
dwPoints = 0;
}
}
}
DWORD WINAPI HackThread(LPVOID unused)
{
DWORD ImageBase = (DWORD)"THREADSTACK0";
BasePointer = ImageBase + -0x00001000;
for (;
{
punkte(); //unsere main funktion wird ausgeführt
if (GetAsyncKeyState(VK_F1) & 1)State = !State; // Mit F1 aktivieren und deaktivieren wir den Hack
Sleep(10);
}
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch (DWORD_GRUND)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, &HackThread, 0, 0, 0);
break;
case DLL_PROCESS_DETACH:
MessageBoxA(0, "Not Loaded", "Info", 0);
break;
}
return TRUE;
}