CodeNapper - API hooking for free!

Developed or developing a new product in PureBasic? Tell the world about it.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

CodeNapper - API hooking for free!

Post by thefool »

I got in touch with good old PolyVector who still is alive, and doing well :)

Several people has asked for this library, including myself.
I finally got the CodeNapper package (without source, though).
Its consisting of a DLL, a reference and some examples..

CodeNapper is an API hooking library, also supporting trampoline functions, and a simple way of injecting DLL's (wich you need for API hooking in other app's!)

It can easly let you replace an api function with a procedure of your own :)


NOTE:
As you initialize the lib, you need to call the function "CodeNapperRegister".
Like the reference says, the command need 2 parameters, User and Key (both strings!). He did a small change, so whatever you put in there it will get registered and you will have the full functionality. You MUST call this before anything else!

Apart from that, have fun. And thanks to polyvector for sharing this :)


File:1->CodeNapper.zip
Image

edit: All examples are now updated for pb 4.0.
Last edited by thefool on Thu May 18, 2006 10:28 pm, edited 1 time in total.
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Nice...
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Very Nice! Thank You very much :)
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Support for w95/98?
I don't think so..

?
User avatar
Maxus
User
User
Posts: 71
Joined: Thu Feb 16, 2006 9:35 am
Location: Russia
Contact:

Post by Maxus »

And it is possible to find out how functions API directly in most DLL or in current process are intercepted.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Edwin Knoppert wrote:Support for w95/98?
I don't think so..

?
why don't you test it. My computer isn't 5 years old :P
(But i can't really remember. ITS POSSIBLE that the support is there!)

maxus, what do you mean? Its not made to be "crackproof", it has other things to do. If you want that, you gotta code for it. It has nummerous of other uses.. see the examples!

no problem, SFSxOI
User avatar
Maxus
User
User
Posts: 71
Joined: Thu Feb 16, 2006 9:35 am
Location: Russia
Contact:

Post by Maxus »

I was going to use it for protection of the programs on Blitz3D.
And thus planned to start EXE from memory, not keeping on HDD.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

And why would api hooking be needed there? Its not what you need.

You need to throw the exe and smack the addr. pointer to the correct place, and more than that.
Post Reply