We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
对于简单的一个,它只是尝试连接到每个端口并报告成功/失败,没有任何“技巧”,例如仅发送 ACK 数据包等 - 除了 System.Net 之外,您不需要任何其他东西> 和
System.Net.Sockets
,创建套接字,尝试连接到主机,检查是否成功。为了获得更好的性能,您可以创建更多套接字,并使用异步方法(BeginConnect/EndConnect)。For simple one, that will just try to connect to each port and report success / failure, without any "tricks", like sending only ACK packets etc. - you won't need anything else than
System.Net
andSystem.Net.Sockets
, create socket, try connecting to a host, check if you have succeeded. For better performance, you can create more sockets, and use asynchronous approach (BeginConnect/EndConnect).我找到了一些示例代码。
http://www.geekpedia.com/tutorial142_Creating-a- Port-Scanner-with-Csharp.html
http: //www.dijksterhuis.org/building-a-simple-portscanner-in-c/
WinPcap 是一个网络监控和数据包捕获工具,但它也可能很有用,因为它是了解网络传输的另一种方式。但它可能不适合您的要求。
I found some example codes.
http://www.geekpedia.com/tutorial142_Creating-a-Port-Scanner-with-Csharp.html
http://www.dijksterhuis.org/building-a-simple-portscanner-in-c/
WinPcap is a network monitoring and packet capturing tool but it might be also useful because it is another way to get an idea about network transmissions. But it may not suit to your requirement.
你可以在这里尝试我的开源程序;)
http://dercousin.xhost.ro/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=53
You can try my open source program here ;)
http://dercousin.xhost.ro/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=53
您可以使用 Pcap.Net 创建和发送原始数据包。
您还可以使用此框架捕获数据包。
它包括一个数据包解释和创建框架,因此应该很容易创建扫描端口和解析返回的数据包所需的数据包。
You can use Pcap.Net to create and send raw packets.
You can also capture packets using this framework.
It includes a packet interpretation and creation framework so it should be pretty easy to create the packets you need to scan the ports and to parse the packets returned.