What am I doing wrong?

Posts 115 of 17 · Page 1 of 2
What am I doing wrong?
1. Starting programs: OllyDbg and loadlib.exe
2. LTClient:

AmmoDamage:

3. Starting Microsoft Visual Basic 2008 Express Edition and paste code:
Code:
#include <windows.h>
#include <iostream>

using namespace std;

void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x2AAE80) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}
DWORD WINAPI Main(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(150);
}

	bool PlayerGlow = true; 
	bool FogEnable = false;
	bool Nosmoke = true;
        bool Whitewalls = false;


for(;;) {
	__asm pushad;
			if(GetAsyncKeyState(VK_F2)&1) {
				PlayerGlow = !PlayerGlow;
			}
			if(GetAsyncKeyState(VK_F3)&1)	{
				FogEnable = !FogEnable;
			}
			if(GetAsyncKeyState(VK_F4)&1)	{
				Nosmoke = !Nosmoke;
			}
                        if(GetAsyncKeyState(VK_F9)&1)	{
				Whitewalls = !Whitewalls;
			}

			if (Nosmoke) {
				PushToConsole("DrawParticles 1");
			} 
			else {
		                PushToConsole("DrawParticles 0");
			}

			if (FogEnable) {
				PushToConsole("FogEnable 1");
			} 
			else {
				PushToConsole("FogEnable 0");
			}
			if  (PlayerGlow) {
				PushToConsole("ScreenGlowEnable 1");

			}
			else {
				PushToConsole("ScreenGlowEnable 0");

			}
                        if (Whitewalls) {
                                PushToConsole("DrawFlat 1");
                        } 
                        else {
                                PushToConsole("DrawFlat 0");
                        }
			Sleep(100);
			__asm popad;
	}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "The Creators Name Here ", "Successfully Injected", 0);
                system("start http://www.mpgh.net");
		CreateThread(NULL, NULL,Main, NULL, NULL, NULL);
	}
	return TRUE;
}
and change this:

Code:
#include <windows.h>
#include <iostream>

using namespace std;

void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x3099C8) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x7A4 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}
DWORD WINAPI Main(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(150);
}

	bool PlayerGlow = true; 
	bool FogEnable = false;
	bool Nosmoke = true;
        bool Whitewalls = false;


for(;;) {
	__asm pushad;
			if(GetAsyncKeyState(VK_F2)&1) {
				PlayerGlow = !PlayerGlow;
			}
			if(GetAsyncKeyState(VK_F3)&1)	{
				FogEnable = !FogEnable;
			}
			if(GetAsyncKeyState(VK_F4)&1)	{
				Nosmoke = !Nosmoke;
			}
                        if(GetAsyncKeyState(VK_F9)&1)	{
				Whitewalls = !Whitewalls;
			}

			if (Nosmoke) {
				PushToConsole("DrawParticles 1");
			} 
			else {
		                PushToConsole("DrawParticles 0");
			}

			if (FogEnable) {
				PushToConsole("FogEnable 1");
			} 
			else {
				PushToConsole("FogEnable 0");
			}
			if  (PlayerGlow) {
				PushToConsole("ScreenGlowEnable 1");

			}
			else {
				PushToConsole("ScreenGlowEnable 0");

			}
                        if (Whitewalls) {
                                PushToConsole("DrawFlat 1");
                        } 
                        else {
                                PushToConsole("DrawFlat 0");
                        }
			Sleep(100);
			__asm popad;
	}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Dobra robota! ", "Injectowanie zakończone sukcesem!", 0);
                system("start http://www.mpgh.net");
		CreateThread(NULL, NULL,Main, NULL, NULL, NULL);
	}
	return TRUE;
}
4. Debugging and running by Cheetach Injector 1,4. Effect? None.

P.S. I want to add to the code, no recoil, etc.. but I do not know how

Persecutor
because pushtoconsole is basically detected now

and last time i check so is GetAsyncKeyState
Yeah it really sucks. I am trying new thing but injecting fail the hole time -.-
Hmmm .. And how to do that there is no hotkeys, but there was only one shoot to kill?
Operating System?
My Operation System is Windows XP.
Quote Originally Posted by Persecutor View Post
My Operation System is Windows XP.
And Me too
thanks swiftdude
The pushtocontrol addy's are a bit outdated.
I am green, in this problem.
When I get ready to code, you have respect.
I have code:

Code:
DWORD WINAPI Hacks(LPVOID)
{
	bool oneshot = false;
        bool norepeatreload = false;
        bool gunkniferange = false;
        bool unlimitedammo = false;
	while(1)
	{
		DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll");

     
   		if(oneshot) 
         	{
           		for(int i=0 ; i<445 ; i++)
          		{
          		 *(float*)( (*(DWORD*)((*(DWORD*)(CShellBase + UPDATE ))+(4*i))) + 0x7F8) = FLT_MAX ;
    			}
		}
	}
}

   		if(norepeatreload) 
         	{
           		for(int i=0 ; i<445 ; i++)
          		{
          		 *(float*)( (*(DWORD*)((*(DWORD*)(CShellBase + UPDATE ))+(4*i))) + 0xA44) = FLT_MAX ;
    			}
		}

   		if(gunkniferange) 
         	{
           		for(int i=0 ; i<445 ; i++)
          		{
          		 *(float*)( (*(DWORD*)((*(DWORD*)(CShellBase + UPDATE ))+(4*i))) + 0x24B8) = FLT_MAX ;
    			}
		}

		if(unlimitedammo) 
         	{
           		for(int i=0 ; i<445 ; i++)
          		{
          		 *(float*)( (*(DWORD*)((*(DWORD*)(CShellBase + UPDATE ))+(4*i))) + 0x7FC) = FLT_MAX ;
    			}
		}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH ) {
         MessageBoxA(0, "Injectowanie zakończone sukcesem!", "Dobra robota!" , 0);
		 
     
    }
    return true;
    }
and I want make Hotkey. Does the code is written correctly? If no, please help me.
That source is old.
It's pretty much detected.
Posts 115 of 17 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Need help?