Thread: [C++]ForceHost

Results 1 to 11 of 11
  1. #1
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed

    [C++]ForceHost

    Hey =)

    So, i´m trying to make a simple force host "Hack" but something seems to be wrong with my code.


    Code:
    ....
    	if(ProcHandle != 0){
    
    		int ADDR1, ADDR2;
    		int setValue = 1;
    	        DWORD dwFh1 = 0x140C124 ;
                    DWORD dwFh2 = 0x140C148;
        
                    ReadProcessMemory (ProcHandle,(LPCVOID)dwFh1,&ADDR1,sizeof(ADDR1),NULL);
    		ReadProcessMemory (ProcHandle,(LPCVOID)dwFh2,&ADDR2,sizeof(ADDR2),NULL);
    			   
    		ADDR1 +=  0xC;
    		ADDR2 +=  0xC;    
    
    		while(1){
    	                   WriteProcessMemory(ProcHandle,(LPVOID)ADDR1,&setValue,sizeof(setValue),NULL);
    			   WriteProcessMemory(ProcHandle,(LPVOID)ADDR2,&setValue,sizeof(setValue),NULL);
    
    			   Sleep(1000);
    		}
    
    ...

    Thanks =)


    Edit: Sorry, the code tags make it look a little bit crappy

    cheers
    Last edited by MarkHC; 11-06-2012 at 11:10 AM.

  2. #2
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,311
    My Mood
    Angelic
    Assuming the offsets are correct, the code seems right... try to change the casting from LPCVOID to DWORD on the RPM and on the WPM

    Code:
    ....
    	if(ProcHandle != 0){
    
    		int ADDR1, ADDR2;
    		int setValue = 1;
    	        DWORD dwFh1 = 0x140C124 ;
                    DWORD dwFh2 = 0x140C148;
        
                    ReadProcessMemory (ProcHandle,(DWORD)dwFh1,&ADDR1,sizeof(ADDR1),NULL);
    		ReadProcessMemory (ProcHandle,(DWORD)dwFh2,&ADDR2,sizeof(ADDR2),NULL);
    			   
    		ADDR1 +=  0xC;
    		ADDR2 +=  0xC;    
    
    		while(1){
    	                   WriteProcessMemory(ProcHandle,(DWORD)ADDR1,&setValue,sizeof(setValue),NULL);
    			   WriteProcessMemory(ProcHandle,(DWORD)ADDR2,&setValue,sizeof(setValue),NULL);
    
    			   Sleep(1000);
    		}
    
    ...
    Last edited by MarkHC; 11-06-2012 at 11:13 AM.


    CoD Minion from 09/19/2012 to 01/10/2013

  3. The Following User Says Thank You to MarkHC For This Useful Post:

    inmate (11-06-2012)

  4. #3
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed
    Hmm thats crazy, thats also dont work :O But i think too, that the code is correct. Very mysteries

    cheers

  5. #4
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,005
    My Mood
    Twisted
    Addies are wrong
    They change every time u restart ur game, and its not always those 2.
    Use this
    Code:
    WriteInteger(ReadInteger(0x0140C124) + 0xC, 1);
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  6. #5
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed
    Im pretty sure that the Addies are correct ;D, Jorndel use them too and its works perfect in his server control cheat, he released the source in C# here.

    And my code is C++ not C# or vb.net, the code that you post it from Jorndels Module which is written in vb.net and C# :P.

    cheers

  7. #6
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,311
    My Mood
    Angelic
    Quote Originally Posted by Isaakske View Post
    Addies are wrong
    They change every time u restart ur game, and its not always those 2.
    Use this
    Code:
    WriteInteger(ReadInteger(0x0140C124) + 0xC, 1);
    I think you need glasses Just kidding. He is using that address already

    Back on topic, verify the value read from 0x0140C124 + 0xC on CE to see if points to the right address...
    Last edited by MarkHC; 11-06-2012 at 04:00 PM.


    CoD Minion from 09/19/2012 to 01/10/2013

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

    inmate (11-06-2012)

  9. #7
    [NooB] Mentor's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Erevan
    Posts
    72
    Reputation
    10
    Thanks
    451
    My Mood
    Busy
    addresse is not correct . 05AB6BA0 (value=0) try this .
    Last edited by [NooB] Mentor; 11-06-2012 at 04:23 PM.

  10. #8
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,311
    My Mood
    Angelic
    Quote Originally Posted by [NooB] Mentor View Post
    addresse is not correct . 05AB6BA0 (value=0) try this .
    if you using VB then you can use (ofc) Jorndels class and this
    Code:
     Dim mw3 As New trainer
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            mw3.Hack("iw5mp")
            mw3.SetInt(&H5AB6BA0, 0)
    
        End Sub
    He's using a pointer to find the address. The address you have might change upon game restart or don't work at all for other people. The pointer (0x0140C124) holds the address of the right offset every time, read it, add 0xC (cause its a pointer) and you'll have the right one


    CoD Minion from 09/19/2012 to 01/10/2013

  11. The Following User Says Thank You to MarkHC For This Useful Post:

    inmate (11-06-2012)

  12. #9
    gteuk's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    247
    Reputation
    15
    Thanks
    613
    Not all pointers are the same I have tested this with a number of users through tv


    &H5AB6B48 + &HC
    &H5AB6B48 + &HC
    &H5AB6B94 + &HC
    &H5AB6B48 + &H58

    I use cheat engine at the mo and I am trying to find the true static, however the game crashes out when I do a "what accesses this address", anybody got another prog that may not crash out ?

  13. The Following User Says Thank You to gteuk For This Useful Post:

    inmate (11-07-2012)

  14. #10
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,331
    My Mood
    Breezy
    Your code looks fine to me, but try changing sizeof(blah) to 4 instead. Also make sure your process handle from OpenProcess has the PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION access flags too.
    Last edited by master131; 11-07-2012 at 12:19 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  15. The Following User Says Thank You to master131 For This Useful Post:

    inmate (11-07-2012)

  16. #11
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed
    Thank you all guys, now its working perfect


    cheers =)

Similar Threads

  1. ForceHost Tools for alterIWnet?
    By FlowerPower in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 09-23-2011, 02:44 AM