SPI攔截網路封包 DLL篇

2021-03-31 15:08:30 字數 1267 閱讀 9974

#include

#include

#include

#pragma ***ment(lib, "ws2_32.lib")

//// 用來儲存系統服務提供者路徑資訊的自定義登錄檔鍵值

//#define reg_install_key "system//currentcontrolset//services//winsock2//myspi"

//// 全域性變數,用來儲存系統服務提供者30個服務函式指標

//wspproc_table nextproctable;

char tempfile[256];

char winpath[256];

void getrightentryiditem(in wsaprotocol_infow *pprotocolinfo,

out tchar *sitem)

else

}bool gethookprovider(in wsaprotocol_infow *pprotocolinfo,

out tchar    *spathname)

socket wspapi wspsocket(int  af,                              

int  type,                            

int  protocol,                        

lpwsaprotocol_infow lpprotocolinfo,  

group g,                             

dword dwflags,                       

lpint lperrno)

bool winapi dllmain(hinstance hmodule,

dword  ul_reason_for_call,

lpvoid  lpreserved)

else if(ul_reason_for_call == dll_process_detach)

return true;

}int wspapi wspstartup( word    wversionrequested,

lpwspdata   lpwspdata,

lpwsaprotocol_infow lpprotocolinfo,

wspupcalltable  upcalltable,

lpwspproc_table  lpproctable)