Results 1 to 2 of 2
  1. #1
    tester123321's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    2

    Check and help me compile to Dll

    http://www.mpgh.net/forum/284-allian...basic-dll.html
    http://www.mpgh.net/forum/201-allian...-arms-s-e.html
    Thanks: Jabberwo0ck and AmirAzmi98

    Just combine.

    I newbie, dont know programming. I dont have any compiler here right now (even dont know how to compile). and sorry about my bad english. and this my first post.

    anyone help me check code (i just modify at red mark) and compile to dll (that work with injector) please . I greatly appreciate.
    Code:
    /*
    
    Basic DLL
    
    */
    
    #include <windows.h>
    #include <stdio.h>
    
    // Pointers
    
    #define pointer 0x019ACD08
    #define offset1 0x310
    #define offset2 0x388
    #define offset3 0x328
    #define offset4 0x84
    // 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;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset2;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset3;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset4;
    			
    			// Set the address
    
    			if (IsBadWritePtr((void*)address, 4) == NULL)
    				*(int*)address = 0;
    				
    			int content = *(int*)address;
    			if (content < 0x30D40)
    			{
    				*(int*)address = 0x249F0;
    			}
    			//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;
    }
    Last edited by tester123321; 03-17-2013 at 01:45 PM. Reason: HP: 200,000 = 0x30D40 (is it too much)

  2. #2
    Riddick's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Delusional
    Posts
    7,734
    Reputation
    529
    Thanks
    5,130
    My Mood
    Devilish
    Quote Originally Posted by tester123321 View Post
    http://www.mpgh.net/forum/284-allian...basic-dll.html
    http://www.mpgh.net/forum/201-allian...-arms-s-e.html
    Thanks: Jabberwo0ck and AmirAzmi98

    Just combine.

    I newbie, dont know programming. I dont have any compiler here right now (even dont know how to compile). and sorry about my bad english. and this my first post.

    anyone help me check code (i just modify at red mark) and compile to dll (that work with injector) please . I greatly appreciate.
    Code:
    /*
    
    Basic DLL
    
    */
    
    #include <windows.h>
    #include <stdio.h>
    
    // Pointers
    
    #define pointer 0x019ACD08
    #define offset1 0x310
    #define offset2 0x388
    #define offset3 0x328
    #define offset4 0x84
    // 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;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset2;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset3;
    			
    			if (IsBadReadPtr((void*)address, 4) != NULL) continue;
    			address = *(unsigned long*)address + offset4;
    			
    			// Set the address
    
    			if (IsBadWritePtr((void*)address, 4) == NULL)
    				*(int*)address = 0;
    				
    			int content = *(int*)address;
    			if (content < 0x30D40)
    			{
    				*(int*)address = 0x249F0;
    			}
    			//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;
    }
    I'm sorry no one is going to give you that. You may want to try and get them yourself. We do not accept leeched hacks.

Similar Threads

  1. [Help Request] SOMEONE COME AND HELP ME ~~~~!!!!!
    By jasen4 in forum Mission Against Terror Help
    Replies: 0
    Last Post: 12-18-2012, 07:49 AM
  2. [Source Code] Guys pls help to Code and to make this a DLL.. Thank you MPGH coders and ADMINS
    By xaizel060110 in forum Soldier Front General
    Replies: 8
    Last Post: 09-27-2012, 05:49 PM
  3. [Request] Guys pls help to Code and to make this a DLL.. Thank you MPGH coders and ADMINS
    By xaizel060110 in forum WarRock Philippines Hacks
    Replies: 3
    Last Post: 09-20-2012, 05:58 AM
  4. [Help Request] Connecting Problem to Match..READ PLZ AND HELP ME....
    By panatha13 in forum Call of Duty Modern Warfare 3 Help
    Replies: 4
    Last Post: 03-16-2012, 06:30 AM
  5. [Help Request] Pls Come In and Help me!
    By Reallity-X4 in forum Combat Arms Help
    Replies: 10
    Last Post: 06-15-2011, 09:02 PM