Domanda

Is there an NMap wrapper implementation for Java ? I searched for it but could not find one. I want to scan network and detect applications running based on some port's state. I guess this must be a pretty common problem.

If its not nmap, then can somebody suggest alternate tools to detect the same.

Thanking in advance.

È stato utile?

Soluzione

nmap is perfect. I used to run it as external process from java and parse its output. It is simple, so I recommend you to do the same. Surely you can implement your own "wrapper" that supports use-cases you need.

Altri suggerimenti

There is an open source library called nmap4j that will run Nmap for you and parse the XML into objects. It's on sourceforge.net.

nmap4j doesn't quite correctly utilize the Process output streams consumption. That directs to a nmap process hung after start (especially when nmap produces large output). + it doesn't work on Windows so far.

I wrote my own asynchronous portscanner java service that automates the port scanning for TCP-SYN-scan and ICMP scan like Nmap does. It does not incur the performance impact of creating Nmap processes because it uses pcap directly via a java binding: https://github.com/subes/invesdwin-webproxy

It works on a large scale and can exhaust your network if you configure too low request limits.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top