Probleme code source dans un dll (c++)

DeathNower -  
fiddy Messages postés 11069 Date d'inscription   Statut Contributeur Dernière intervention   -
Bonjour a tout le monde,

je programme une dll sur microsoft visual c++ 2010 et j'aimerai savoir ou est l'erreur dans mon code source car je ne fait que chercher et je ne trouve pas pouver vous m'aide

main.cpp:

#include <windows.h>
#include <stdio.h>

/// Adress List \\\

#define Playerpointer Outdated
#define Serverpointer Outdated
#define Fast_Ammo Outdated
#define Fast_Health Outdated
#define Fast_Repair Outdated
#define Fast_Flag Outdated
#define No_Spread Outdated
#define No_Water Outdated
#define Speed Outdated
#define Near_Fog Outdated
#define GlassWalls_FarFog Outdated
#define Full_Bright_1 Outdated
#define Full_Bright_2 Outdated
#define Full_Bright_3 Outdated
#define No_Bounds_1 Outdated
#define No_Bounds_2 Outdated
#define ADR_QUICKSPAWN1 Outdated
#define ADR_QUICKSPAWN2 Outdated
#define Stamina_10Porcent Outdated
#define Extra_Ammo_1 Outdated
#define Extra_Ammo_2 Outdated
#define Stamina_OffSet Outdated
#define NoRecoil_1_OffSet Outdated
#define NoRecoil_2_OffSet Outdated
#define NoRecoil_3_OffSet Outdated
#define OFS_X Outdated
#define OFS_Y Outdated
#define OFS_Z Outdated
#define Slot5_OffSet Outdated
#define NFD_Player_OffSet Outdated
#define Premium_OffSet Outdated
#define Super_Master_OffSet Outdated
#define ADR_ANTIKICK Outdated

int Telx = 1;
int Tely = 1;
int Telz = 1;

DWORD *ingame= (DWORD*)Playerpointer;
DWORD *outgame= (DWORD*)Serverpointer;

// Hack Codes \\

void Supermaster ()
{
DWORD dwSrvrPtr = *(DWORD*)Serverpointer;
if(dwSrvrPtr != 0){
*(int*)(dwSrvrPtr+Super_Master_OffSet) = 1;
}
}

void Spawn ()
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_QUICKSPAWN1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_QUICKSPAWN1, &t , sizeof(t));
VirtualProtect((void*)ADR_QUICKSPAWN1, sizeof(t), Protection, 0);

VirtualProtect((void*)ADR_QUICKSPAWN2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_QUICKSPAWN2, &t , sizeof(t));
VirtualProtect((void*)ADR_QUICKSPAWN2, sizeof(t), Protection, 0);
}

void Teleport ()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer; /// Player Pointer Addie
if(dwPlayerPtr != 0)
{
float PositionY = 0.0; float PositionX = 0.0;float PositionZ = 0.0;
PositionX = *(float*)(dwPlayerPtr + OFS_X);
PositionY = *(float*)(dwPlayerPtr + OFS_Y);
PositionZ = *(float*)(dwPlayerPtr + OFS_Z);
if(GetAsyncKeyState(VK_NUMPAD4)&1){
Telx = PositionX;
Tely = PositionY;
Telz = PositionZ;}
if(GetAsyncKeyState(VK_NUMPAD5)&1){
*(float*)(dwPlayerPtr + OFS_X) = Telx;
*(float*)(dwPlayerPtr + OFS_Y) = Tely;
*(float*)(dwPlayerPtr + OFS_Z) = Telz;}
if(GetAsyncKeyState(VK_NUMPAD6)&1){
*(float*)(dwPlayerPtr + OFS_X) += 30;}}}

void FastAll ()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)Fast_Repair = 10.0f;
*(float*)Fast_Health = 5.0f;
*(float*)Fast_Flag = 10.0f;
*(float*)Fast_Ammo = 5.0f;
}}

void fullbright () //fullbright
{
if(GetAsyncKeyState(VK_NUMPAD9) &1<< 0xF)
{
*(int*)(Full_Bright_1) = 1092779973;
*(int*)(Full_Bright_2) = 1092779973;
*(int*)(Full_Bright_3) = 1092779973;
}
}

void nofog () //no fog
{
*(float*)0x00B0E148 = 1166127104;//far fog address
*(float*)0x00B0E144 = 0; //nearfog addres
}

void speedon1 ()
{
if(GetAsyncKeyState(VK_NUMPAD1) &1<< 0xF)
{
*(float*)(Speed) = 200.0f;
}
}

void speedon2 ()
{
if(GetAsyncKeyState(VK_NUMPAD2) &1<< 0xF)
{
*(float*)(Speed) = 300.0f;
}
}

void speedon3 ()
{
if(GetAsyncKeyState(VK_NUMPAD3) &1<< 0xF)
{
*(float*)(Speed) = 500.0f;
}
}

void speedoff ()
{
if(GetAsyncKeyState(VK_NUMPAD0) &1<< 0xF)
{
*(float*)(Speed) = 100.0f;
}
}

void jump () //super jump
{
if(GetAsyncKeyState(VK_CONTROL) &1)
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = 1000;
}
}
}

void stamina () //stamina
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+Stamina_OffSet) = 100;
}
}

void norecoil () //norecoil
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+0x00) = 0;
*(float*)(dwPlayerPtr+0x04) = 0;
*(float*)(dwPlayerPtr+0x08) = 0;
}
}

void nfd () //NFD
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+NFD_Player_OffSet) = -20000;
}
}

void nobounds () //nobounds
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)No_Bounds_2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)No_Bounds_2, &t , sizeof(t));
VirtualProtect((void*)No_Bounds_2, sizeof(t), Protection, 0);

VirtualProtect((void*)No_Bounds_2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)No_Bounds_2, &t , sizeof(t));
VirtualProtect((void*)No_Bounds_2, sizeof(t), Protection, 0);
}

void nowater () //no water
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)No_Water, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)No_Water, &t , sizeof(t));
VirtualProtect((void*)No_Water, sizeof(t), Protection, 0);
}

void PXItemSP2 ()
{
*(int*)(Stamina_10Porcent) = 1;
}//+ 5% hp

void Dig()
{
if(GetAsyncKeyState(VK_MENU) &1)
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = -2000;
}
}
}

void ExtraAmmo () //we want extrea clip allways =)
{
*(int*)(Extra_Ammo_1) = 1;
}

void ExtraAmmo2 () //we want extrea clip allways =)
{
*(int*)(Extra_Ammo_2) = 1;
}

void premium () //Gold Premium
{
DWORD dwPlayerPtr = *(DWORD*)Serverpointer;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr+Premium_OffSet) = 3, 10; // 1 = bronze 2 = silver 3 = gold
}
}

void spread () //no spread
{
*(float*) No_Spread = 0;
}

void Slots5 ()
{
DWORD dwPlayerPtr = *(DWORD*)Serverpointer;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr+Slot5_OffSet) = 1;
}
}

void AntiKick ()
{
const BYTE KICKON [] = {0xEB, 0x0D};
{
DWORD dwProtect;
VirtualProtect((void*)(ADR_ANTIKICK), 1, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(ADR_ANTIKICK), &KICKON, 1);
VirtualProtect((void*)(ADR_ANTIKICK), 1, dwProtect, NULL);}}

void HackThread()
{
for(;; )
{
if(*ingame)
{
jump();
nfd();
premium();
spread();
nowater();
nobounds();
norecoil();
stamina();
speedon1();
speedon2();
speedon3();
speedoff();
nofog();
Dig();
fullbright();
FastAll();
Teleport();
Slots5();
Spawn();
AntiKick();
}
if(*outgame)
{
premium();
ExtraAmmo();
ExtraAmmo2();
Slots5();
PXItemSP2();
Supermaster();
AntiKick();
}
}
Sleep(200); //prevent for overloading the cpu
}

BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0); //create the hackthread
break;
}
return TRUE;
}

Merci d'avance

A voir également:

1 réponse

fiddy Messages postés 11069 Date d'inscription   Statut Contributeur Dernière intervention   1 846
 
Tu pourrais au moins mettre l'erreur indiqué par le compilateur...
Et aussi mettre la ligne concernée.
0