Raised This Month: $7 Target: $400
 1% 

Solved Orpheu. Why signature is not working?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-15-2020 , 11:19   Orpheu. Why signature is not working?
Reply With Quote #1

I'm trying to use Orpheu to hook into Con_Printf (in the latest version of ReHLDS) but for some reason it's not detecting it.

What am I doing wrong?

amxmodx/configs/orpheu/functions/Con_Printf
Code:
{
    "name" : "Con_Printf",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "char *"
        },
        {
            "type" : "char *"
        }
    ],
    "identifiers" :
    [
        {
            "os"    : "linux",
            "mod"   : "ricochet",
            "value" : "_Z10Con_PrintfPKcz"
        }
    ]
}
orpheu config output
Code:
Orpheu functions search started.

        Parsing functions started.

                Parsing file "Con_Printf" started
                                Argument type "char *" validated
                                Argument type "char *" validated
                                Searching for name "_Z10Con_PrintfPKcz"... NOT FOUND
                Parsing file "Con_Printf" ended
        Parsing functions ended.


Orpheu functions search ended.
__________________

Last edited by gabuch2; 04-16-2020 at 13:47.
gabuch2 is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 04-15-2020 , 12:12   Re: Orpheu. Why signature is not working?
Reply With Quote #2

Not sure but i guess orpheu doesn't work on rehlds
__________________
JusTGo is offline
arnalll
Member
Join Date: Nov 2015
Location: France
Old 04-15-2020 , 16:14   Re: Orpheu. Why signature is not working?
Reply With Quote #3

I think you need to find the right signature for REHLDS.
arnalll is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-15-2020 , 16:24   Re: Orpheu. Why signature is not working?
Reply With Quote #4

This signature was found on ReHLDS's engine_i486.so, on Release 3.7.0.695.
__________________
gabuch2 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-16-2020 , 02:43   Re: Orpheu. Why signature is not working?
Reply With Quote #5

Quote:
Originally Posted by Gabe Iggy View Post
This signature was found on ReHLDS's engine_i486.so, on Release 3.7.0.695.
You can't use symbols on ReHLDS.
You have to make a signature.
But bear in mind that the server will crash if you try to hook a function with arguments, even with a correct signature, if you try to change it's parameters.

You can read more here, Asmodai is talking about Orpheu/Okapi
https://www.dedicated-server.ru/vbb/...67&postcount=4

Last edited by DarthMan; 04-16-2020 at 02:44.
DarthMan is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-16-2020 , 13:47   Re: Orpheu. Why signature is not working?
Reply With Quote #6

I understand now, I got the terms signature and symbol mixed up

Code:
{
    "name" : "Con_Printf",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "char *"
        },
        {
            "type" : "char *"
        }
    ],
    "identifiers" :
    [
        {
            "os"    : "linux",
            "mod"   : "ricochet",
            "value" : [0x8D,0x4C,0x24,0x04,0x83,0xE4,0xF0,0xFF,0x71,0xFC,0x55,0x8D,0x41,0x04,0x89,0xE5]
        }
    ]
}
This worked.

Thank you!
__________________

Last edited by gabuch2; 04-16-2020 at 13:47.
gabuch2 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-16-2020 , 17:59   Re: Orpheu. Why signature is not working?
Reply With Quote #7

Quote:
Originally Posted by Gabe Iggy View Post
I understand now, I got the terms signature and symbol mixed up

Code:
{
    "name" : "Con_Printf",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "char *"
        },
        {
            "type" : "char *"
        }
    ],
    "identifiers" :
    [
        {
            "os"    : "linux",
            "mod"   : "ricochet",
            "value" : [0x8D,0x4C,0x24,0x04,0x83,0xE4,0xF0,0xFF,0x71,0xFC,0x55,0x8D,0x41,0x04,0x89,0xE5]
        }
    ]
}
This worked.

Thank you!
You're welcome.
Keep always the first byte. Replace any other bytes with ? then make the signature.
DarthMan 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 06:22.


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