文件名称:apihooktest2
-
所属分类:
- 标签属性:
- 上传时间:2008-10-13
-
文件大小:143.59kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一、前言
前一段时间发表了一篇文章 “Hook API 工具”,没有附带主程序的源代码,这几天翻出来代码加了些注释,现在补上。不过大家还是最好看看牛的书,书上讲解很详细。
二、对代码的简单说明
总共3个工程,1个主程序,1个HookDll, 1个例子Dll。主程序负责启动进程,并将 HookDll 注入。还有一些额外的功能,比如显示 Log, 例子Dll的信息,导出函数等,HookDll 在 DllMain 启动的时候根据配置钩住指定的 API 函数
三、这种方法的缺点
这种方法是在系统 API 函数起始代码 和 自定义代码之间切换。在多线程的环境下,如果正在切换的过程,其它线程调用这个函数,会出现异常,同时,如果已经切换回系统代码,其它线程对这个API 的调用将抓不到。解决方法就是不要切换,这点应该是可以做到的。
四、结束语
在例子Dll 中,模仿了 ws_32.dll 的输出函数,但是不全,而且 Log 信息也不足,感兴趣的朋友如果有比较全的版本别忘了发给我一份 :)
程序大家可以随意修改,保留那个林月如的 Icon 就行了 ^_^
-one, the preamble some time ago published an article entitled "Hook API tool," not incidental to the main program source code, which turned out a few days code plus some notes now fill. But we still look at the best cattle in the book, spoke on the very detailed. Two of the code simple instructions a total of three projects, a program, a HookDll, an example Dll. Main program to start the process and will HookDll injection. There are some additional features, such as Log shows examples Dll information derived function, in DllMain HookDll boot time configuration hooked designated API Function 3, the shortcomings of this method This method is the system API function code and starting from the definition of switching between code. In multithreaded environment, if the switching proces
前一段时间发表了一篇文章 “Hook API 工具”,没有附带主程序的源代码,这几天翻出来代码加了些注释,现在补上。不过大家还是最好看看牛的书,书上讲解很详细。
二、对代码的简单说明
总共3个工程,1个主程序,1个HookDll, 1个例子Dll。主程序负责启动进程,并将 HookDll 注入。还有一些额外的功能,比如显示 Log, 例子Dll的信息,导出函数等,HookDll 在 DllMain 启动的时候根据配置钩住指定的 API 函数
三、这种方法的缺点
这种方法是在系统 API 函数起始代码 和 自定义代码之间切换。在多线程的环境下,如果正在切换的过程,其它线程调用这个函数,会出现异常,同时,如果已经切换回系统代码,其它线程对这个API 的调用将抓不到。解决方法就是不要切换,这点应该是可以做到的。
四、结束语
在例子Dll 中,模仿了 ws_32.dll 的输出函数,但是不全,而且 Log 信息也不足,感兴趣的朋友如果有比较全的版本别忘了发给我一份 :)
程序大家可以随意修改,保留那个林月如的 Icon 就行了 ^_^
-one, the preamble some time ago published an article entitled "Hook API tool," not incidental to the main program source code, which turned out a few days code plus some notes now fill. But we still look at the best cattle in the book, spoke on the very detailed. Two of the code simple instructions a total of three projects, a program, a HookDll, an example Dll. Main program to start the process and will HookDll injection. There are some additional features, such as Log shows examples Dll information derived function, in DllMain HookDll boot time configuration hooked designated API Function 3, the shortcomings of this method This method is the system API function code and starting from the definition of switching between code. In multithreaded environment, if the switching proces
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ApiHookTest
ApiHookTest/ApiHookTest.clw
ApiHookTest/ApiHookTest.cpp
ApiHookTest/ApiHookTest.dsp
ApiHookTest/ApiHookTest.dsw
ApiHookTest/ApiHookTest.h
ApiHookTest/ApiHookTest.rc
ApiHookTest/ApiHookTestDlg.cpp
ApiHookTest/ApiHookTestDlg.h
ApiHookTest/ApiHookTool
ApiHookTest/ApiHookTool/Bin
ApiHookTest/ApiHookTool/Bin/ApiHook.exe
ApiHookTest/ApiHookTool/Bin/config.dat
ApiHookTest/ApiHookTool/Bin/config.ini
ApiHookTest/ApiHookTool/Bin/Hook.dll
ApiHookTest/ApiHookTool/Bin/SockHookFun.dll
ApiHookTest/ApiHookTool/Bin/tmp.txt
ApiHookTest/DataEngine.cpp
ApiHookTest/DataEngine.h
ApiHookTest/DllInfoDlg.cpp
ApiHookTest/DllInfoDlg.h
ApiHookTest/HookProcess.cpp
ApiHookTest/HookProcess.h
ApiHookTest/HSock
ApiHookTest/HSock/config.dat
ApiHookTest/HSock/DataEngine.cpp
ApiHookTest/HSock/DataEngine.h
ApiHookTest/HSock/HookApiInterFace.h
ApiHookTest/HSock/HookProcess.cpp
ApiHookTest/HSock/HookProcess.h
ApiHookTest/HSock/Hooks.cpp
ApiHookTest/HSock/Hooks.h
ApiHookTest/HSock/HSock.cpp
ApiHookTest/HSock/HSock.dsp
ApiHookTest/HSock/HSock.dsw
ApiHookTest/HSock/HSock.h
ApiHookTest/HSock/HSock.plg
ApiHookTest/HSock/ReadMe.txt
ApiHookTest/HSock/StdAfx.cpp
ApiHookTest/HSock/StdAfx.h
ApiHookTest/MyStatic.cpp
ApiHookTest/MyStatic.h
ApiHookTest/res
ApiHookTest/res/ApiHookTest.ico
ApiHookTest/res/ApiHookTest.rc2
ApiHookTest/res/Thumbs.db
ApiHookTest/Resource.h
ApiHookTest/SockHookFun
ApiHookTest/SockHookFun/Hook.lib
ApiHookTest/SockHookFun/HookApiInterFace.h
ApiHookTest/SockHookFun/HSock.lib
ApiHookTest/SockHookFun/res
ApiHookTest/SockHookFun/res/111.bmp
ApiHookTest/SockHookFun/res/Thumbs.db
ApiHookTest/SockHookFun/resource.h
ApiHookTest/SockHookFun/SockHookFun.cpp
ApiHookTest/SockHookFun/SockHookFun.def
ApiHookTest/SockHookFun/SockHookFun.dsp
ApiHookTest/SockHookFun/SockHookFun.dsw
ApiHookTest/SockHookFun/SockHookFun.h
ApiHookTest/SockHookFun/SockHookFun.rc
ApiHookTest/SockHookFun/StdAfx.cpp
ApiHookTest/SockHookFun/StdAfx.h
ApiHookTest/StdAfx.cpp
ApiHookTest/StdAfx.h
www.dssz.com.txt
ApiHookTest/ApiHookTest.clw
ApiHookTest/ApiHookTest.cpp
ApiHookTest/ApiHookTest.dsp
ApiHookTest/ApiHookTest.dsw
ApiHookTest/ApiHookTest.h
ApiHookTest/ApiHookTest.rc
ApiHookTest/ApiHookTestDlg.cpp
ApiHookTest/ApiHookTestDlg.h
ApiHookTest/ApiHookTool
ApiHookTest/ApiHookTool/Bin
ApiHookTest/ApiHookTool/Bin/ApiHook.exe
ApiHookTest/ApiHookTool/Bin/config.dat
ApiHookTest/ApiHookTool/Bin/config.ini
ApiHookTest/ApiHookTool/Bin/Hook.dll
ApiHookTest/ApiHookTool/Bin/SockHookFun.dll
ApiHookTest/ApiHookTool/Bin/tmp.txt
ApiHookTest/DataEngine.cpp
ApiHookTest/DataEngine.h
ApiHookTest/DllInfoDlg.cpp
ApiHookTest/DllInfoDlg.h
ApiHookTest/HookProcess.cpp
ApiHookTest/HookProcess.h
ApiHookTest/HSock
ApiHookTest/HSock/config.dat
ApiHookTest/HSock/DataEngine.cpp
ApiHookTest/HSock/DataEngine.h
ApiHookTest/HSock/HookApiInterFace.h
ApiHookTest/HSock/HookProcess.cpp
ApiHookTest/HSock/HookProcess.h
ApiHookTest/HSock/Hooks.cpp
ApiHookTest/HSock/Hooks.h
ApiHookTest/HSock/HSock.cpp
ApiHookTest/HSock/HSock.dsp
ApiHookTest/HSock/HSock.dsw
ApiHookTest/HSock/HSock.h
ApiHookTest/HSock/HSock.plg
ApiHookTest/HSock/ReadMe.txt
ApiHookTest/HSock/StdAfx.cpp
ApiHookTest/HSock/StdAfx.h
ApiHookTest/MyStatic.cpp
ApiHookTest/MyStatic.h
ApiHookTest/res
ApiHookTest/res/ApiHookTest.ico
ApiHookTest/res/ApiHookTest.rc2
ApiHookTest/res/Thumbs.db
ApiHookTest/Resource.h
ApiHookTest/SockHookFun
ApiHookTest/SockHookFun/Hook.lib
ApiHookTest/SockHookFun/HookApiInterFace.h
ApiHookTest/SockHookFun/HSock.lib
ApiHookTest/SockHookFun/res
ApiHookTest/SockHookFun/res/111.bmp
ApiHookTest/SockHookFun/res/Thumbs.db
ApiHookTest/SockHookFun/resource.h
ApiHookTest/SockHookFun/SockHookFun.cpp
ApiHookTest/SockHookFun/SockHookFun.def
ApiHookTest/SockHookFun/SockHookFun.dsp
ApiHookTest/SockHookFun/SockHookFun.dsw
ApiHookTest/SockHookFun/SockHookFun.h
ApiHookTest/SockHookFun/SockHookFun.rc
ApiHookTest/SockHookFun/StdAfx.cpp
ApiHookTest/SockHookFun/StdAfx.h
ApiHookTest/StdAfx.cpp
ApiHookTest/StdAfx.h
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.