Raised This Month: $ Target: $400
 0% 

[Orpheu] Retrieving player's IP address


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 02-09-2022 , 13:30   [Orpheu] Retrieving player's IP address
Reply With Quote #1

Hello,
I am trying to get connecting player's IP address while in SV_ConnectClient state in HLDS ( build 8684 ).
Hook SV_ConnectClient ( signature works ) :
PHP Code:
OrpheuRegisterHook(OrpheuGetFunction("SV_ConnectClient"), "SV_ConnectClient_Pre"OrpheuHookPre)
    
OrpheuRegisterHook(OrpheuGetFunction("SV_ConnectClient"), "SV_ConnectClient_Post"OrpheuHookPost
Signature:
PHP Code:
{
    
"name" "SV_ConnectClient",
    
"library" "engine",
    
"identifiers" :
    [
        {
            
"os" "windows",
            
"value" : [0x55,0x8B,0xEC,0x81,"*","*","*","*","*",0x53,0x56,0x57,0xB9,0x05,0x00,0x00,0x00,0xBE,"*","*","*","*",0x8D,"*","*",0x33,0xDB,0x68,"*","*","*","*"]
        },
        {
            
"os" "linux",
            
"value" "SV_ConnectClient"
        
}
    ]

Thinked about hooking the Net_AdrToString, but it don't works as intended:

Code:
Code:
// This hook is registered inside the SV_ConnectClient_Pre and unhooked in SV_ConnectClient_Post OrpheuRegisterHook(OrpheuGetFunction("NET_AdrToString"), "NET_AdrToString_Post", OrpheuHookPost) public NET_AdrToString_Post() {     new szTemp[19]     OrpheuGetReturn(szTemp, charsmax(szTemp))     server_print("temp: %s", szTemp) }

Using this code I get the following result:
PHP Code:
temp84d4c505:008b8c020 
Signature ( working ):
PHP Code:
{
    
"name" "NET_AdrToString",
    
"library" "engine",
    
"return" 
    {
        
"type" "char *"
    
},
    
"identifiers" :
    [
        {
            
"os" "windows",
            
"value" 0x58B00
        
},
        {
            
"os" "linux",
            
"value" "NET_AdrToString"
        
}
    ]

Next, I thinked about pfnConnectionlessPacket:

Signature:
PHP Code:
{
    
"name" "pfnConnectionlessPacket",
    
"library" "engine",
    
"arguments" :
    [
        {
            
"type" "netadr_s *"
        
},
        {
            
"type" "char *"
        
},
        {
            
"type" "char *"
        
},
        {
            
"type" "int"
        
},
    ]

Code:
PHP Code:
g_hConnectionlessPacket OrpheuGetDLLFunction("pfnConnectionlessPacket""pfnConnectionlessPacket"
But I get this error:
PHP Code:
[ORPHEUStructure "DLL_FUNCTIONS *" doesn't have a member named "pfnConnectionlessPacket" 
Any suggestions, what function should I hook?
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 02-10-2022 at 08:53.
Shadows Adi is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode