// dllmain.cpp : 定义 DLL 应用程序的入口点。 #include "stdafx.h" #include "mhook-lib/mhook.h" #include <winsock2.h> //封包函数// typedef int (WINAPI *_send)(SOCKET s, const char *buf, int len, int flags); typedef int (WINAPI *_recv)(SOCKET s, char *buf, int len, int flags); _send g_trueSend = (_send)GetProcAddress(GetModuleHandleA( "Ws2_32" ), "send" ); _recv g_trueRecv = (_recv)GetProcAddress(GetModuleHandleA( "Ws2_32" ), "recv" ); mhook_func _msend = NULL; mhook_func _mrecv = NULL; static int WINAPI hook_send(SOCKET s, const char *buf, int len, int flags) {
i
|