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

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

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Tue, 23 Jan 2007 08:41:51 -0600

Brandon Enright wrote:
> 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
>

I tested it out and, besides patch puking when it encountered
nmap-man.xml and I removed it to repatch, it works fine for me. I tried
--dtd and --webdtd, looked at the pages in Firefox and looked at the
page source, and it all looks good to me (though I'm far from an XML
expert).

-Kris

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

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