How to make a Simple Hack

Posts 1–15 of 173 · Page 1 of 12
How to make a Simple Hack
1. Open Microsoft Visual Studio, or Visual C++ Express:
2. Go to File > New > Project.
3. Select 'Win32 Project' as your project type.
4. In the next dialog, go to setting and check 'DLL', and 'Empty Project'.
5. Write your code.
6. Go to Build > Build Solution.

Code:
//includes all nessecary files to this source
#include <windows.h>
//End of includes
//This is what you call globals.
int HackOn = 0;
//Define HackOn as a number, and that numebr is zero.
int HackMax = 10;
//Define HackMax as a number, and that number is ten.
bool test = false;
//Define test as a true/false. "Boolean"
#define ADDR_SBULLLETS			0x374BBF16 
//The definition of ADDR_SBULLETS
//End of Globals
void Main (void)
{
	while(1)
		//Makes an infinite loop. One that doesn't end.
	{
		if(GetAsyncKeyState(VK_NUMPAD1)&1)
			//When Numpad1 Gets Pressed
		{
			test = (!test);
			//if test = false, turn to true and vice versa
		}
		if(GetAsyncKeyState(VK_NUMPAD2)&1)
			//When Numpad2 Gets Pressed.
		{
			HackOn ++;
			//Adds +1 to the variable, "HackOn"
			if(HackOn == HackMax) HackOn = 0;
			//When Hackon Reaches the number HackMax, it resets HackOn to 0
		}
		if(test)
			//if test is true
		{
			memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x33\xC0\x90", 3 );
			//look in globals for the definition of ADDR_SBULLETS
			//Basically, it edits the bytes of the memory to "\x33\xC0\x90".
			//The number at the end, tells you how many bytes you are editing.
			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
		}else{
			//if test is not true
			memcpy(  (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
			//look in globals for the definition of ADDR_SBULLETS
			//Basically, it edits the bytes of the memory to "\x0F\x94\xC0".
			//The number at the end, tells you how many bytes you are editing.
			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
		}
	}
}
DWORD WINAPI Lesson (LPVOID)
// This is just a dummy function that will be the code activate the main thread
{	
	Main();
	//Call the thread called Main
	return 1;
	//Finish of the thread.
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
// DllMain is an optional function for you to declare.
// It serves as the entry point for any DLL
{
	DisableThreadLibraryCalls(hDll);
	// Make a call to DisableThreadLibraryCalls with the hModule variable
	// as its argument; Doing this is an optimization trick to prevent
	// needless thread attach/detach messages from triggering further calls
	// to our DllMain function.
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		//When this dll is injected into the process. this is what the dll is supposed to do.
		// Null, in C Plus Plus, nothing. It is defined as 0
		CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
		//It creates the thread called "Lesson" which is defined a few lines up. DWORD WINAPI Lesson (LPVOID)
	}
return TRUE;
// Although the return value doesn't actually matter. You return the value TRUE or FALSE indicatinng success or failure.

}
Have fun nubs.
The Super Bullets Addy is updated + correct

I wrote this tutorial for a friend of mine, but i decided to share it.
I commented on each line, and each bit to make it easier to understand what each and everything is doing.

Request Sticky?
An Introduction to OKAY GUISE HERE SOME SOURCE CODE OMNOMNOM
heh u actually posted it huh?
good job :/
Wow it really works bro? Awsome
Good job, nice tutorial sort of.
Hey I got an error wile building:

fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Quote Originally Posted by flameswor10 View Post
1. Open Microsoft Visual Studio, or Visual C++ Express:
2. Go to File > New > Project.
3. Select 'Win32 Project' as your project type.
4. In the next dialog, go to setting and check 'DLL', and 'Empty Project'.
5. Write your code.
6. Go to Build > Build Solution.

Code:
//includes all nessecary files to this source
#include <windows.h>
#include "stdafx.h"
//End of includes
//This is what you call globals.
int HackOn = 0;
//Define HackOn as a number, and that numebr is zero.
int HackMax = 10;
//Define HackMax as a number, and that number is ten.
bool test = false;
//Define test as a true/false. "Boolean"
#define ADDR_SBULLLETS			0x374BBF16 
//The definition of ADDR_SBULLETS
//End of Globals
void Main (void)
{
	while(1)
		//Makes an infinite loop. One that doesn't end.
	{
		if(GetAsyncKeyState(VK_NUMPAD1)&1)
			//When Numpad1 Gets Pressed
		{
			test = (!test);
			//if test = false, turn to true and vice versa
		}
		if(GetAsyncKeyState(VK_NUMPAD2)&1)
			//When Numpad2 Gets Pressed.
		{
			HackOn ++;
			//Adds +1 to the variable, "HackOn"
			if(HackOn == HackMax) HackOn = 0;
			//When Hackon Reaches the number HackMax, it resets HackOn to 0
		}
		if(test)
			//if test is true
		{
			memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x33\xC0\x90", 3 );
			//look in globals for the definition of ADDR_SBULLETS
			//Basically, it edits the bytes of the memory to "\x33\xC0\x90".
			//The number at the end, tells you how many bytes you are editing.
			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
		}else{
			//if test is not true
			memcpy(  (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
			//look in globals for the definition of ADDR_SBULLETS
			//Basically, it edits the bytes of the memory to "\x0F\x94\xC0".
			//The number at the end, tells you how many bytes you are editing.
			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
		}
	}
}
DWORD WINAPI Lesson (LPVOID)
// This is just a dummy function that will be the code activate the main thread
{	
	Main();
	//Call the thread called Main
	return 1;
	//Finish of the thread.
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
// DllMain is an optional function for you to declare.
// It serves as the entry point for any DLL
{
	DisableThreadLibraryCalls(hDll);
	// Make a call to DisableThreadLibraryCalls with the hModule variable
	// as its argument; Doing this is an optimization trick to prevent
	// needless thread attach/detach messages from triggering further calls
	// to our DllMain function.
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		//When this dll is injected into the process. this is what the dll is supposed to do.
		// Null, in C Plus Plus, nothing. It is defined as 0
		CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
		//It creates the thread called "Lesson" which is defined a few lines up. DWORD WINAPI Lesson (LPVOID)
	}
return TRUE;
// Although the return value doesn't actually matter. You return the value TRUE or FALSE indicatinng success or failure.

}
Have fun nubs.
The Super Bullets Addy is updated + correct

I wrote this tutorial for a friend of mine, but i decided to share it.
I commented on each line, and each bit to make it easier to understand what each and everything is doing.

Request Sticky?
Aok im gunna download this and leech the dll and call it my self
Quote Originally Posted by flameswor10 View Post
@SteamAss
Remove #include "stdafx.h"
I forgot to remove it ==
Ok Thanks what features does it got? bullet something...?
lol u gonna repost with that in it or just gonna leave it
Thanks.
Good for noobs like me
Quote Originally Posted by SteamAss View Post

Ok Thanks what features does it got? bullet something...?
Super Bullets.

Tested and Working.


I has a question. If you add norecoil in (#define RECOIL1 0x37473C70, 2, 3, 4, 5) in, would you put this for the test?

memcpy( (PBYTE)RECOIL1, (PBYTE)"\x33\xC0\xC0", 3 );
and 2, 3, 4, 5?
Quote Originally Posted by Cryptonic View Post


Super Bullets.

Tested and Working.


I has a question. If you add norecoil in (#define RECOIL1 0x37473C70, 2, 3, 4, 5) in, would you put this for the test?

memcpy( (PBYTE)RECOIL1, (PBYTE)"\x33\xC0\xC0", 3 );
and 2, 3, 4, 5?
you have to have the correct bytes and addy, but yest that is how you would do it
I am going to leech this and call it my own.. wait, mpgh is the only site of which i go on for Coders. NVM
Hey thank you very much this stuff help so much i am a newbie at c++ but i am trying to learn it not just for hacking but for other stuff to. but right now i am confuse at this (Variable,cin,functions,operators,declarations,pre processor,floating,booleans,integer,) well i just read them again and again but i just don't get it (Man i am stupid) sorry about that. i am a hard learner.

This code help me a lot to learn i am just going to learn the basic and stuff and move on fast as i could

Thank you very much

BlueSky
Posts 1–15 of 173 · Page 1 of 12
This thread is closed for replies.

Tags for this Thread

None

Talk with us