Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    sup h0wl's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    the arctic
    Posts
    624
    Reputation
    10
    Thanks
    1,945
    My Mood
    Sad

    Triggerbot Copy Pasta

    [Procmem.cpp]
    Code:
    #include "Process.h"
    
    
    using namespace std;
    
    #pragma region Misc Functions
    
    ProcMem::ProcMem(){
    	
    }
    
    ProcMem::~ProcMem(){
    
    	CloseHandle(hProcess);
    }
    
    
    int ProcMem::chSizeOfArray(char *chArray){
    
    
    	for(int iLength = 1; iLength < MAX_PATH; iLength++)
    		if (chArray[iLength] == '*')	
    			return iLength;	
    
    	cout << "\nLENGTH: Failed To Read Length Of Array\n";
    	return 0;
    } 
    
    
    int ProcMem::iSizeOfArray(int *iArray){
    
    
    	for(int iLength = 1; iLength < MAX_PATH; iLength++)
    		if (iArray[iLength] == '*')	
    			return iLength;	
    
    	cout << "\nLENGTH: Failed To Read Length Of Array\n";
    	return 0;
    } 
    
    
    bool ProcMem::iFind(int *iAry, int iVal){
    
    	for(int i = 0; i < 64; i++)
    		if(iVal == iAry[i] && iVal != 0)
    			return true;
    
    	return false;
    }
    
    #pragma endregion
    
    #pragma region Memory Functions
    
    
    void ProcMem::Process(char* ProcessName){
    
    
    	HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); 
    	PROCESSENTRY32 ProcEntry;
    	ProcEntry.dwSize = sizeof(ProcEntry); 
    
    
    	do
    	    if(!strcmp(ProcEntry.szExeFile, ProcessName))
    		{
    
    			dwPID = ProcEntry.th32ProcessID;
    			CloseHandle(hPID);
    
    
    	        hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID); 
    			return;
    		}
    	while(Process32Next(hPID, &ProcEntry));
    
    	cout << "\nNigga\n";
    	system("pause");
        exit(0);
    }
    
    
    void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts){
    
    
    	int iSize = chSizeOfArray(Default_Bts);		
    
    
    	if (!bPOn)
    		for(int i = 0; i < iSize; i++)	
    			Write<BYTE>(dwAddress + i, Patch_Bts[i]);		
    	else
    		for(int i = 0; i < iSize; i++)	 	
    			Write<BYTE>(dwAddress + i, Default_Bts[i]);        		        	
    
    	bPOn = !bPOn; 
    }
    
    
    void ProcMem::Inject(DWORD dwAddress, char *Inj_Bts, char *Def_Bts, BOOL Type){
    	
    
    	int i_ISize = chSizeOfArray(Inj_Bts);
    	int i_DSize = chSizeOfArray(Def_Bts); 
    
    	if(!bIOn)
    	{		
    
    		if(i_DSize > 5)
    			for (int i = 6; i < i_DSize; i++)
    				Write<BYTE>(dwAddress + i, 0x90);	
    		else {cout << "\nINJECTION: Default Bytes Must Be More Than 5\n"; return;}
    
    		
    		dwCaveAddress = (DWORD)VirtualAllocEx(hProcess, NULL,  i_ISize + 5, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
    
    		
    		DWORD dwRetJmp = (dwAddress + i_DSize) - dwCaveAddress - 5; 
    		DWORD dwBaseJmp = dwCaveAddress - dwAddress - 5; 
    
    	
    		for (int i = 0; i <= i_ISize; i++)			
    			Write<BYTE>(dwCaveAddress+i, Inj_Bts[i]);
    		
    		
    		Write<BYTE>(dwCaveAddress + i_ISize, Type ? 0xE9 : 0xE8);
    		Write<DWORD>(dwCaveAddress + i_ISize + 1, dwRetJmp);
    		
    		
    		Write<BYTE>(dwAddress, Type ? 0xE9 : 0xE8);
    		Write<DWORD>(dwAddress + 1, dwBaseJmp);
    
    	}else{			
    		
    		for(int i = 0; i < i_DSize; i++)					
    			Write<BYTE>(dwAddress + i, Def_Bts[i]);	
    
    		
    		VirtualFreeEx(hProcess, (LPVOID)dwCaveAddress, i_ISize + 5, MEM_DECOMMIT);
    	}
        bIOn = !bIOn; 
    } 
    
    
    DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes){
    
    
    	int iBytesToRead = 0, iTmp = 0;
    	int length = chSizeOfArray(Bytes);
    	bool bTmp = false;
    
    
    	if(Bytes[0] == '?')
    	{
    		for(; iBytesToRead < MAX_PATH; iBytesToRead++)
    			if(Bytes[iBytesToRead] != '?')
    			{
    				iTmp = (iBytesToRead + 1);
    				break;
    			}
    	}
    
    
    	for(;dwAddress < dwEnd; dwAddress++) 	
    	{			
    		if(iBytesToRead == length)
    			return dwAddress - iBytesToRead;
    
    		if(Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
    		{
    			iBytesToRead++;		
    			bTmp = true;
    		}
    		else
    		{
    			iBytesToRead = iTmp;	
    			bTmp = false;
    		}
    	}
    
    	cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n";
    	return 0;
    }
    
    
    DWORD ProcMem::Module(LPSTR ModuleName){
           
    
    	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID); 
    	MODULEENTRY32 mEntry; 
    	mEntry.dwSize = sizeof(mEntry); 
    	
    
    	do 
    		if(!strcmp(mEntry.szModule, ModuleName))
    		{
    			CloseHandle(hModule);			
    			return (DWORD)mEntry.modBaseAddr;	
    		}
    	while(Module32Next(hModule, &mEntry));
    	
    	cout << "\nCouldn't find client.dll, retrying...\n";
    	return 0;
    }
    
    #pragma endregion
    [Procmem.h]
    Code:
    #ifndef PROCMEM_H 
    #define PROCMEM_H 
    
    #define WIN32_LEAN_AND_MEAN 
    
    #pragma once
    
    #include <windows.h>
    #include <iostream> 
    #include <TlHelp32.h>
    #include <string>
    #include <sstream>
    
    
    class ProcMem{
    protected:
    
    	
    	HANDLE hProcess;
    	DWORD dwPID, dwProtection, dwCaveAddress;
    
    	
    	BOOL bPOn, bIOn, bProt;
    
    public:
    
    	
    	ProcMem();
    	~ProcMem();
        int chSizeOfArray(char *chArray); 
    	int iSizeOfArray(int *iArray); 
    	bool iFind(int *iAry, int iVal); 
    
    #pragma region TEMPLATE MEMORY FUNCTIONS
    
    	
    	template <class cData>
    	void Protection(DWORD dwAddress)
    	{	   
    		if(!bProt)
    			VirtualProtectEx(hProcess, (LPVOID)dwAddress, sizeof(cData), PAGE_EXECUTE_READWRITE, &dwProtection); 
    		else
    			VirtualProtectEx(hProcess, (LPVOID)dwAddress, sizeof(cData), dwProtection, &dwProtection); 
    
    		bProt = !bProt;
    	}
    
    	
    	template <class cData>
    	cData Read(DWORD dwAddress)
    	{
    		cData cRead; 
    		ReadProcessMemory(hProcess, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL); 
    		return cRead; 
    	}
        	
    	
    	template <class cData>
    	cData Read(DWORD dwAddress, char *Offset, BOOL Type)
    	{
    		
    		int iSize = iSizeOfArray(Offset) -1; 
            dwAddress = Read<DWORD>(dwAddress); 
    
    		
    		for (int i = 0; i < iSize; i++)	
    			dwAddress = Read<DWORD>(dwAddress + Offset[i]);
    
    		if (!Type)
    			return dwAddress + Offset[iSize]; 
    		else
    			return Read<cData>(dwAddress + Offset[iSize]); 
    	}
    
    	
    	template <class cData>
        void Write(DWORD dwAddress, cData Value)
    	{ 	
    		WriteProcessMemory(hProcess, (LPVOID)dwAddress, &Value, sizeof(cData), NULL); 
    	}
    
    	
    	template <class cData>
    	void Write(DWORD dwAddress, char *Offset, cData Value)
    	{ 
    			Write<cData>(Read<cData>(dwAddress, Offset, false), Value); 
    	}
    	
    	
    	virtual void Process(char* ProcessName);
    	virtual void Patch(DWORD dwAddress, char *chPatch_Bts, char *chDefault_Bts); 
    	virtual void Inject(DWORD dwAddress, char *chInj_Bts, char *chDef_Bts, BOOL Type); 
    	virtual DWORD AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *chPattern); 
    	virtual DWORD Module(LPSTR ModuleName); 
    
    #pragma endregion	
    
    };
    #endif

    [Triggerbot function]
    Code:
    /*triggerbot*/
    void trigger()
    {
    	while(true)
    	{
    		DWORD LocalBase = Mem.Read<DWORD>(ClientDll + LocalPlayer);
    		int localTeam = Mem.Read<int>(LocalBase + Team);
            if(Trigger)
            {
    			int enemyId = Mem.Read<int>(LocalBase + CrosshairID); 
    			int enemyAdress = Mem.Read<int>(ClientDll + EntityList + ((enemyId - 1) * 0x10)); 
    			int enemyHealth = Mem.Read<int>(enemyAdress + m_iHealth); 
    			int enemyTeam = Mem.Read<int>(enemyAdress + Team); 
    			if(localTeam != enemyTeam && enemyHealth > 0) 
    			{
    				mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
    				mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
    			}
            }
            Sleep(1);
        }
    }
    [Defines/ Includes]
    Code:
    #include <iostream>
    #include <Windows.h>
    #include <TlHelp32.h>
    #include "ProcMem.h"
    #include "offsets.h"
    #include <thread>
    
    /*define*/
    #ifndef MY_GLOBALS_H
    #define MY_GLOBALS_H
    
    #endif
    using namespace std;
    
    /*void*/
    void trigger();
    
    
    /*bool*/
    bool Trigger = false;
    
    
    /*client*/
    ProcMem Mem;
    DWORD ClientDll;
    [INT Main]
    Code:
    /*Main*/
    int main()
    {
    	thread t1(toggles);
    	thread t2(trigger);
        Mem.Process("csgo.exe");
    	ClientDll = Mem.Module("client.dll");
        t1.join();
        t2.join();
    }
    [Toggles Function]
    Code:
    /*toggles*/
    void toggles()
    {
        while (true)
        {
    		if(GetAsyncKeyState(VK_INSERT))
    		{
    			Trigger = !Trigger;
    		}
    		Sleep(1000);
        }
    }
    [Offsets header}
    Code:
    const DWORD CrosshairID = 0x2410;
    const DWORD attack = 0x02E8F2C8;
    const DWORD m_iHealth = 0xFC;
    const DWORD Team = 0xF0;
    const DWORD LocalPlayer = 0x00A7AFBC;
    const DWORD EntityList = 0x04A1D3A4;
    const DWORD m_fFlags = 0x100;

    Use an offset dumper to dump the offsets!



    Credits

    Nether - Memory Class
    Last edited by sup h0wl; 08-10-2015 at 04:47 PM.

  2. #2
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Quote Originally Posted by h0wl-kun View Post
    Code:
    t1.join();
    t2.join();
    Why are you creating threads if you just make them join the main thread again?

    The ctor starts the thread and join just makes the thread join the main thread (Or in whichever thread you call join).
    Read up: https://en.cppreference.com/w/cpp/thread/thread
    Last edited by Yemiez; 08-10-2015 at 01:09 PM.

  3. #3
    sup h0wl's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    the arctic
    Posts
    624
    Reputation
    10
    Thanks
    1,945
    My Mood
    Sad
    Quote Originally Posted by Dolphin View Post
    Why are you creating threads if you just make them join the main thread again?

    The ctor starts the thread and join just makes the thread join the main thread (Or in whichever thread you call join).
    Read up: https://en.cppreference.com/w/cpp/thread/thread
    idc, it's just a triggerbot source for people who want it, it works, so meh.

  4. #4
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Quote Originally Posted by h0wl-kun View Post


    idc, it's just a triggerbot source for people who want it, it works, so meh.
    Atleast fix the misstakes, whats the point of releasing it if its absolutely nothing new from the thousands of other sources?
    reputation?
    attention?

    For reals, fix the stuff so you dont pass the misstakes on to other copy pasters

  5. #5
    Radu97's Avatar
    Join Date
    May 2015
    Gender
    male
    Location
    Iasi
    Posts
    2,360
    Reputation
    67
    Thanks
    28,272
    My Mood
    Happy
    Quote Originally Posted by Dolphin View Post
    Atleast fix the misstakes, whats the point of releasing it if its absolutely nothing new from the thousands of other sources?
    reputation?
    attention?

    For reals, fix the stuff so you dont pass the misstakes on to other copy pasters
    i see what you did there haha . anyway , except for the toggle system how is this different compared to Motherflufferr one ?

  6. #6
    COD3RIN's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Posts
    5,309
    Reputation
    468
    Thanks
    28,779
    My Mood
    Angelic
    you leech neither source code kid
    ᚛C☢dℝin3᚜
    Love you.
    ~Kenshit13
    Quote Originally Posted by cheaterman26 View Post
    COD3RIN PUT A BACKDOOR ON HIS OWN CHEAT HE HACK MY COMPUTER AND MY STEAM, DON'T TRUST THIS GUYS !



  7. #7
    sup h0wl's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    the arctic
    Posts
    624
    Reputation
    10
    Thanks
    1,945
    My Mood
    Sad
    Quote Originally Posted by COD3RIN View Post
    you leech neither source code kid
    lol kek, i didn't leech any source kid this is straight from my private cheat that i use, and who is neither?

  8. #8
    Block4o's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    /r/capitalism
    Posts
    197
    Reputation
    55
    Thanks
    8,563
    My Mood
    Asleep
    Quote Originally Posted by COD3RIN View Post
    you leech neither source code kid
    Firstly it's not neither it's Nether. And who are you to judge? You're the biggest c&per around mpgh (no offense). Don't call somebody a leecher unless you're sure about it.

  9. #9
    PhY'z's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    518
    Reputation
    58
    Thanks
    1,310
    My Mood
    Angelic
    Quote Originally Posted by h0wl-kun View Post

    Code:
    const DWORD m_fFlags = 0x100;
    Why??? u don't even use fFlag .-.


    ------------------
    Quote Originally Posted by Dolphin View Post
    Atleast fix the misstakes, whats the point of releasing it if its absolutely nothing new from the thousands of other sources?
    reputation?
    attention?

    For reals, fix the stuff so you dont pass the misstakes on to other copy pasters
    Plz back as PsychoBitch ):
    Last edited by PhY'z; 08-10-2015 at 02:37 PM.

  10. #10
    sup h0wl's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    the arctic
    Posts
    624
    Reputation
    10
    Thanks
    1,945
    My Mood
    Sad
    Quote Originally Posted by Adri308 View Post
    Why??? u don't even use fFlag .-.


    ------------------


    Plz back as PsychoBitch ):
    Dolphin is a better name for him also, i just took the offsets from my offset header.

  11. #11
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Quote Originally Posted by Adri308 View Post
    Plz back as PsychoBitch ):
    I'm not the one who chose the name, if you haven' noticed Dave renamed all staff to animals lol

  12. #12
    PhY'z's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    518
    Reputation
    58
    Thanks
    1,310
    My Mood
    Angelic
    Quote Originally Posted by Dolphin View Post
    I'm not the one who chose the name, if you haven' noticed Dave renamed all staff to animals lol
    .-. sorry didn't noticed that, btw i like flamingo .-.

  13. #13
    stumail's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    0
    Am I just dumb?


    'int strcmp(const char *,const char *)': cannot convert argument 1 from 'WCHAR [260]' to 'const char *'

    Relating to this:

    if (!strcmp(ProcEntry.szExeFile, ProcessName))

    with ProcEntry.szExeFile being whats causing the error.


    Never mind I realised why I was so stupid...
    Last edited by stumail; 08-10-2015 at 03:51 PM.

  14. #14
    Radu97's Avatar
    Join Date
    May 2015
    Gender
    male
    Location
    Iasi
    Posts
    2,360
    Reputation
    67
    Thanks
    28,272
    My Mood
    Happy
    Quote Originally Posted by stumail View Post
    Am I just dumb?


    'int strcmp(const char *,const char *)': cannot convert argument 1 from 'WCHAR [260]' to 'const char *'

    Relating to this:

    if (!strcmp(ProcEntry.szExeFile, ProcessName))

    with ProcEntry.szExeFile being whats causing the error.


    Never mind I realised why I was so stupid...
    go to options and change to multibyte characters

  15. #15
    stumail's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    0
    Yeah I already realized that hence "Never mind I realised why I was so stupid..."

Page 1 of 2 12 LastLast

Similar Threads

  1. [Outdated] ScrubLawd v1337 (Shitty copy pasta hack)
    By gtaplayer2 in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 30
    Last Post: 09-20-2015, 08:33 PM
  2. [Release] Justiniscool5 VIP Copy Pasta Skid Base Leak
    By Herpina in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 65
    Last Post: 07-21-2013, 03:40 AM
  3. [Release] COPY & PASTA (ptc) Set console variables| patch info's & changes
    By Neutrino994 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 32
    Last Post: 02-22-2013, 04:37 AM
  4. Infant-Free Copied?!?
    By Flawless in forum General
    Replies: 43
    Last Post: 11-26-2009, 02:00 AM
  5. Google Having To Copy Ideas?
    By Dave84311 in forum General
    Replies: 11
    Last Post: 01-20-2008, 09:05 AM