【问题标题】:How to get an application listening ports with windows c++ api如何使用 windows c++ api 获取应用程序侦听端口
【发布时间】:2021-10-23 02:42:47
【问题描述】:

如 Windows 资源监视器中所示:

我想分析应用程序的网络流量,但我不知道 Windows API。我用过scapy或者wireshark,但是不知道这个应用是什么数据包。

所以,我想先获取监听端口。但我不知道 API。

【问题讨论】:

    标签: winapi network-monitoring windows-networking


    【解决方案1】:

    您可以使用GetTcpTable2()GetExtendedTcpTable() 枚举打开的TCP 端口,确定哪些端口是侦听器,并获取每个端口的所属进程。

    您可以使用GetExtendedUdpTable() 来枚举开放的UDP 端口并获取每个人拥有的进程。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-10
      • 2014-06-12
      • 2023-03-17
      相关资源
      最近更新 更多