AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Not able to create a unique signature (https://forums.alliedmods.net/showthread.php?t=310080)

Spirit_12 08-18-2018 04:43

Not able to create a unique signature
 
I'm trying to hook a function, but couldn't create a unique signature for it. What are my other options?

asherkin 08-18-2018 05:32

Re: Not able to create a unique signature
 
The easiest way is to just include some bytes from the next function, which'll work fine until they're reordered - the more stable way is to create a signature to a (part of a) function that calls the function you're after, then extract the pointer to the function you want at runtime.

Spirit_12 08-18-2018 11:42

Re: Not able to create a unique signature
 
In your first suggestion, am I to believe that even if the signature ends on the next function the hook is still being created on the starting function?

As for the second option. I don’t think it is being called by any other function for me to extract pointer. Maybe one offset, but I’ll have to check again.

asherkin 08-18-2018 11:54

Re: Not able to create a unique signature
 
Quote:

Originally Posted by Spirit_12 (Post 2610936)
In your first suggestion, am I to believe that even if the signature ends on the next function the hook is still being created on the starting function?

Correct, the signature just finds the first byte.

Spirit_12 08-18-2018 14:31

Re: Not able to create a unique signature
 
The make signature script in sourcemod tools is not able to do this?

asherkin 08-18-2018 14:51

Re: Not able to create a unique signature
 
Quote:

Originally Posted by Spirit_12 (Post 2610960)
The make signature script in sourcemod tools is not able to do this?

No, it does its best to avoid letting you accidentally shoot yourself in the foot.

You could just comment out the end of function check.


All times are GMT -4. The time now is 04:54.

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