Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Exploit World
Advertising
About/Contact
Credits
Sponsors:



Nmap Development: [Exp PATCH] Bail out of Traceroute::trace() with no valid targets

[Exp PATCH] Bail out of Traceroute::trace() with no valid targets

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Mon, 19 Mar 2007 11:56:57 -0500

The attached patch (/nmap-exp/kris SVN r4590) bails out of
Traceroute::trace() if no valid targets are given.

Here's the SVN log:

------------------------------------------------------------------------
r4590 | kris | 2007-03-19 11:47:57 -0500 (Mon, 19 Mar 2007) | 1 line

Bail out of Traceroute::trace() if no valid targets are available.
Before, it would essentially just run through the rest of the function
without doing much of anything. So if we were trying to traceroute a
machine that's directly connected, the "Initiating"/"Completed" messages
would still appear even though no tracing would be done.
------------------------------------------------------------------------

I wasn't sure if this (the printing of the "Initiating"/"Completed"
lines) was desirable or not. No TRACEROUTE table is printed if there
are no valid targets, and no actual tracing is done, so I didn't think
these should be printed. Plus, there's no need to go through the rest
of the function if there aren't any valid targets, anyway.

Lemme know what you think :)

Thanks,
Kris Katterjohn

Index: traceroute.cc
===================================================================
--- traceroute.cc (revision 4589)
+++ traceroute.cc (revision 4590)
@@ -814,6 +814,9 @@
      * legitimate to trace to */
     sendTTLProbes (Targets, valid_targets);
 
+ if (!valid_targets.size())
+ return;
+
     SPM = new ScanProgressMeter ("Traceroute");
 
     while (!readTraceResponses ()) {

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

Received on Mar 19 2007
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]