我试图弄清楚如何扫描IP地址范围内的特定TCP端口?
到目前为止,这是我的代码:
static void Main(string[] args)
{
IPAddress beginIP = IPAddress.Parse("192.168.1.1");
IPAddress EndIP = IPAddress.Parse("192.168.3.3");
int PortNumber = 80;
bool portStatu = scanPort(BeginIP,EndIP,PortNumber);
}
public bool scanPort(IPAddress beginIP,IPAddress endIP , int portNumber)
{
//What should i write...
}
相关分类