[英]How to get an application listening ports with windows c++ api
As show in Windows Resource Monitor:如 Windows 资源监视器中所示:
I want to analyse network traffic of an application, but I dont know the Windows API.我想分析应用程序的网络流量,但我不知道 Windows API。 I used scapy or wireshark , but I don't know what data packages are this application.
我使用了scapy或wireshark ,但我不知道这个应用程序是什么数据包。
So, I want to get the listening port first.所以,我想先获取监听端口。 But I don't know the API.
但我不知道API。
You can use GetTcpTable2()
or GetExtendedTcpTable()
to enumerate open TCP ports, determining which ports are listeners, and get each one's owning process.您可以使用
GetTcpTable2()
或GetExtendedTcpTable()
枚举打开的 TCP 端口,确定哪些端口是侦听器,并获取每个端口的拥有进程。
You can use GetExtendedUdpTable()
to enumerate open UDP ports and get each one's owning process.您可以使用
GetExtendedUdpTable()
枚举打开的 UDP 端口并获取每个人的拥有进程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.