Sorry, you don't have access to the chatbox yet, VIPs and people with more than 2 posts get access to the chatbox :)


Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C++] Trainer Base
17-08-2010, 06:12 PM, (This post was last modified: 17-08-2010, 06:30 PM by MMOhax.)
Post: #1
[C++] Trainer Base
PHP Code:
// www.MMOhax.com

// includes
#include <Windows.h>
#include <stdio.h>
#include <tlhelp32.h>

// variable declaration
int adrTime 0x0100579C// this is the address where time-variable is located in Windows XP Minesweeper, get this with Cheat Engine
HANDLE hProcess NULL;
DWORD dwProcessId 0;

// gets process id of given image name
DWORD GetProcessIdByName(WCHARszExeName)
{
    
PROCESSENTRY32 pe = { sizeof(PROCESSENTRY32) };
    
HANDLE hSnapshot CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS0); // get all running processes

    
if(Process32First(hSnapshot, &pe))
    { 
// if any process in list
        
while(Process32Next(hSnapshot, &pe))
        { 
// iterate the list of running processes
            
if(!wcscmp(pe.szExeFileszExeName))
            { 
// if current process entry is the one we're looking for
                
return pe.th32ProcessID// return process id
            
}
        }
    }

    return 
NULL;
}

int main()
{

    while(
1// always
    
{
        
dwProcessId GetProcessIdByName(L"winmine.exe"); // winmine.exe is Windows XP Minesweeper

        
if(dwProcessId == 0) { return 0; } // game process not found (probably closed), let our trainer die

        // open process and save the handle of it
        // we start looking up OpenProcess at MSDN http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx
        // "The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of the process access rights."
        // click the link to "process access rights", http://msdn.microsoft.com/en-us/library/ms684880(v=VS.85).aspx
        // PROCESS_ALL_ACCESS  -  All possible access rights for a process object.
        // yeah, we might aswell use that
        
hProcess OpenProcess(PROCESS_ALL_ACCESSfalsedwProcessId);

        
// set game timer to 0
        
int newTime 0;
        
WriteProcessMemory(hProcess, (void*)adrTime, &newTime4/*an int is 4 bytes in size*/0);
    }

Download as Visual Studio 2010 Project
[Image: sitelogo.png]
Reply
17-08-2010, 07:48 PM,
Post: #2
RE: [C++] Trainer Base
Thanks for this, really appreciate it Smile
Reply
10-04-2011, 02:54 PM, (This post was last modified: 10-04-2011, 02:54 PM by Volcomskater2.)
Post: #3
RE: [C++] Trainer Base
Im sorry but I dont get it how do you make an aimbot out of this? Please help.
Reply
10-04-2011, 08:12 PM,
Post: #4
RE: [C++] Trainer Base
I think, you must learn C++, and have programs..
I dont understand either, but Its too hard for me.
Reply
15-06-2011, 03:01 AM,
Post: #5
RE: [C++] Trainer Base
Yes me 2
Im on it (i mean to learn the c++ languange...Java too)
but i have a question!!!?? how the f***ing hell u find a cheat engine without a virus, eh???
my norton always found a virus (by your cds 2 a heuristic virus, or something like that)
pls post the link 4 me and the other players!!
thnx
I am more than a gamer, I am more than a programmer, Im a hacker

MMOHAX!
only the brave
Reply
30-01-2015, 02:08 AM,
Post: #6
RE: [C++] Trainer Base
(17-08-2010, 06:12 PM)MMOhax Wrote:
PHP Code:
// www.MMOhax.com

// includes
#include <Windows.h>
#include <stdio.h>
#include <tlhelp32.h>

// variable declaration
int adrTime 0x0100579C// this is the address where time-variable is located in Windows XP Minesweeper, get this with Cheat Engine
HANDLE hProcess NULL;
DWORD dwProcessId 0;

// gets process id of given image name
DWORD GetProcessIdByName(WCHARszExeName)
{
    
PROCESSENTRY32 pe = { sizeof(PROCESSENTRY32) };
    
HANDLE hSnapshot CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS0); // get all running processes

    
if(Process32First(hSnapshot, &pe))
    { 
// if any process in list
        
while(Process32Next(hSnapshot, &pe))
        { 
// iterate the list of running processes
            
if(!wcscmp(pe.szExeFileszExeName))
            { 
// if current process entry is the one we're looking for
                
return pe.th32ProcessID// return process id
            
}
        }
    }

    return 
NULL;
}

int main()
{

    while(
1// always
    
{
        
dwProcessId GetProcessIdByName(L"winmine.exe"); // winmine.exe is Windows XP Minesweeper

        
if(dwProcessId == 0) { return 0; } // game process not found (probably closed), let our trainer die

        // open process and save the handle of it
        // we start looking up OpenProcess at MSDN http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx
        // "The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of the process access rights."
        // click the link to "process access rights", http://msdn.microsoft.com/en-us/library/ms684880(v=VS.85).aspx
        // PROCESS_ALL_ACCESS  -  All possible access rights for a process object.
        // yeah, we might aswell use that
        
hProcess OpenProcess(PROCESS_ALL_ACCESSfalsedwProcessId);

        
// set game timer to 0
        
int newTime 0;
        
WriteProcessMemory(hProcess, (void*)adrTime, &newTime4/*an int is 4 bytes in size*/0);
    }

Download as Visual Studio 2010 Project
what is the trainer for?
Reply
31-01-2015, 01:51 AM,
Post: #7
RE: [C++] Trainer Base
(30-01-2015, 02:08 AM)fayeheart Wrote:
(17-08-2010, 06:12 PM)MMOhax Wrote:
PHP Code:
// www.MMOhax.com

// includes
#include <Windows.h>
#include <stdio.h>
#include <tlhelp32.h>

// variable declaration
int adrTime 0x0100579C// this is the address where time-variable is located in Windows XP Minesweeper, get this with Cheat Engine
HANDLE hProcess NULL;
DWORD dwProcessId 0;

// gets process id of given image name
DWORD GetProcessIdByName(WCHARszExeName)
{
    
PROCESSENTRY32 pe = { sizeof(PROCESSENTRY32) };
    
HANDLE hSnapshot CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS0); // get all running processes

    
if(Process32First(hSnapshot, &pe))
    { 
// if any process in list
        
while(Process32Next(hSnapshot, &pe))
        { 
// iterate the list of running processes
            
if(!wcscmp(pe.szExeFileszExeName))
            { 
// if current process entry is the one we're looking for
                
return pe.th32ProcessID// return process id
            
}
        }
    }

    return 
NULL;
}

int main()
{

    while(
1// always
    
{
        
dwProcessId GetProcessIdByName(L"winmine.exe"); // winmine.exe is Windows XP Minesweeper

        
if(dwProcessId == 0) { return 0; } // game process not found (probably closed), let our trainer die

        // open process and save the handle of it
        // we start looking up OpenProcess at MSDN http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx
        // "The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of the process access rights."
        // click the link to "process access rights", http://msdn.microsoft.com/en-us/library/ms684880(v=VS.85).aspx
        // PROCESS_ALL_ACCESS  -  All possible access rights for a process object.
        // yeah, we might aswell use that
        
hProcess OpenProcess(PROCESS_ALL_ACCESSfalsedwProcessId);

        
// set game timer to 0
        
int newTime 0;
        
WriteProcessMemory(hProcess, (void*)adrTime, &newTime4/*an int is 4 bytes in size*/0);
    }

Download as Visual Studio 2010 Project
what is the trainer for?

To pratice C++
MMOHAX GRP SETTINGS http://imgur.com/j80wKuS.png
MMOHAX BFH SETTINGS http://imgur.com/Jhkcu6o.png
The MMOHAX Staff http://mmohax.com/forums/Announcement-The-MMOhax-Staff
Need help? Send me a message.
Reply




Users browsing this thread: 1 Guest(s)