Fastest way to scan ports with Java

后端 未结 6 1382
借酒劲吻你
借酒劲吻你 2020-11-30 21:46

I made a very simple port scanner, but it runs too slow, so I\'m looking for a way to make it scan faster. Here is my code:

public boolean portIsOpen(String          


        
6条回答
  •  无人及你
    2020-11-30 21:56

    Apart from parallelizing the scan, you can use more advanced port scanning techniques like the ones (TCP SYN and TCP FIN scanning) explained here: http://nmap.org/nmap_doc.html. VB code of an implementation can be found here: http://h.ackack.net/spoon-worlds-fastest-port-scanner.html

    In order to use these techniques, however, you need to use raw TCP/IP sockets. You should use RockSaw library for this.

提交回复
热议问题