Results 1 to 4 of 4
  1. #1
    WhiteLionATX's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    21

    Question [?] 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!

  2. #2
    OverlordSec's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    up ! I want to know too

  3. #3
    cardoow's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Posts
    215
    Reputation
    28
    Thanks
    766
    My Mood
    Amazed
    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;
    }

  4. #4
    d0h's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    trashbin
    Posts
    298
    Reputation
    24
    Thanks
    144
    My Mood
    Doh
    one line

    Code:
    void (__cdecl*SendConsoleCommand)(int ,int ,char *) = (void (__cdecl *)(int,int,char *))0x00DEAD;