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
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: -p option doesn't reject certain invalid inputs

Re: -p option doesn't reject certain invalid inputs

From: <doug_at_hcsw.org>
Date: Wed, 28 May 2008 15:27:16 -0700

On Wed, May 28, 2008 at 08:49:22AM -0600 or thereabouts, David Fifield wrote:
> I found that the -p option doesn't reject stray ] characters in its
> input, and in fact ignores anything after it finds one.

Thanks for finding this. I just committed a tiny patch that adds
better error checking:

$ svn diff nmap.cc
Index: nmap.cc
===================================================================
--- nmap.cc (revision 7740)
+++ nmap.cc (working copy)
@@ -2321,7 +2321,10 @@
     /* Find the next range */
     while(isspace((int) *current_range)) current_range++;

- if (*current_range == ']') return;
+ if (*current_range == ']') {
+ if (!nested) fatal("Unexpected ] character in port/protocol specification");
+ return;
+ }

     if (*current_range && *current_range != ',') {
       fatal("Error #488: Your port specifications are illegal. Example of proper form: \"%s\"", syntax_example);

Doug

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

Received on May 28 2008
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]