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

function hooking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mooman2
Member
Join Date: Apr 2007
Old 04-25-2007 , 01:20   function hooking
Reply With Quote #1

In Linux server, instead of manually hooking a function by using the vtable offset, is it possible to do it with finding the symbol during runtime instead?

I got the idea after looking at the CS:S rpg source and its use of GetProcAddress, but it didn't hook any functions with that.

Sorry if I got any of this wrong, but I'm a newbie to this stuff.
mooman2 is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-25-2007 , 07:50   Re: function hooking
Reply With Quote #2

It is possible yes and only in linux and not through SourceMM, the only obstacle you have is finding a hooking mechanism which can hook non-classmember functions. Some guy was touting one a while ago on the IRC channel, I had a look and failed to get it to work as cleanly as he had originally stated so I left it alone...
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
BAILOPAN
Join Date: Jan 2004
Old 04-25-2007 , 08:43   Re: function hooking
Reply With Quote #3

It's called detouring and unfortunately you need to have a decent grasp of assembly before you jump into that realm. However, there's a lot of good literature on it, including Microsoft's Detour Library's whitepaper.
__________________
egg
BAILOPAN is offline
mooman2
Member
Join Date: Apr 2007
Old 04-25-2007 , 18:37   Re: function hooking
Reply With Quote #4

hmm....

so it would basically be really hard for me to try and hook, but is there a possibility of calling it like any member function?
mooman2 is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-26-2007 , 03:08   Re: function hooking
Reply With Quote #5

Of course.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Reply



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 19:44.


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