Reputation: 21
As show in Windows Resource Monitor:
I want to analyse network traffic of an application, but I dont know the Windows API. I used scapy or wireshark, but I don't know what data packages are this application.
So, I want to get the listening port first. But I don't know the API.
Upvotes: 2
Views: 1396
Reputation: 598134
You can use GetTcpTable2()
or GetExtendedTcpTable()
to enumerate open TCP ports, determining which ports are listeners, and get each one's owning process.
You can use GetExtendedUdpTable()
to enumerate open UDP ports and get each one's owning process.
Upvotes: 2