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: [PATCH] Add --dtd and --webdtd for <!DOCTYPE ...> with -oX

[PATCH] Add --dtd and --webdtd for <!DOCTYPE ...> with -oX

From: Brandon Enright <bmenrigh_at_ucsd.edu>
Date: Tue, 23 Jan 2007 01:47:46 -0000 (UTC)

Attached is a patch against Subversion that adds '--dtd' and
'--webdtd' options to allow Nmap to print the <!DOCTYPE nmaprun SYSTEM
"..."> element for validating parsers to use.

Rather than change existing -oX output and possibly break some
parsers, the default is still not to print the <!DOCTYPE ...> element.
 If '--dtd <path>' is used, XML output will contain a reference to the
DTD specified in <path>. I've also added the short-hand '--webdtd'
which outputs <!DOCTYPE nmaprun SYSTEM
"http://insecure.org/nmap/data/nmap.dtd">.

Since some validating parsers complain if the encoding of the XML file
is not specified I've set the encoding to 'UTF-8' with: <?xml
version="1.0" encoding="UTF-8" ?>. UTF-8 should always work with the
existing format but just in case, it is only set if either '--dtd' or
'--webdtd' are used.

This patch includes changes against nmap-man.xml which isn't included
with Nmap by default (I think it it should be though). For the
purposes of this patch I dropped the file in the doc/ directory. This
was my first time editing DocBook XML but I think I got it right.

Brandon

-- 
Brandon Enright
Network Security Analyst
UCSD ACS/Network Operations
bmenrigh_at_ucsd.edu


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

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