Is this soruce code ok?

Posts 114 of 14 · Page 1 of 1
Is this soruce code ok?
I know Im a noob
Don't hate.

I'm not getting any build errors, just x trap detects.
Can someone tell me whats wrong for the box/nosky always on hack source?

lauwy said the problem is probably in the source, so if everyone could tell me what's wrong.

Code:
 
#include <windows.h>



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


DWORD WINAPI Paulsag(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); 
}

	bool boxes = true; 
	bool nosky = true;
	


for(;;) {
						
			if  (boxes) {
				PushToConsole("ModelDebug_DrawBoxes 1");
			}
			else {
				PushToConsole("ModelDebug_DrawBoxes 0");
			}

			if  (nosky) {
				PushToConsole("DrawSky 0");
			}
			else {
				PushToConsole("DrawSky 1");
			}

		
		
		
	}
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread(NULL, NULL,Paulsag, NULL, NULL, NULL);
	}
	return TRUE;
}
I will pm it to you ive added hot keys to PRESS THANKS
k, thanks

But do you know what was wrong with this?


I want to know what I did wrong for when I make another one...
Quote Originally Posted by koolman123 View Post
k, thanks

But do you know what was wrong with this?


I want to know what I did wrong for when I make another one...
Put Sleep(100); At The Bottom Of Ur Ptc Commands EXAMPLE:

else {
PushToConsole("DrawSky 0");
}
Sleep(100);
}

MAKE SURE U ADD #include <iostream> <<FOR THE BEST

AND ADD __asm pushad; <<<BEFORE THE HACK SOURCE AND AFTER>> __asm popad;
oh wow
Thanks mark.

I feel stupid lol
You don't need "ADD __asm pushad; <<<BEFORE THE HACK SOURCE AND AFTER>> __asm popad;"
Lauw is good coder so listen to him.
alright thanks guys

lauwy, do you know what these build errors are about in this code?
Code:
 1>------ Build started: Project: P***, Configuration: Release Win32 ------
1>  jeez dude...cpp
1>jeez dude...cpp(54): error C2601: 'DllMain' : local function definitions are illegal
1>          jeez dude...cpp(22): this line contains a '{' which has not yet been matched
1>jeez dude...cpp(63): fatal error C1075: end of file found before the left brace '{' at 'jeez dude...cpp(22)' was matched
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

from the code
Code:
#include <iostream>
#include <windows.h>

using namespace std;

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


DWORD WINAPI hello(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); 
}
	bool boxes = true;
	bool nosky = true;

for(;;) {
	
			if(GetAsyncKeyState(VK_F2)&1) {
				boxes = !boxes;
			}
			if(GetAsyncKeyState(VK_F3)&1) {
				nosky = !nosky;
			}
			if   (boxes) {
			     PushToConsole("ModelDebug_DrawBoxes 1");
			}
			else {
			    PushToConsole("ModelDebug_DrawBoxes 0");
			}
			if  (nosky) {
				PushToConsole("DrawSky 1");
			}
			else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Hack Made By koolman123", 0);
		CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
	}
	return TRUE;
}
You miss one } in the DWORD WINAPI hello(LPVOID) {


Make from this part:
Code:
			else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}
Code:
			else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}
}
Quote Originally Posted by lauwy View Post
You miss one } in the DWORD WINAPI hello(LPVOID) {


Make from this part:
Code:
			else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}
Code:
			else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}
}
Thanks.
I lost the build errors, but obviously, my computer must just be fucked up.



For some reason that got detected too.

This is the code on VS 10 that got detected.

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

using namespace std;

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


DWORD WINAPI hello(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); 
}
	bool boxes = true;
	bool nosky = true;

for(;;) {
	
			if   (boxes) {
			     PushToConsole("ModelDebug_DrawBoxes 1");
			}
			else {
			    PushToConsole("ModelDebug_DrawBoxes 0");
			}
			if  (nosky) {
				PushToConsole("DrawSky 1");
			}
				else {
				PushToConsole("DrawSky 0");
			}
			Sleep(100);
	}
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
	}
	return TRUE;
}
Pack it with UPX
i think your cshell and lt addresses are old
Quote Originally Posted by dddrrr View Post
i think your cshell and lt addresses are old
your correct maybe he's Lt addresses are old
Can someone update new adresses
Posts 114 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?