Tutorial How to make a DLL hack for BO2

Hue

Veteran
Messages
20
Reaction score
18
Points
793
This is a tutorial on how to make a dll hack for BO2 or it could be transfered to any other PC game but you need the offsets.

Step 1:
Image
YZPfOpc.png
Create a new project in Visual Studio (You Can Use Any Visual Studio)
"File" > "New" > "Project"

Step 2:
Image
tzOf5ET.png
Click Visual C++ Then click Win32 Project and click "OK"

Step 3:
Image
SyqfSop.png
Click "DLL" > "Empty Project" > "Finish"

Step 4:
Image
go0e8X7.png
Right click "Source Files" > "Add" > "New Item"

Step 5:
Image
NU0zuUU.png
Then click C++ File and name it "main"

Step 6:
At the top put this
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;

Step 7:
Hit enter and add this
DWORD WINAPI LoopFunction( LPVOID lpParam )
{

HANDLE Daddy = GetCurrentProcess();

cout << "<Hues BO2 Dll Hack>" << endl;
cout << endl;
cout << "F1 = Cycle Camos" << endl;
cout << "F2 = Toggle Recoil" << endl;
cout << "F3 = Toggle FPS" << endl;
cout << "F11 = Close Console" << endl;

while(1)
{
if(GetAsyncKeyState(VK_F11))
{
FreeConsole();
}
Sleep(1000);
return 0;
}

For the "if(GetAsyncKeyState(VK_F11))" you can change the "VK_F11" to any key

Step 8:
At the bottom put this
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
AllocConsole();
AttachConsole(ATTACH_PARENT_PROCESS);
system("Color A");
}
return 1;
}

Step 9:
Heres how to add a mod
qOmNDxE.png


bool Recxil = false;

BYTE RecoilOn[] = {0x75};
BYTE RecoilOff[] = {0x74};


Or8wIUo.png

if(GetAsyncKeyState(VK_F2))
{
if(Recxil == false)
{
Recxil = true;
WriteProcessMemory(Daddy,(void*)(0x5C6219), &RecoilOff, 1, 0);
}
else
{
WriteProcessMemory(Daddy,(void*)(0x5c6219), &RecoilOn, 1, 0);
Recxil = false;
}
}

Again you can change the "VK_F2" to your liking

Step 10:
Image
mtnune3.png
For this step all you do is click "Build" then "Rebuild Solution"

Step 11:
Image
rTkWNRj.png
The DLL should appear in the "Debug" folder, Now you just inject the dll while BO2 is running

How to inject the dll:
q9fZVFv.png
Lastly you click "Memory View" > "Tools" > "Inject DLL" and select the DLL


Hope you enjoyed this tutorial!
Download Cheat Engine:
You do not have permission to view link Log in or register now.
 

WoodenFloorBoard

New Member
Messages
16
Reaction score
9
Points
3
This is a tutorial on how to make a dll hack for BO2 or it could be transfered to any other PC game but you need the offsets.

Step 1:
Image
YZPfOpc.png
Create a new project in Visual Studio (You Can Use Any Visual Studio)
"File" > "New" > "Project"

Step 2:
Image
tzOf5ET.png
Click Visual C++ Then click Win32 Project and click "OK"

Step 3:
Image
SyqfSop.png
Click "DLL" > "Empty Project" > "Finish"

Step 4:
Image
go0e8X7.png
Right click "Source Files" > "Add" > "New Item"

Step 5:
Image
NU0zuUU.png
Then click C++ File and name it "main"

Step 6:
At the top put this
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;

Step 7:
Hit enter and add this
DWORD WINAPI LoopFunction( LPVOID lpParam )
{

HANDLE Daddy = GetCurrentProcess();

cout << "<Hues BO2 Dll Hack>" << endl;
cout << endl;
cout << "F1 = Cycle Camos" << endl;
cout << "F2 = Toggle Recoil" << endl;
cout << "F3 = Toggle FPS" << endl;
cout << "F11 = Close Console" << endl;

while(1)
{
if(GetAsyncKeyState(VK_F11))
{
FreeConsole();
}
Sleep(1000);
return 0;
}

For the "if(GetAsyncKeyState(VK_F11))" you can change the "VK_F11" to any key

Step 8:
At the bottom put this
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
AllocConsole();
AttachConsole(ATTACH_PARENT_PROCESS);
system("Color A");
}
return 1;
}

Step 9:
Heres how to add a mod
qOmNDxE.png


bool Recxil = false;

BYTE RecoilOn[] = {0x75};
BYTE RecoilOff[] = {0x74};


Or8wIUo.png

if(GetAsyncKeyState(VK_F2))
{
if(Recxil == false)
{
Recxil = true;
WriteProcessMemory(Daddy,(void*)(0x5C6219), &RecoilOff, 1, 0);
}
else
{
WriteProcessMemory(Daddy,(void*)(0x5c6219), &RecoilOn, 1, 0);
Recxil = false;
}
}

Again you can change the "VK_F2" to your liking

Step 10:
Image
mtnune3.png
For this step all you do is click "Build" then "Rebuild Solution"

Step 11:
Image
rTkWNRj.png
The DLL should appear in the "Debug" folder, Now you just inject the dll while BO2 is running

How to inject the dll:
q9fZVFv.png
Lastly you click "Memory View" > "Tools" > "Inject DLL" and select the DLL


Hope you enjoyed this tutorial!
Download Cheat Engine:
You do not have permission to view link Log in or register now.
I thought you weren't going to try and make DLL hacks? :tonguewink: Anyways, good job!
 

Throwie

Veteran
Messages
313
Reaction score
80
Points
803
Really good for beginners to scripting. Its way more easier to follow than making a menu from scratch!
 

isaiah johnson

New Member
Messages
1
Reaction score
0
Points
1
hey i dont know if you'll respond and im new to coding, i understand some of it. but when i build it, i get errors :disappointed:
i got 6 errors and some have to do with "dwattached" not being defined maybe you vould post a pic of how its supposed to look?
 

InUrFace

Insane-Known Member
Messages
24
Reaction score
12
Points
368
This is a tutorial on how to make a dll hack for BO2 or it could be transfered to any other PC game but you need the offsets.

Step 1:
Image
YZPfOpc.png
Create a new project in Visual Studio (You Can Use Any Visual Studio)
"File" > "New" > "Project"

Step 2:
Image
tzOf5ET.png
Click Visual C++ Then click Win32 Project and click "OK"

Step 3:
Image
SyqfSop.png
Click "DLL" > "Empty Project" > "Finish"

Step 4:
Image
go0e8X7.png
Right click "Source Files" > "Add" > "New Item"

Step 5:
Image
NU0zuUU.png
Then click C++ File and name it "main"

Step 6:
At the top put this
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;

Step 7:
Hit enter and add this
DWORD WINAPI LoopFunction( LPVOID lpParam )
{

HANDLE Daddy = GetCurrentProcess();

cout << "<Hues BO2 Dll Hack>" << endl;
cout << endl;
cout << "F1 = Cycle Camos" << endl;
cout << "F2 = Toggle Recoil" << endl;
cout << "F3 = Toggle FPS" << endl;
cout << "F11 = Close Console" << endl;

while(1)
{
if(GetAsyncKeyState(VK_F11))
{
FreeConsole();
}
Sleep(1000);
return 0;
}

For the "if(GetAsyncKeyState(VK_F11))" you can change the "VK_F11" to any key

Step 8:
At the bottom put this
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
AllocConsole();
AttachConsole(ATTACH_PARENT_PROCESS);
system("Color A");
}
return 1;
}

Step 9:
Heres how to add a mod
qOmNDxE.png


bool Recxil = false;

BYTE RecoilOn[] = {0x75};
BYTE RecoilOff[] = {0x74};


Or8wIUo.png

if(GetAsyncKeyState(VK_F2))
{
if(Recxil == false)
{
Recxil = true;
WriteProcessMemory(Daddy,(void*)(0x5C6219), &RecoilOff, 1, 0);
}
else
{
WriteProcessMemory(Daddy,(void*)(0x5c6219), &RecoilOn, 1, 0);
Recxil = false;
}
}


Again you can change the "VK_F2" to your liking

Step 10:
Image
mtnune3.png
For this step all you do is click "Build" then "Rebuild Solution"

Step 11:
Image
rTkWNRj.png
The DLL should appear in the "Debug" folder, Now you just inject the dll while BO2 is running

How to inject the dll:
q9fZVFv.png
Lastly you click "Memory View" > "Tools" > "Inject DLL" and select the DLL


Hope you enjoyed this tutorial!
Download Cheat Engine:
You do not have permission to view link Log in or register now.

Lmao this man actually made a dll in one source file, no classes, no headers, nothing. He injecting with cheat engine too, rofl. Don't follow this tiddly winker's shady tutorial, have fun getting tac'd in bo2 lololololol
 
Top