[C++] DLL Source

Posts 16–19 of 19 · Page 2 of 2
great code thanks for sharing
Quote Originally Posted by ~Mafioso~ View Post
Sorry Im new at C++, but I understand most of the code except for this part, can anybody explain what this is and what it is for? Because I know how to use this with Hotkeys.

Code:
void Hotkey ()
but what does void Hackthread mean?

Code:
void HackThread()
{
for(;; )
{
if(*ingame)
{

}
if(*outgame)
{

}
}
Sleep(200); 
}
it means nothing.
for(; = while(1)
and all it does besides that is see if *ingame is not pointing to NULL, if it points to NULL nothing happens, if it doesnt point to NULL nothing happens.
Oh yeah, it sleeps for 200 miliseconds
Quote Originally Posted by ~Mafioso~ View Post
Sorry Im new at C++, but I understand most of the code except for this part, can anybody explain what this is and what it is for? Because I know how to use this with Hotkeys.

Code:
void Hotkey ()
but what does void Hackthread mean?

Code:
void HackThread()
{
for(;; )
{
if(*ingame)
{

}
if(*outgame)
{

}
}
Sleep(200); 
}
Void Hackthread get called by the last piece of code that creates the hacktreath

for(;; ) is a loop it keeps running everything inside until the program (your game of choice) closes

Well there aint much to learn from in this code

Well this is the origenal source code (including the part that is maby use full) (btw looking at it it maby so that i edited some stuf)

Code:
/*
Project : Public HACK Tutorial
Author : KVDIRECT AKA:Sniper8ce
*/
#include <stdio.h>
#include <windows.h>

//Address go Here
#define Player 0xCCB670 //these are current
#define Server 0xBD4B38 // as of 8-11-09
#define OFS_X 0x0000023C // on Warrock int
#define OFS_Y 0x00000244 // change them when needed
#define OFS_Z 0x00000240
#define ADR_HEALTH 0xB0A9B4
#define ADR_AMMO 0xB0A9B8
#define ADR_FLAG 0xB0A9BC
#define ADR_REPAIR 0xB0A9B0
#define ADR_SPEED 0x0099ADA8
#define ADR_SPAWN_1 0x00C48320
#define ADR_SPAWN_2 0x00CACF2C
#define ADR_BOUNDS_1 0x00C5DF9C
#define ADR_BOUNDS_2 0x00C5DFA0
#define ADR_SCOPE 0x00AF53F6
#define ADR_NO_SPREAD 0xB0AA0C


HANDLE Warrock;
DWORD *client= (DWORD*)Player;
DWORD *server= (DWORD*)Server;

//Hack Codes Go Here
//Fast All
void Fastall() 
{
*(float*) ADR_HEALTH = 5000000;
*(float*) ADR_AMMO = 5000000;
*(float*) ADR_FLAG = 50000;
*(float*) ADR_REPAIR = 5000000;
}



//Speed
void speed() // insert key, speed on
{
if(GetAsyncKeyState(VK_INSERT) &1)
{
*(float*) ADR_SPEED = 1500;
}
}
void speedoff() // delete key, speed normal
{
if(GetAsyncKeyState(VK_DELETE) &1) 
{
*(float*) ADR_SPEED = 100;
}
}




//No Spawn Wait
void nowait() 
{
*(float*) ADR_SPAWN_1 = 0;
*(float*) ADR_SPAWN_2 = 0;
}
//No Boundries



void nobound() 
{
if (nobound)
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_1, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_2, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), Protection, 0);
}
}




//Scope
void scope()
{
if(GetAsyncKeyState(VK_RBUTTON))
{
int t=1;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
else
{
int t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
}





//No Spread


void Spread() 
{
*(float*) ADR_NO_SPREAD = 0;
}

*/
//Any other hacks you decide to add go above here
//Hack are put into the game here
void snip()
{
for(;; ) 
{
if(*client) //check if we are client.. prevent crashs
{
Fastall();
speed(); // player hacks go here
speedoff();
scope();
}

if(*server)
{
Spread();
nowait(); //server hacks go here
}

Sleep(200); //prevent for overloading the cpu
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
	CreateThread(0, 0, (LPTHREAD_START_ROUTINE)snip, 0, 0, 0); //creates the HackTread
}
return TRUE;
}
Quote Originally Posted by Thats the way it is View Post
Void Hackthread get called by the last piece of code that creates the hacktreath

for(;; ) is a loop it keeps running everything inside until the program (your game of choice) closes

Well there aint much to learn from in this code

Well this is the origenal source code (including the part that is maby use full) (btw looking at it it maby so that i edited some stuf)

Code:
/*
Project : Public HACK Tutorial
Author : KVDIRECT AKA:Sniper8ce
*/
#include <stdio.h>
#include <windows.h>

//Address go Here
#define Player 0xCCB670 //these are current
#define Server 0xBD4B38 // as of 8-11-09
#define OFS_X 0x0000023C // on Warrock int
#define OFS_Y 0x00000244 // change them when needed
#define OFS_Z 0x00000240
#define ADR_HEALTH 0xB0A9B4
#define ADR_AMMO 0xB0A9B8
#define ADR_FLAG 0xB0A9BC
#define ADR_REPAIR 0xB0A9B0
#define ADR_SPEED 0x0099ADA8
#define ADR_SPAWN_1 0x00C48320
#define ADR_SPAWN_2 0x00CACF2C
#define ADR_BOUNDS_1 0x00C5DF9C
#define ADR_BOUNDS_2 0x00C5DFA0
#define ADR_SCOPE 0x00AF53F6
#define ADR_NO_SPREAD 0xB0AA0C


HANDLE Warrock;
DWORD *client= (DWORD*)Player;
DWORD *server= (DWORD*)Server;

//Hack Codes Go Here
//Fast All
void Fastall() 
{
*(float*) ADR_HEALTH = 5000000;
*(float*) ADR_AMMO = 5000000;
*(float*) ADR_FLAG = 50000;
*(float*) ADR_REPAIR = 5000000;
}



//Speed
void speed() // insert key, speed on
{
if(GetAsyncKeyState(VK_INSERT) &1)
{
*(float*) ADR_SPEED = 1500;
}
}
void speedoff() // delete key, speed normal
{
if(GetAsyncKeyState(VK_DELETE) &1) 
{
*(float*) ADR_SPEED = 100;
}
}




//No Spawn Wait
void nowait() 
{
*(float*) ADR_SPAWN_1 = 0;
*(float*) ADR_SPAWN_2 = 0;
}
//No Boundries



void nobound() 
{
if (nobound)
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_1, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_2, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), Protection, 0);
}
}




//Scope
void scope()
{
if(GetAsyncKeyState(VK_RBUTTON))
{
int t=1;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
else
{
int t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
}





//No Spread


void Spread() 
{
*(float*) ADR_NO_SPREAD = 0;
}

*/
//Any other hacks you decide to add go above here
//Hack are put into the game here
void snip()
{
for(;; ) 
{
if(*client) //check if we are client.. prevent crashs
{
Fastall();
speed(); // player hacks go here
speedoff();
scope();
}

if(*server)
{
Spread();
nowait(); //server hacks go here
}

Sleep(200); //prevent for overloading the cpu
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
	CreateThread(0, 0, (LPTHREAD_START_ROUTINE)snip, 0, 0, 0); //creates the HackTread
}
return TRUE;
}
wow thanks a lot I will try it out now .
Posts 16–19 of 19 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us