❓ [?] Send commands to console by writeprocessmemory !?

Posts 1–4 of 4 · Page 1 of 1
❓ [?] Send commands to console by writeprocessmemory !?
hey guys
I saw the thread where you manage/try with an injected dll to send a commandline to console. It was confusing me a bit I am searching for a method to send commands directly by writeprocessmemory. But I dont know which offsets to use for this. can someone tell me/explain me a bit?
thanx in advanced!
the easiest method is using it like this
Code:
typedef void (*SendConsoleCommand_)(int a1, char *command);
SendConsoleCommand_ SendConsoleCommand = (SendConsoleCommand_)0x457290;
then call it in your renderer like this
Code:
SendConsoleCommand(0, "god\n");
you can also let your game create a console so you can use that for
input commands

call this one time
Code:
HANDLE hCon;
void BuildDebugConsole(void)
{		
	AllocConsole();
	hCon = GetStdHandle(STD_INPUT_HANDLE);
	SetConsoleTitle("Console");		
}
Code:
char* buffer = new char[]; 
void SendCommand()
{		
	DWORD* tmpSize = new DWORD; 	
	ReadConsole(hCon, buffer, 16*sizeof(buffer), tmpSize, NULL);
	SendConsoleCommand(0, buffer);	
}
call this in your renderer
Code:
if(GetAsyncKeyState(VK_KEY)&1){bConsole = !bConsole;}	
if(bConsole)
{		
	SendCommand();		
	bConsole = false;
}
one line

Code:
void (__cdecl*SendConsoleCommand)(int ,int ,char *) = (void (__cdecl *)(int,int,char *))0x00DEAD;
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us