views:

60

answers:

1

Hey guys,

I need to get the protocol version of an application, and I don't know too much about the inner workings of detouring. I usually use a detour class written by a friend of mine (Not windows detour, as this works on win/linux) but im wondering if anyone can give me some insight on how to retrieve the value of a global pointer? I found a function which uses it, but the class I use only allows for you to rewrite functions, not access individual lines. Here is what the assembly looks like from IDA...

I need to get the value of "gpszVersionString_ptr"

http://www.ampaste.net/m57f13aba

Edit

Sorry, it lost formatting so i had to ampaste it.

A: 

if it's already a compiled binary. How about extracting the string using string pattern match? For example you can read in the file char by char and search for the pattern:

Protocol version %i\nExe version %s (%s)

t.g.