[TUT][ How to create game DLL's ]

C / C++ Discuss, [TUT][ How to create game DLL's ] at Programmers Lounge forum; Build A Hack In C++ 6 Which call a DLL Originally Posted by Dittiox Comment: As example is here used ...


Go Back   Gamerz Needs - For All Your Gaming Needs! > Technology Zone > Programmers Lounge > C / C++
Forgot Password? | Sign Up!

Notices

Advertisement
   

Reply
 
Bookmark this Thread Tools Display Modes
  #1  
Old 07-04-2008, 03:32 AM
Dittiox's Avatar
Double Silver Axe
 
Last Online: 11-29-2008 10:26 AM
Join Date: May 2008
Location: Netherlands
Age: 14
Posts: 115
Thanks: 8
Thanked 83 Times in 19 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 2
Dittiox is on a distinguished road
Points: 40,182.58
Bank: 0.00
Total Points: 40,182.58
Black - Dittiox Gold - Dittiox Gold - Dittiox Black - Dittiox Black - Dittiox 
Black - Dittiox Gold - Dittiox Black - Dittiox Gold - Dittiox Black - Dittiox 
Black - Dittiox Gold - Dittiox Black - Dittiox Black - Dittiox Gold - Dittiox 
Black - Dittiox Gold - Dittiox Gold - Dittiox Gold - Dittiox Gold - Dittiox 
[TUT][ How to create game DLL's ]

Build A Hack In C++ 6
Which call a DLL

Quote:
Originally Posted by Dittiox
Comment:
As example is here used the game "WarRock"
Need:

* Brain (Not a dumb one !)
* Basic Knowledge Of C++
* Visual C++ 6

Stage:

* Code a Dll with our hack functions included:
* 1. Stamina();
* 2. Teleport(x, y, z);

* Create a new MFC project with features:
* 1. Load our Dll
* 2. Define & Export functions from the Dll
* 3. Stamina Timer
* 4. Teleport choosen location

Get To Work(Dll) !

* Create a new Win32 Dynamic-Link Library Project, Call it ("LH1337DLL")
* Choose A simple DLL project
* Add 3 new file to the project: {Text File, "LH1337DLL.def"} {Source, "functions"} {Header, "functions"}
* Add this code into functions.cpp:

Code:
#include "stdafx.h"
#include "functions.h"

DWORD dfgiddfg;
HANDLE dfgdsgdsg;

void OpenMemory()
{
HWND frgss = FindWindow(0, "WarRock");
GetWindowThreadProcessId(frgss, &dfgiddfg);
dfgdsgdsg = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, dfgiddfg);
}


void Stamina()
{
    int t=1120403456;
    OpenMemory();
    WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)0x8B9B04, &t , 4,NULL);
}

void Teleport(float x, float y, float z)
{
    long raddyx, raddyy, raddyz; // Real address of coordinates
    long readxyz;                 // Read base address

    ReadProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)0x1279280, &readxyz, 4,NULL);

    raddyx = readxyz + 0x174;
    raddyy = readxyz + 0x17C;
    raddyz = readxyz + 0x178;

    WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyx, &x , 4,NULL);
    WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyy, &y , 4,NULL);
    WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyz, &z , 4,NULL);
}
* Add this code into functions.h:

Code:
#pragma once

void Stamina();
void Teleport(float x, float y, float z);
* Add this code into LH1337DLL.def:

Code:
LIBRARY LH1337DLL

EXPORTS
    Stamina
    Teleport

DLL Finished !!!

Get To Work(Exe) !

* Create a MFC Project, call it ("LH1337EXE")
* Choose, Dialog based.
* Add 2 button {Refill Stamina, Teleport}
* Add 3 Edit Box. (X, Y, Z)
* Make 3 new member variable. {X->m_cox} {Y->m_coy} {Z->m_coz}
* Add this code in LH1337EXEDlg.cpp at top after all '#include':

Code:
HINSTANCE hDLL = NULL;


// 1) Teleport
typedef void (*STAMINA)();
STAMINA Stamina;


// 2) Teleport
typedef void (*TELEPORT)(float x, float y, float z);
TELEPORT Teleport;
* Go to the OnInitDialog() function and add this code:

Code:
hDLL = AfxLoadLibrary("LH1337DLL");

    if( hDLL == NULL )
    {
        MessageBox("Could not load LH1337DLL.dll");
    }
    else
    {
     Stamina = (STAMINA)GetProcAddress(hDLL, "Stamina");
     Teleport = (TELEPORT)GetProcAddress(hDLL, "Teleport");
    }
* Now, add a BN_CLICKED event the Refill Stamina button and add this code:

Code:
Stamina();
* Now, add a BN_CLICKED event the Teleport button and add this code:

Code:
    UpdateData(1);
    Teleport(m_cox, m_coy, m_coz);
Hack is finished !
Source Code: Download
Binary: Download


Credits:
[D X T]LegendaryHacker1337[D X T]
Copyright ® D X T Team - MPGH Forums
The Following 5 Users Say Thank You to Dittiox For This Useful Post:
HellDragonIV (08-07-2008), iamkim (11-11-2008), kaswar (07-04-2008), OuTOfTime (07-10-2008), SacredBlack (07-27-2008)
  #2  
Old 07-04-2008, 07:03 AM
kaswar's Avatar
Registered Users +
 
Last Online: Today 12:03 PM
Join Date: Nov 2006
Location: Location:
Posts: 2,064
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 11
kaswar will become famous soon enough
Points: 1,091.40
Bank: 110,398.61
Total Points: 111,490.01
Here ya go. Don't get drunk! O.O - joriannn Marked as kashin's property. (One of the four Mighty Titans led by sir SpaceCake) - kashin Merry christmas and seriously i couldnt find any other gift - ItsmYarD Merry Christmas N Happy New Years!!! - BiGbAnG to karwas. Bang - stormer320 
gotcha RPKMHFTAGUITALABPC - ROVE ure not drunk enough yet - swordmas754 
Gold - Wizxon Green - swordmas754 Green - swordmas754 
Send a message via MSN to kaswar
That....was.....AWESOME!

It works perfectly And I read through All the Code.

But Good look Bypassing WriteProcessMemory In Kernel and Usermode


too bad this tutorial isn't in Delphi

ohh well I know how to do this anyway
__________________
Ha I'm back whatever
  #3  
Old 07-06-2008, 11:42 AM
wassssup34579's Avatar
Diamond Hole
 
Last Online: Today 05:09 PM
Join Date: Jan 2007
Location: California
Posts: 756
Blog Entries: 1
Thanks: 144
Thanked 100 Times in 51 Posts
Nominated 6 Times in 3 Posts
TOTW/F/M Award(s): 0
Latest Blog: blahh!!!
Rep Power: 6
wassssup34579 will become famous soon enough
Points: 1,606.00
Bank: 95,830.04
Total Points: 97,436.04
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 No Message - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 Black - wassssup34579 
Send a message via AIM to wassssup34579 Send a message via MSN to wassssup34579
whats the point of creating dll's that you call functions out of, when you could just hardcode it into the exe in the first place? and why not just create a dll that directly writes to memory?
  #4  
Old 07-07-2008, 05:33 AM
Xabber's Avatar
Silver Dragon
 
Last Online: 11-06-2008 09:08 AM
Join Date: Feb 2006
Location: The Netherlands
Posts: 1,141
Thanks: 154
Thanked 541 Times in 126 Posts
Nominated 1 Time in 1 Post
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 9
Xabber is on a distinguished road
Points: 2,057.86
Bank: 380.82
Total Points: 2,438.68
Send a message via MSN to Xabber
You might want to explain your code, or at least comment it.
__________________
If I did help you, please don't press the rep/thanks button. I did it because I did want to help you, not to gain rep/thanks!
  #5  
Old 07-07-2008, 08:02 AM
kaswar's Avatar
Registered Users +
 
Last Online: Today 12:03 PM
Join Date: Nov 2006
Location: Location:
Posts: 2,064
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 11
kaswar will become famous soon enough
Points: 1,091.40
Bank: 110,398.61
Total Points: 111,490.01
Here ya go. Don't get drunk! O.O - joriannn Marked as kashin's property. (One of the four Mighty Titans led by sir SpaceCake) - kashin Merry christmas and seriously i couldnt find any other gift - ItsmYarD Merry Christmas N Happy New Years!!! - BiGbAnG to karwas. Bang - stormer320 
gotcha RPKMHFTAGUITALABPC - ROVE ure not drunk enough yet - swordmas754 
Gold - Wizxon Green - swordmas754 Green - swordmas754 
Send a message via MSN to kaswar
He doesn't know programming all hi did was release the tutorial made from Team D X T
__________________
Ha I'm back whatever
  #6  
Old 07-09-2008, 08:01 AM
1k Points Wasted
 
Last Online: Yesterday 02:08 PM
Join Date: Aug 2006
Location: over there
Posts: 2,219
Blog Entries: 6
Thanks: 48
Thanked 172 Times in 134 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog: Very random blog entries (based on time)
Rep Power: 13
cosmeo3000 will become famous soon enoughcosmeo3000 will become famous soon enough
Points: 6,003.76
Bank: 89,660.72
Total Points: 95,664.48
Black - cosmeo3000 
Send a message via MSN to cosmeo3000
I decided I wanted to learn this but I found out it was MFC so too bad (Just going to learn WinAPI for now, it's so hard to remember xD)
__________________

Dam my other one won't animate for some reason o_O
  #7  
Old 07-09-2008, 12:05 PM
Chick
 
Last Online: 07-11-2008 02:51 AM
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
togamezone is on a distinguished road
Points: 38.00
Bank: 0.00
Total Points: 38.00
Hmm i really like it !.!
-----------------This post was merged together. In future use the edit button.-----------------

But I programing Wery much Its Easy
I maked a game Self It was online And Beta!I think i gonna add it Later

Last edited by togamezone; 07-09-2008 at 12:06 PM.. Reason: Automerged Doublepost
  #8  
Old 07-09-2008, 02:19 PM
1k Points Wasted
 
Last Online: Yesterday 02:08 PM
Join Date: Aug 2006
Location: over there
Posts: 2,219
Blog Entries: 6
Thanks: 48
Thanked 172 Times in 134 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog: Very random blog entries (based on time)
Rep Power: 13
cosmeo3000 will become famous soon enoughcosmeo3000 will become famous soon enough
Points: 6,003.76
Bank: 89,660.72
Total Points: 95,664.48
Black - cosmeo3000 
Send a message via MSN to cosmeo3000
Quote:
Originally Posted by togamezone View Post
Hmm i really like it !.!
-----------------This post was merged together. In future use the edit button.-----------------

But I programing Wery much Its Easy
I maked a game Self It was online And Beta!I think i gonna add it Later
Games with C++? Because that's hard, you will need to learn DirectX as well as a lot of C++, but with RPG maker or Game Maker... then that's just easy xD
__________________

Dam my other one won't animate for some reason o_O
  #9  
Old 07-10-2008, 01:58 AM
Chick
 
Last Online: 07-11-2008 02:51 AM
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
togamezone is on a distinguished road
Points: 38.00
Bank: 0.00
Total Points: 38.00
Yay I use c++ Its very hard!
If someone Have A pROGRAMER oR GAME MAKER jobb for me free I take it
  #10  
Old 07-25-2008, 01:32 PM
The Legend
 
Last Online: 08-12-2008 04:52 PM
Join Date: Jul 2008
Location: Stalkers...
Posts: 94
Thanks: 20
Thanked 61 Times in 19 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
GzNPrize is on a distinguished road
Points: 949.70
Bank: 0.00
Total Points: 949.70
CHEERS... - TheMangoKid EAT HEALTHY! - iPromiseJr Tasty Banana - GzNPrize 
Send a message via MSN to GzNPrize
@togamezone Learn some English and improve your grammer, 2nd people wont do free jobs, get it threw that mind of yours. Sorry for being harsh...
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump