mailing list archives
Re: Implementing Nmap within a Java Program
From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 29 May 2008 17:16:25 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Supratim Sarkar wrote:
Cheers to Fyodor first for having created such a freat tool.
Now I was trying to develop a Scanner/Asset Management kind of tool with
nmap. I started on with java.(JDK 1.6) Platform is Win XP Pro.
Hi. There are Nmap wrappers in several scripting languages (Perl, Python,
Ruby, etc) which you may be interested in using instead, unless you really
need to use Java. But on to your problem..
The nmap cmd string is something like this :
nmap.exe -sSU -pT:*,U:53,67,161 -sV --version-light -T4-v -P0 -n -PU -oX
The cmd1 string looks like
NETSCAN.exe "nmap.exe -sT -pT:*,U:53,67,161 -sV --version-light -T4-v -P0 -n
-PU -oX dataone.xml xx.xx.xx.xx-xx"
Now the thing is that the nmap program starts as I can checkout by running
task manager and that the xml file is also generated. But it keeps going on
and does not terminate.Its like nmap hangs somewhere in the middle of the
Are you sure that Nmap isn't just taking a while to scan? Is the generated
XML file complete? You're not explicit enough here :)
You're scanning 1200+ TCP ports, some UDP ports, AND you're doing a service
scan (albeit light), ALL against multiple hosts. Have you tried something
smaller like one port on one host to rule this out?
I'm also not familiar with process creation/execution under Java, so there may
be an issue there I'm unaware of.
It would be of great help if someone can help me out with this
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Sent through the nmap-dev mailing list
Archived at http://SecLists.Org