Pregunta

Is there a way to intercept TCP and UDP traffic that is inside localhost on Windows in C#? For example an app running on localhost sending messages through TCP and/or UDP on localhost... I need to intercept these to determine the efficiency of data of the program, for this I'm building an utility tool in C# (need a self build solution no product)

¿Fue útil?

Solución

Usually you have to use program like wireshark to capture loopback (127.0.0.1) traffic, but it's impossible for libpcap on Windows. (read this note)

You have to use Raw Cap if you want to sniff the loopback interface

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top