學習API HOOK,編寫了一個winsock 的封包抓取程式,可免費使用;

來源:互聯網
上載者:User
開發環境是:windows 2000 + delphi 7

監視API:recv,recvfrom,WSARecvEx,send,sendto,accept,bind,closesocket,connect

socket 版本:wsock32.dll/*ws2_32.dll(暫時有相容問題)

目前還不支援修改封包;

當前實現針對某個進程或多個選定進程的通訊封包的監視功能。

內建HexEditor 即時查看封包內容

儲存的日誌格式如下:

[1:02:48]-[iexplore.exe]-[recv]-[Length:1]-[success]:
..

[1:02:48]-[iexplore.exe]-[send]-[Length:418]-[success]:
GET /search.asp HTTP/1.1..Accept: */*..Referer: http://hack.gameres.com/newthread.asp?forumid=102..Accept-Language: ;;zh-cn..Accept-Encoding: gzip, deflate..User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)..Host: hack.gameres.com..Connection: Keep-Alive..Cookie: GameRes=pmpop=1&settings%5Fbbschat=0&userid=3542&password=8c908deb0f4c3bd3&username=S%2EF%2E; ASPSESSIONIDCCRSADQD=AEFGOHGCDPLICBFMGJKFPJPO.....

[1:02:48]-[iexplore.exe]-[recv]-[Length:1024]-[success]:
....x..."...h.t.t.p.:././.h.a.c.k...g.a.m.e.r.e.s...c.o.m./.s.e.a.r.c

有問題請給我留言

sf_200510720162.rar (522328bytes)

程式為3個檔案:SocketMonitor.exe madCHook.dll SocketHook.dll

使用時請複製madCHook.dll 到 \Winnt\System32 或 Windows\System32目錄下去.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.