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: [PATCHed] Print IP addresses with --packet-trace -sO

[PATCHed] Print IP addresses with --packet-trace -sO

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Sat, 03 Feb 2007 20:20:27 -0600

The attached patch (/nmap SVN r4466) prints the IP addresses in
ippackethdrinfo() when it encounters an unknown protocol. This function
is mainly used when doing --packet-trace, and we get unknown protocols a
lot when using -sO.

Lemme know what you think.

Thanks,
Kris Katterjohn

Index: tcpip.cc
===================================================================
--- tcpip.cc (revision 4465)
+++ tcpip.cc (revision 4466)
@@ -636,8 +636,8 @@
     snprintf(protoinfo, sizeof(protoinfo), "ICMP %s > %s %s (type=%d/code=%d) %s",
              srchost, dsthost, icmptype, ping->type, ping->code, ipinfo);
   } else {
- snprintf(protoinfo, sizeof(protoinfo), "Unknown protocol (%d): %s",
- ip->ip_p, ipinfo);
+ snprintf(protoinfo, sizeof(protoinfo), "Unknown protocol (%d) %s > %s: %s",
+ ip->ip_p, srchost, dsthost, ipinfo);
   }
 
   return protoinfo;

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

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