Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Small Bug in SVN revision 28643: Missing newline in gnmap output (diff included)
From: jah <jah () zadkiel plus com>
Date: Tue, 22 May 2012 21:48:07 +0100

On 21/05/2012 07:23, Matthew Morgan wrote:
There is a missing newline in gnmap output when there is a host timeout.

Here is example gnmap output showing the missing newline:

Host: 127.0.0.208 (host208)        Status: Up
Host: 127.0.0.208 (host208)        Status: TimeoutHost: 127.0.0.209
(host209) Status: Up
Host: 127.0.0.209 (host209)        Status: TimeoutHost: 127.0.0.211
(host211) Status: Up
Host: 127.0.0.211 (host211)        Status: TimeoutHost: 127.0.0.212
(host212) Status: Up
Host: 127.0.0.212 (host212)        Status: TimeoutHost: 127.0.0.213
(host213) Status: Up
Host: 127.0.0.213 (host213)        Status: TimeoutHost: 127.0.0.214
(host214) Status: Up
Host: 127.0.0.214 (host214)        Status: TimeoutHost: 127.0.0.215
(host215) Status: Up


Expected outcome after adding newline:

Host: 127.0.0.208 (host208)        Status: Up
Host: 127.0.0.208 (host208)        Status: Timeout
Host: 127.0.0.209 (host209) Status: Up
Host: 127.0.0.209 (host209)        Status: Timeout
Host: 127.0.0.211 (host211) Status: Up
Host: 127.0.0.211 (host211)        Status: Timeout
Host: 127.0.0.212 (host212) Status: Up
Host: 127.0.0.212 (host212)        Status: Timeout
Host: 127.0.0.213 (host213) Status: Up
Host: 127.0.0.213 (host213)        Status: Timeout
Host: 127.0.0.214 (host214) Status: Up
Host: 127.0.0.214 (host214)        Status: Timeout
Host: 127.0.0.215 (host215) Status: Up


Here is the diff from svn revision 28643:

[01:09:28] willdeed () blotter27:~/src/nmap-svn/nmap $ diff nmap.cc nmap-new.cc
1991c1991
<          log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Timeout",
---
         log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Timeout\n",

Hi Matthew,

I think you're correct; here's another example where the timed-out host is the last host listed and the final summary 
line erroneously appears on the same line:

# Nmap 6.01 scan initiated Tue May 22 21:15:03 2012 as: nmap -sS -p80 -d -n -oG timeout-nmap.txt --host-timeout 100ms 
192.168.1.5 212.159.6.9
# Ports scanned: TCP(1;80) UDP(0;) SCTP(0;) PROTOCOLS(0;)
Host: 192.168.1.5 ()    Status: Up
Host: 192.168.1.5 ()    Ports: 80/open/tcp//http///
Host: 212.159.6.9 ()    Status: Up
Host: 212.159.6.9 ()    Status: Timeout# Nmap done at Tue May 22 21:15:03 2012 -- 2 IP addresses (2 hosts up) scanned 
in 0.41 seconds

I've committed this to the subversion repository as r28658.

Regards,

jah

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]