Thread: Basic DLL

Results 1 to 6 of 6
  1. #1
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool

    Thumbs up Basic DLL

    Code:
    /*
    
    Basic DLL
    
    */
    
    #include <windows.h>
    #include <stdio.h>
    
    // Pointers
    
    #define pointer 0x00000000
    #define offset1 0x00000000
    
    // Global variables
    
    
    bool activated = false;
    unsigned long ClientOffset;
    //unsigned long ingame = 0x1B8B054;
    bool* ingame;
    HANDLE setting;
    
    void set()
    {
    	unsigned long address;
    	//unsigned long old_p;
    
    	while (true)
    	{
    		if (*ingame)
    		{
    			address = ClientOffset + pointer;
    
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset1;
    			
    			// Set the address
    
    			if (IsBadWritePtr((void*)address, 4) == NULL)
    				*(int*)address = 0;
    
    			//VirtualProtect((void*)address, 4, PAGE_READONLY, &old_p);
    		}
    
    		Sleep(1000);// every death it resets, so it is OK
    	}
    }
    
    void reset()
    {
    	unsigned long address = ClientOffset + pointer;
    	if (IsBadReadPtr((void*)address, 4) != NULL) return;// It is already disabled
    	address = *(unsigned long*)address + offset1;
    	if (IsBadWritePtr((void*)address, 4) != NULL) return;
    
    	// Here you reset the address
    
    	*(int*)address = 0;// int = 4 bytes
    }
    
    void is_activated()
    {
    	while (true)
    	{
    		if (GetAsyncKeyState(VK_END) &0x8000)
    		{
    			if (*ingame)
    			{
    				if (!activated)
    				{
    					ResumeThread(setting);
    
    					activated = true;
    
    					Beep(1000, 100);
    				}
    				else
    				{
    					SuspendThread(setting);
    					reset();
    					activated = false;
    
    					Beep(750, 300);
    				}
    			}
    			
    			Sleep(900);// If he pressed the key longer than 30ms then this will stop him from toggling it again, hopefully
    		}
    		else Sleep(30);//Not to overload the CPU. He can't press the key shorter than 15ms. 30ms on average
    	}
    }
    
    void main()
    {
    	Beep(1000, 100);
    
    	// Could be injected earlier than expected
    
    	while (!(ClientOffset = (unsigned long)GetModuleHandle(NULL)))
    		Sleep(100);
    	
    	ingame = (bool*)(ClientOffset + 0x1B8B054);
    
    	HANDLE checking;
    
    	try
    	{
    		if ((checking = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)is_activated, NULL, CREATE_SUSPENDED, NULL)) == NULL)
    			throw "Couldn't create a thread to execute within the virtual address space of the calling process.(2)";
    
    		if ((setting = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)set, NULL, CREATE_SUSPENDED, NULL)) == NULL)
    			throw "Couldn't create a thread to execute within the virtual address space of the calling process.(3)";
    	}
    	catch ( LPCSTR error )
    	{
    		MessageBox(NULL, error, "Error", MB_OK | MB_ICONERROR);
    		return;
    	}
    	
    	//if (SetThreadPriority(setting, THREAD_PRIORITY_BELOW_NORMAL) == NULL) // It can take resources so we need to protect the user from lags
    	//	MessageBox(NULL, "Couldn't set thread priority.\nBut the program can still continue.", "Error", MB_OK | MB_ICONERROR);
    
    	bool in_progress = false;
    
    	while (true)
    	{
    		// Checks if he is in game
    		
    		if (*ingame)
    		{
    			// Want the hack or not want the hack?
    			
    			if (!in_progress)
    			{
    				ResumeThread(checking);
    				in_progress = true;
    			}
    		}
    		else if (in_progress)
    		{
    			SuspendThread(checking);// No need to check out of game
    			in_progress = false;//Checking ain't in progress
    
    			if (activated)
    				if (SuspendThread(setting) != -1)
    					activated = false;
    		}
    		
    		Sleep(2000);//Not to overload the CPU
    	}
    
    	//char buf[255];
    	//sprintf_s(buf, "%d", address);
    	//MessageBox(NULL, buf, "ERROR", MB_OK | MB_ICONERROR);
    }
    
    bool WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
    {
    	DisableThreadLibraryCalls(hDLLInst);
    
    	if (fdwReason == DLL_PROCESS_ATTACH)
    	{
    		if (CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, NULL, 0, NULL) == NULL) // Creating a new thread in the process "AVA"
    		{
    			MessageBox(NULL, "Couldn't create a thread to execute within the virtual address space of the calling process.", "Error", MB_OK | MB_ICONERROR);
    			return false;
    		}
    	}
    	else if (fdwReason == DLL_PROCESS_DETACH)
    	{
    		// No need for anything here
    		
    	}
    	
    	return true;
    }

    All Credits go to : @jabberw0ock
    Last edited by Frought; 10-30-2012 at 02:37 PM.

  2. #2
    [H]aaBX's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    277
    Reputation
    23
    Thanks
    1,085
    My Mood
    Asleep
    Quote Originally Posted by AeriaAVA View Post
    you're the leecher
    You're the leecher
    There are some parts of my base

    Thanks @Scynix for this awesome picture
     


  3. The Following 2 Users Say Thank You to [H]aaBX For This Useful Post:

    Ryzz BackUp (10-30-2012),[2]ExiotX (10-30-2012)

  4. #3
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool
    Quote Originally Posted by [H]aaBX View Post
    You're the leecher
    There are some parts of my base
    Oh , idk

    but if you want to know see the credits and see this thread : https://www.mpgh.net/forum/284-allian...basic-dll.html

    The Guys who say i'm leeching then his the leecher , you too

  5. #4
    hanyali2012's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire
    Posts
    556
    Reputation
    14
    Thanks
    3,391
    My Mood
    Happy
    Thanx For Sharing . Good Job

    Any Way @[H]aaBX ( Leecher ..



    Best CoderS :~
    @Ramo
    @Karemm111
    @Dragon(H)ell
    @CodeSkills


  6. #5
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    Quote Originally Posted by [2]ExiotX View Post
    calling me leecher ? egyptian , you must know who i am and you will kiss meh leggs for a forgiven.
    anyway reported for leecher word happy ban :d

    edit : i has ur ip and i can ddos you
    proofs ur ip = 197.163.72.20
    bitch please, no one in egypt has a static ip /fthat


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  7. The Following User Says Thank You to giniyat101 For This Useful Post:

    Lightning (11-01-2012)

  8. #6
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool
    Quote Originally Posted by giniyat101 View Post
    bitch please, no one in egypt has a static ip /fthat
    it's not static - also there's but static is like not static xD

Similar Threads

  1. [Source Code] Basic DLL
    By Jabberwock in forum Alliance of Valiant Arms (AVA) Coding / Source Code
    Replies: 34
    Last Post: 10-13-2012, 02:29 PM
  2. PhreaK Hack. just a basic dll
    By 137 in forum Call of Duty Modern Warfare 3 Private Server Hacks
    Replies: 23
    Last Post: 02-22-2012, 09:37 PM
  3. [Release] Sourced basic.dll
    By vinvin148 in forum Gunz Hacks
    Replies: 48
    Last Post: 10-20-2011, 05:38 PM
  4. [Help]Call .dll From Visual Basic
    By GameTrainerMaker in forum Visual Basic Programming
    Replies: 7
    Last Post: 09-06-2010, 11:46 PM
  5. [Release] Crossfire.dll Basic hack
    By carioka in forum CrossFire Hacks & Cheats
    Replies: 1
    Last Post: 11-21-2009, 07:50 PM