Nmap Development mailing list archives

got sd > 2047 in pos_scan on windows XP + java


From: stephane parenton <stephane () parenton com>
Date: Sun, 01 Jun 2003 09:18:27 +0200

Hi everyone,

I try to run nmap 3.27 (command line version) from a java class. When run from a linux box, the java/nmap(2.54beta31) runs perfectly, there is no trouble. but the same class runs into troubles when on win XP. we have an trace like this :

the nmap line is : nmap.exe -sT -P0 -p 21,22,23,25,110 -oX g:\webxml\fortestingonly.xml one_single_ip

OUTPUT>
OUTPUT>Starting nmap 3.27 ( www.insecure.org/nmap ) at 2003-06-01 08:49 Paris, Madrid (heure d'été)
ERROR>got sd > 2047 in pos_scan
ERROR>
ERROR>QUITTING!

the exit value is 1 !

What i don't understand is the nmap command runs perfectly from a command line, so i thought at the beginning that it was only a java problem... but it doesn't seems to be ONLY java... because it is nmap that fails and the xml file is not ended. actually it seems to stop when starting the port scan of the first ip tested...

for those interested in the java code, here's a sample.... (cmd is the nmap line)...

if(System.getProperty("os.name").indexOf("Linux")>=0){
           p = Runtime.getRuntime().exec(cmd);
       }else{
          p = Runtime.getRuntime().exec("cmd /C " + cmd);
          }
...
int exitVal = p.waitFor();
...


has anyone heard of this problem or has clues in order to run nmap the right way ?
TIA
Stephane


---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).



Current thread: