Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to capture localhost traffic on Windows using SocketSniff

📅 2012-Jan-31 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ nirsoft, packet capture ⬩ 📚 Archive



You want to test a network application on localhost, but Wireshark cannot capture localhost traffic on Windows. Wireshark uses the WinPcap library to capture network traffic on Windows. But unlike Linux, Windows does not expose a loopback network interface that can be used by WinPcap.


The solution is another awesome tool from Nirsoft called SocketSniff. This can be used to capture the network traffic of any Windows process. It captures the traffic on the Windows Sockets (WinSock) of the process and does capture any localhost traffic of this process that happens with the loopback network interface.

Tried with: SocketSniff 1.07

© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email