SA-MP Forums Archive
[Tool/Web/Other] cHook - c Code in pwn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] cHook - c Code in pwn (/showthread.php?tid=645218)



cHook - c Code in pwn - Nero_3D - 23.11.2017

cHook

this is work in process, so I am open for suggestions

Just a small example
PHP Code:
#include <a_samp>
#include <chook> // this include forces you to compile with chook, see github
cHooktest((( // chook: namespace (not used yet)
    
int gInt 4;
    
CHOOK_PAWN myfunc(aFloatb) {
        return 
gInt;
    }
)))
main() { // at the moment it is myfunc, in a upcoming version it will be test::myfunc
    
printf("%d"myfunc(13.0)); // should print "8" (1 + 3 + 4)

Note: This version is limited to basic code, any external function will crash your server

Download and readme => github

Tested on windows, with g++ and objdump


Re: cHook - c Code in pwn - Marllun - 23.11.2017

Nice


Re: cHook - c Code in pwn - PatrickGTR - 23.11.2017

Classes and objects is a must and should be added in future, good luck with the project! - Looking forward to see the progress on this.