Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 20:05

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Halo - Remotely Execute Console Commands
PostPosted: 26 Sep 2008 19:56 

Joined: 15 Jul 2008 01:38
Posts: 12
The demo is for Halo Trial only.

This is a sample source I wrote. A thread is created, which waits for Halo. it hooks the function that executes console commands via DetourFunction on attach, then starts a while loop. In the while loop (which loops forever), waits for a keypress of numpad1, which executes the string you input. I used "cheat_all_weapons" but you may use any console / devmode command you want. Make sure that devmode and console are both enabled or else this will not work.

Written in C++ and compiled with Microsoft Visual C++ Express Edition 2008. This is under the GNU General Public License. If you wish to use this code, you must leave it open sourced. This is to NOT be posted at any other website without permission!

The following is a direct copy and paste of the full source. This is a DLL project and must be compiled as so and injected with a DLL injector.

You will need Microsoft Detours 1.5 to use DetourFunction.
Code:
/********************************************************************************
   Console Demo -- Halo Trial Console Remote Execute
    Copyright (C) 2008 Del

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************
   File:    main.cpp
   Project: Console Demo
   Author:  Steve(Del)
   Date:    September 23, 2008
   Game:    Halo Trial
   Version: --
   
   Tools Used: Microsoft Visual C++ 2008 Express Edition
            OllyDbg

   Credits: K@N@VEL

   Information: Website -- www.deltronzero.com
             E-mail -- deltronzero@hotmail.com
*********************************************************************************/
#include <windows.h>
#include <detours.h>
//------------------------------------------------------------------------------
typedef void (*pConsoleCMD)(const char * cCommand);
pConsoleCMD oConsoleCMD;
//------------------------------------------------------------------------------
void hkConsoleCMD(const char * cCommand)
{
   __asm PUSH 0;
   __asm MOV EDI, cCommand;
   __asm CALL DWORD PTR DS:[oConsoleCMD];
   __asm ADD ESP, 0x4;
}
//------------------------------------------------------------------------------
DWORD __stdcall dwHook(LPVOID lpArgs)
{
   DWORD dwHalo = NULL;
   do
   {
      Sleep(120);
      dwHalo = (DWORD)GetModuleHandleA("halo.exe");
   }
   while( dwHalo == NULL );

   oConsoleCMD = (pConsoleCMD)DetourFunction((PBYTE)0x004C4970,(PBYTE)&hkConsoleCMD );
   
   while(1)
   {
      if (GetAsyncKeyState(VK_NUMPAD1)&1)
         hkConsoleCMD("cheat_all_weapons");
   }
   return 0;
}
//------------------------------------------------------------------------------
BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ulReason, LPVOID lpReserved )
{
   if( ulReason == DLL_PROCESS_ATTACH )
   {
      CreateThread( 0, 0, dwHook, 0, 0, 0 );
   }
   return TRUE;
}
//------------------------------------------------------------------------------


Top
 Profile  
 
 
 Post subject: Re: Halo - Remotely Execute Console Commands
PostPosted: 28 Sep 2008 00:21 

Joined: 07 Sep 2008 19:00
Posts: 6
holy shit, so this will enable devmode client side?? so if i compiled this, injected, and then went to a game, type cheat_all_vehicles, and pressed the 1, or somehting in that order, the vehicles would spawn?? btw, wats up silent, this is Butcher. Ill talk more to you on xfire when i get home from library...


Top
 Profile  
 
 Post subject: Re: Halo - Remotely Execute Console Commands
PostPosted: 06 Oct 2008 14:17 

Joined: 24 Feb 2008 08:31
Posts: 10
Just so you know, SilentK, "This is under the GNU General Public License" and "This is to NOT be posted at any other website without permission" are incompatible statements. GPL allows you to redistribute the source wherever you want and make any changes you want, as long as it is still GPL'ed.


Top
 Profile  
 
 Post subject: Re: Halo - Remotely Execute Console Commands
PostPosted: 08 Oct 2008 02:22 

Joined: 15 Jul 2008 01:38
Posts: 12
It's just something I write so I can know where my information will be posted. I don't have the power to control what happens to it, but it's just a notion of respect for ones work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: