Thread: Hooking s2s

Results 1 to 11 of 11
  1. #1
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1

    Hooking s2s

    So ive tried to do this in my hack(thanks CC) and although it says im detouring and removing detours fine, it never runs s2s code. Any ideas why? I can post source if you would like me to.

  2. #2
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    never runs any s2s code meaning what?

    You can see it being logged but it doesnt get sent?

    or

    Nothing logs?

    If you can see it logging, but doesnt get sent, you need to call the real s2s function after reading the ID's.
    If you dont see logs, well its not hooked correctly.

  3. #3
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by ac1d_buRn View Post
    never runs any s2s code meaning what?

    You can see it being logged but it doesnt get sent?

    or

    Nothing logs?

    If you can see it logging, but doesnt get sent, you need to call the real s2s function after reading the ID's.
    If you dont see logs, well its not hooked correctly.
    This is what im doing
    Code:
    void hook()
    {
      add_log("Detouring"); //happens
      os2s= (ps2s)Detour(s2s_addy,s2s_thread);
      add_log("Detoured"); //happens
    }
    HRESULT and some other things i forget off the top of my head(params,and more params)
    {
       add_log("s2s hooked"); //never happens
       return something;
    }

  4. #4
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1
    Has anyone been able to hook s2s that is NA?

  5. #5
    RagedYet's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    California
    Posts
    221
    Reputation
    -3
    Thanks
    34
    My Mood
    Devilish
    yup shit is so easy that it gets boring.



  6. #6
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    494
    Reputation
    104
    Thanks
    625
    Quote Originally Posted by RagedYet View Post
    yup shit is so easy that it gets boring.
    Wow, that was a useless response... (yes, it is easy, but that is beside the point...)
    @OP, yes, please post some code so we can better debug this.

    Oh no! Vortex is gay!

  7. #7
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Saltine View Post

    Wow, that was a useless response... (yes, it is easy, but that is beside the point...)
    @OP, yes, please post some code so we can better debug this.
    Code:
    	add_log("Start_s2s_hook");//happens
    	while(true)
    	{
    		if(Ingame() && s2s_hooked == false )
    		{
    			add_log("51");//happens
    			mfnSendToServer = (tfnSendToServer)DetourFunction((PBYTE)ADDR_S2SE, (PBYTE)&hooked_SendToServer);
    			s2s_hooked = true;
    			add_log("52");//happens
    		}
    		if(!Ingame() && s2s_hooked == true)
    		{
    			add_log("61"); //happens
    			DetourRemove((PBYTE)ADDR_S2SE, (PBYTE)&hooked_SendToServer); 
    			s2s_hooked = false;
    			add_log("62");//happens
    		}
    		add_log("7");//happens
    
    		Sleep(100);
    	}
    Code:
    unsigned int __stdcall hooked_SendToServer(ILTMessage_Read *pMsg, unsigned __int32 flags)
    {
    	__asm pushad;
    	int iRetn;
    	add_log("a"); //Doesnt Happen
    	int id = pMsg->Readuint8();
    	add_log("e"); //Doesnt Happen
    	__asm popad;
    	return iRetn;
    }
    Last edited by NotRealPro; 07-17-2012 at 07:14 PM.

  8. #8
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    you forgot to return original function.
    Proper way:

    Code:
    iRetn = mfnSendToServer(pMsg, flags);
    BTW: Try another detours, length is 7 bytes.
    Last edited by Ch40zz-C0d3r; 07-17-2012 at 11:24 AM.

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  9. #9
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Ch40zz-C0d3r View Post
    you forgot to return original function.
    Proper way:

    Code:
    iRetn = mfnSendToServer(pMsg, flags);
    BTW: Try another detours, length is 7 bytes.
    I have it doing something like that, and let me try the 7

    -After trying the length 7-

    freezes at login screen ?

  10. #10
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    You need another detours, MC detours handle this different.
    Try a pub detours with length 7, and get the right updated address.
    This should work.

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  11. #11
    NotRealPro's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Ch40zz-C0d3r View Post
    You need another detours, MC detours handle this different.
    Try a pub detours with length 7, and get the right updated address.
    This should work.
    I tried this, and it still doesnt work, im going to double check my addy really fast. I will look it up on my on so I know its not wrong.

Similar Threads

  1. WR D3D Hook - =o - 03/22/07
    By Dave84311 in forum Hack/Release News
    Replies: 14
    Last Post: 10-06-2007, 10:59 AM
  2. tut How to hook tut 6
    By llvengancell in forum WarRock - International Hacks
    Replies: 1
    Last Post: 06-26-2007, 04:24 PM
  3. D3D hooking tutorial 5 i think
    By llvengancell in forum WarRock - International Hacks
    Replies: 7
    Last Post: 06-26-2007, 04:09 PM
  4. How can i hook the punkbuster?
    By TheRedEye in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-27-2007, 01:34 PM
  5. New Hacks Announced & Warrock DX Hook Update
    By Dave84311 in forum Hack/Release News
    Replies: 17
    Last Post: 03-02-2007, 04:54 PM