Raised This Month: $12 Target: $400
 3% 

Orpheu Signatures Collection


Post New Thread Reply   
 
Thread Tools Display Modes
DarthMan
Veteran Member
Join Date: Aug 2011
Old 08-22-2018 , 12:48   Re: Orpheu Signatures Collection
Reply With Quote #61

Quote:
Originally Posted by HamletEagle View Post
Hold your horses, what I gave you is for default hlds. I'm just using rehlds to check how the functions look and work, since it's the same code as hlds. Next time ask or simply try before talking bullshit.
Strange, I grabbed the swds from the VPS and now I could find it, the one from my Steam account which is up to date because there was an update to goldsrc doesn't have that sub. Yes, an update was released yesterday.

PHP Code:

    
"name" "SV_RejectConnection"
    
"library" "engine"
    
"identifiers" 
    [ 
        { 
            
"os" "windows"
            
"value" : [0x55,0x8B,"*",0x81,"*","*","*","*","*",0x8B,"*","*",0x56,0x8D,"*","*",0x57,0x50,0x51,0x8D,"*","*","*","*","*"]
        }, 
        { 
            
"os" "linux"
            
"value" "SV_RejectConnection" 
        

    ] 


Last edited by DarthMan; 08-22-2018 at 13:10.
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-22-2018 , 13:06   Re: Orpheu Signatures Collection
Reply With Quote #62

I updated my server right now, seems to be the same function. The engine update was small, I don't think it changed anything.
Anyway, if for whatever reason you can't find it just follow the steps(search for the string) and you'll find the right one for your dll file.
__________________

Last edited by HamletEagle; 08-22-2018 at 13:11.
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 08-22-2018 , 13:28   Re: Orpheu Signatures Collection
Reply With Quote #63

Quote:
Originally Posted by HamletEagle View Post
SV_RejectConnection doesn't have any string so you can't find it directly. If you look where it's used you see it's being called from SV_CheckProtocol and we are lucky, this function has 3 strings, should be easy to find.
https://github.com/dreamstalker/rehl...main.cpp#L1756

Now search for:"This server is using a newer protocol" in "Strings window" and you will find SV_CheckProtocol. The simply double click on the function that contains the string we searched for:
PHP Code:
sub_1D8A660(a1aThisServerIsUs_048a2); 
The call should look something like this.

If you look here: https://github.com/dreamstalker/rehl...main.cpp#L1679 and in the decompiled output you will notice the functions are looking similar, meaning we found SV_RejectConnection(sub_1D8A660).
Then just take the bytes and make a signature.
I tested, I can confirm that when the client is dropped from the server, it crashes. It says "Failed to connect to game server".

55 8B ? 81 ? ? ? ? ? 8B ? ? 56 8D ? ? 57 50 51 8D ? ? ? ? ? points to the sub you sent to me.

What I basically want to find is when that LAN message appears.

Last edited by DarthMan; 08-22-2018 at 13:34.
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-22-2018 , 14:01   Re: Orpheu Signatures Collection
Reply With Quote #64

Code:
{ 
    "name" : "SV_RejectConnection", 
    "library" : "engine", 
    "arguments" :
    [
        {
            "type"  : "pointer"
        },
        {
            "type"  : "char *"
        }
    ],
    "identifiers" : 
    [ 
        { 
            "os" : "windows", 
            "value" : [0x55,0x8B,0xEC,0x81,0xEC,0x00,0x04,0x00,0x00,0x8B,0x4D,0x0C]
        }, 
        { 
            "os" : "linux", 
            "value" : "SV_RejectConnection" 
        } 
    ] 
}
PHP Code:
#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
OrpheuRegisterHook(OrpheuGetFunction("SV_RejectConnection"), "SV_RejectConnection")
}

public 
SV_RejectConnection(DONT_MESS_WITH_MEreason[128])
{
    
server_print("Rejected connection with msg [%s]"reason)

You are missing the arguments.
The first one is a pointer to a netadr_t structure, so use "pointer" as type. Note that orpheu doesn't support netadr_t struct, so you probably need more code if you actually want to access data from it.
The second argument is the reason.
__________________

Last edited by HamletEagle; 08-22-2018 at 14:02.
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 08-22-2018 , 14:08   Re: Orpheu Signatures Collection
Reply With Quote #65

Quote:
Originally Posted by HamletEagle View Post
Code:
{ 
    "name" : "SV_RejectConnection", 
    "library" : "engine", 
    "arguments" :
    [
        {
            "type"  : "pointer"
        },
        {
            "type"  : "char *"
        }
    ],
    "identifiers" : 
    [ 
        { 
            "os" : "windows", 
            "value" : [0x55,0x8B,0xEC,0x81,0xEC,0x00,0x04,0x00,0x00,0x8B,0x4D,0x0C]
        }, 
        { 
            "os" : "linux", 
            "value" : "SV_RejectConnection" 
        } 
    ] 
}
PHP Code:
#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
OrpheuRegisterHook(OrpheuGetFunction("SV_RejectConnection"), "SV_RejectConnection")
}

public 
SV_RejectConnection(DONT_MESS_WITH_MEreason[128])
{
    
server_print("Rejected connection with msg [%s]"reason)

You are missing the arguments.
The first one is a pointer to a netadr_t structure, so use "pointer" as type. Note that orpheu doesn't support netadr_t struct, so you probably need more code if you actually want to access data from it.
The second argument is the reason.
You are right, I looked and found that it contains 2 arguments, however, I did not know that void must be written as pointer on the function type. Guess you always learn something new.
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-22-2018 , 14:13   Re: Orpheu Signatures Collection
Reply With Quote #66

Quote:
Originally Posted by DarthMan View Post
I did not know that void must be written as pointer on the function type. Guess you always learn something new.
It doesn't. I was talking about argument type, not return type.
PHP Code:
void EXT_FUNC SV_RejectConnection(netadr_t *adrchar *fmt, ...) 
void is the return type, meaning function doesn't return anything. We don't add that in the file.
pointer is for "netadr_t *adr"
char * is for "char *fmt".

Note that this function is actually variadic(meaning it can have more than 2 arguments - notice the ...). I don't know how it will behave when called for such message, it may crash, it may not, I'm not sure(for example this call: https://github.com/dreamstalker/rehl...main.cpp#L1770)
__________________

Last edited by HamletEagle; 08-22-2018 at 14:17.
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 08-22-2018 , 14:35   Re: Orpheu Signatures Collection
Reply With Quote #67

Quote:
Originally Posted by HamletEagle View Post
Code:
{ 
    "name" : "SV_RejectConnection", 
    "library" : "engine", 
    "arguments" :
    [
        {
            "type"  : "pointer"
        },
        {
            "type"  : "char *"
        }
    ],
    "identifiers" : 
    [ 
        { 
            "os" : "windows", 
            "value" : [0x55,0x8B,0xEC,0x81,0xEC,0x00,0x04,0x00,0x00,0x8B,0x4D,0x0C]
        }, 
        { 
            "os" : "linux", 
            "value" : "SV_RejectConnection" 
        } 
    ] 
}
PHP Code:
#include <amxmodx>
#include <orpheu>

public plugin_init()
{
    
OrpheuRegisterHook(OrpheuGetFunction("SV_RejectConnection"), "SV_RejectConnection")
}

public 
SV_RejectConnection(DONT_MESS_WITH_MEreason[128])
{
    
server_print("Rejected connection with msg [%s]"reason)

You are missing the arguments.
The first one is a pointer to a netadr_t structure, so use "pointer" as type. Note that orpheu doesn't support netadr_t struct, so you probably need more code if you actually want to access data from it.
The second argument is the reason.
Parsing file "SV_RejectConnection" started
Function name must be a string
FAILED
Parsing file "SV_RejectConnection" ended
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-22-2018 , 14:41   Re: Orpheu Signatures Collection
Reply With Quote #68

Dunno what you did, maybe wrong encoding or something. I attached my file below.
Attached Files
File Type: zip SV_RejectConnection.zip (382 Bytes, 91 views)
__________________
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 08-22-2018 , 14:43   Re: Orpheu Signatures Collection
Reply With Quote #69

Quote:
Originally Posted by HamletEagle View Post
Dunno what you did, maybe wrong encoding or something. I attached my file below.
Strange,w ith your file, it worked. Maybe Notepadd++ saved it in the wrong format with BOOM.
DarthMan is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 08-18-2020 , 10:01   Re: Orpheu Signatures Collection
Reply With Quote #70

Hey, is it possible to develop signatures for PM_AirMove and PM_Move on ReHLDS? It seems that ReAPI's RG_PM_AirMove is buggy, and I wanted to try out an orpheu plugin that can help achieve custom-airacceleration. Thanks for helping out.
__________________
MaNaReaver is offline
Reply


Thread Tools
Display Modes

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 12:13.


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