[source] xp hotkey hack

Posts 1–15 of 17 · Page 1 of 2
[source] xp hotkey hack [RegisterHotKey]
Xtrap detects it but, it works for xp (with baypass)

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 + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}

BOOL WINAPI Main (LPVOID)
{
	RegisterHotKey(NULL,1,MOD_SHIFT,0x30);	
	RegisterHotKey(NULL,2,MOD_SHIFT,0x31);		
	RegisterHotKey(NULL,3,MOD_SHIFT,0x32);			
	RegisterHotKey(NULL,4,MOD_SHIFT,0x33);		
	bool boxes = true;
	bool nosky = false;
	bool worldframe = false;
	bool playerframe = false;
	bool nogun = false;
	bool Skeleton = false;
	bool FogEnable = false;
	bool CursorCenter = false;
	MSG msg = {0};




   while (GetMessage(&msg, NULL, 0, 0) != 0) {

		__asm pushad;k

		if (msg.message == WM_HOTKEY) {
			if( msg.wParam == 1 ) {
				boxes = !boxes;
			}

			if( msg.wParam == 2 ) {
				nosky = !nosky;
			}

			if( msg.wParam == 3 ) {
				worldframe = !worldframe;
			}

			if ( msg.wParam == 4 ) {
				Skeleton = !Skeleton;
			}
		}

		if (CursorCenter)
			PushToConsole("CursorCenter 1");
		else 
			PushToConsole("CursorCenter 0");

		if (FogEnable)
			PushToConsole("FogEnable 1");
		else
			PushToConsole("FogEnable 0");

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

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

		if  (worldframe)
			PushToConsole("WireFrame 1");
		else
			PushToConsole("WireFrame 0");

		if  (playerframe)
			PushToConsole("WireFrameModels 1");
		else
			PushToConsole("WireFrameModels 0");

		if  (nogun)
			PushToConsole("DrawGuns 0");
		else
			PushToConsole("DrawGuns 1");
		Sleep(100);
		__asm popad;
	}
}

bool Ready(void)
{
    if( GetModuleHandleA("CShell.dll")!= NULL)
        return true;
    return false;
}

DWORD WINAPI dwMainThread(LPVOID)
{
	while (!Ready())
		Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Main, NULL, NULL, NULL);
	return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Coded By lauwy", "Injected", 0);
		CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
	}
	return TRUE;
}
can some one maby fix the code so xtrap don't detects it?
Ask Cristyboy, he made working hotkeys hack for xp users but i doubt he will share his base for us ^^
Thanks for the tip.
I'm going to try to make hotkey's with keyboard hooks

Maby that works :P
Edit: they also work
lets make a dll!
ok, if it works share it with me

all the best.
Sure, I alway's share my codes
whats the point of that if you need a bypass?
Quote Originally Posted by Yepikiyay View Post
whats the point of that if you need a bypass?
To bypass xtrap /me
Crossfire detects a part of this script:
Code:
	MSG msg = {0};




   while (GetMessage(&msg, NULL, 0, 0) != 0) {

		__asm pushad;k

		if (msg.message == WM_HOTKEY) {
			if( msg.wParam == 1 ) {
				boxes = !boxes;
			}
Maby I only need to change msg dunno, did't tried jet. (crossfire detects it as a memory hack)
First I'm going to take a shower :P
haha.

If I have time then I finish the keybord hooks
OKay but logg in after shower
Delete the Sleep() Then it works for xp
Quote Originally Posted by lauwy View Post
Delete the Sleep() Then it works for xp
what you mean?
The hotkey's don't work for xp, on windows 7 they work fine. But if you delete the Sleep(100) from the script, it will also work for xp.
why its dected? i have do what you say.
and secound qwestion what are the hotkays?
Posts 1–15 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us