I want to make a program that injects a string into the game's developer's console. (Call of Duty: Modern Warfare 2 in this case) How would I approach this? Would I need to find the console's memory address and write memory to that or is that the wrong approach?

  • First start by figuring out what game engine game uses.. and try to find some open source projects of that game engine in use.. you might be able to get away with just some Command line parameters to activate console mode with tilda key, If not then yes you would need to patch some part of code or change some boolean data to make it activate-able. Another trick try running your own game server this usually gives you access to developer's console for modding the server configurations i'd debug it here to find out what makes it open and close.
    – SSpoke
    Dec 24, 2015 at 20:04
  • Best advice.. this is the answer :P search on google "SendCommandToConsole" mw2 (here is a complete list to your game) gamerconfig.eu/commands/call-of-duty-modern-warfare-2 ` typedef void ( __cdecl* oSendCommandToConsole ) ( int a1, int a2, const char* cmd ); oSendCommandToConsole SendCommandToConsole = ( oSendCommandToConsole ) 0x46AFD0;` //(offset will be different depending on game version) `
    – SSpoke
    Dec 24, 2015 at 20:07
  • @SSpoke seems like there is a hidden console window that launches with the game :O makes my job so much easier. Thanks for the help! Dec 24, 2015 at 20:13
  • no problem I would recommend you to stick around on unknowncheats forum it's for people who are into these fps games hooking d3d9 etc.. pretty much they only work with these games.
    – SSpoke
    Dec 24, 2015 at 20:15

1 Answer 1


In Call of Duty games you can search for the string "xpartygo" and xref that with IDA. That way you'll find Cmd_ExecuteSingleCommand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.