Results 1 to 12 of 12
  1. #1
    xVIRUZx's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    248
    Reputation
    10
    Thanks
    48
    My Mood
    Drunk

    Cool MW3 SP/MP External Console

    A dude asked for an external console for TeknoMW3, and I decided to do it for him and for anyone else interested. This works with absolutely anything, Steam version, IW5M, no matter if Multiplayer or Singleplayer -- it should work for all versions.

    Code:
    #include <windows.h>
    #include <stdio.h>
    
    bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask)
    {
    	for(;*szMask;++szMask,++pData,++bMask)
    		if(*szMask=='x' && *pData!=*bMask)   return 0;
    	return (*szMask) == NULL;
    }
    
    DWORD FindPattern(BYTE *bMask,char * szMask)
    {
    	DWORD dwAddress = (DWORD)GetModuleHandleA("iw5mp.exe"), //make sure this is the right executable
    		dwLen = 0x1036000; //should have enough length
    
    	for(DWORD i=0; i<dwLen; i++)
    		if (Compare((BYTE*)(dwAddress+i),bMask,szMask))  return (DWORD)(dwAddress+i);
    	return 0;
    }
    
    DWORD WINAPI PatchMW3_Console(LPVOID lpParam)
    {
    	DWORD addr = FindPattern(
    			(BYTE*)"\x83\x3d\x00\x00\x00\x00\x00\x75\x00\x6a\x00\xff\x15\x00\x00\x00\x00\x50\xe8\x00\x00\x00\x00\x83\xc4\x04", 
    			"xx?????x?xxxx????xx????xxx");
    
    	// Calls Sys_CreateConsole
    	((void)(*)()addr)();
    	
    	struct tagMSG Msg;
    	
    	while(true)
    	{
    		if(GetMessageA(&Msg, NULL, NULL, NULL))
    		{
    			TranslateMessage(&Msg);
    			DispatchMessageA(&Msg);
    		}
    	}
    	
    	return NULL;
    }
    
    BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL, NULL,
    			PatchMW3_Console, NULL, NULL, NULL);
    	}
    	
    	return TRUE;
    }
    Last edited by xVIRUZx; 06-28-2014 at 08:49 PM.
    blah blah blah

  2. The Following User Says Thank You to xVIRUZx For This Useful Post:

    AcidShout (07-08-2014)

  3. #2
    densim12's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Moscow
    Posts
    3
    Reputation
    10
    Thanks
    0
    xVIRUZx , cann't give me the source code dll or a console application with this code?

  4. #3
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,711
    My Mood
    Cheerful
    Quote Originally Posted by densim12 View Post
    xVIRUZx , cann't give me the source code dll or a console application with this code?
    What do you mean?
    If you compile this code, you will get a .DLL file(if your Visual Studio project is configured proplery, ofcourse)

  5. #4
    densim12's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Moscow
    Posts
    3
    Reputation
    10
    Thanks
    0
    That error is out of for ((void) (*) () addr) ();

  6. #5
    ASFeld's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    38
    My Mood
    Asleep
    Quote Originally Posted by densim12 View Post
    That error is out of for ((void) (*) () addr) ();
    it just ant c/p

  7. #6
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,195
    Reputation
    24
    Thanks
    863
    My Mood
    Bitchy
    Quote Originally Posted by ASFeld View Post
    it just ant c/p
    Nope. That's a valid call.
    Well actually,
    Code:
    ((void(*)())addr)();

  8. The Following User Says Thank You to Hitokiri~ For This Useful Post:

    xVIRUZx (01-17-2015)

  9. #7
    NR | Prodigi's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    83
    ((LRESULT(__cdecl*)())addr)();

  10. #8
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,195
    Reputation
    24
    Thanks
    863
    My Mood
    Bitchy
    Quote Originally Posted by NR | Prodigi View Post
    ((LRESULT(__cdecl*)())addr)();
    Code:
    __declspec(noreturn)
    Does that mean anything to you?
    I welcome you to call that from your main thread though.

  11. #9
    xImShiftZ's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Location
    Berlin.
    Posts
    7
    Reputation
    10
    Thanks
    0
    Could someone say me the Kick/Ban command?

  12. #10
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,195
    Reputation
    24
    Thanks
    863
    My Mood
    Bitchy
    Quote Originally Posted by xImShiftZ View Post
    Could someone say me the Kick/Ban command?
    Code:
    kick < PlayerName >
    kickclient < Client Number >
    ban < PlayerName >
    banclient < Client NUmber >

  13. #11
    NR | Prodigi's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    83
    Maybe he mean exploit command...

  14. #12
    xImShiftZ's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Location
    Berlin.
    Posts
    7
    Reputation
    10
    Thanks
    0
    Yeah.
    I mean this could you say me that?

Similar Threads

  1. [Release] MW3-SP-External Console-1.9.461
    By Lovroman in forum Call of Duty - Modern Warfare 3 (MW3) Hacks & Cheats
    Replies: 18
    Last Post: 12-02-2013, 07:45 AM
  2. [Info] MW3 Has A Devloper Console
    By silentrunner2 in forum Call of Duty Modern Warfare 3 Discussions
    Replies: 9
    Last Post: 11-16-2011, 02:50 AM
  3. [Detected] External Console Radar
    By King-Orgy in forum Call of Duty 7 - Black Ops Hacks & Cheats
    Replies: 105
    Last Post: 12-19-2010, 10:41 AM
  4. [Release] [Release]External Console Radar Inc. Source
    By King-Orgy in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 8
    Last Post: 12-04-2010, 03:39 AM
  5. [Detected] Custom External Console
    By @osma8 in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 10
    Last Post: 10-21-2010, 06:14 AM