mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Don't write to XML output directly in nmap.cc. Spotted and fixed by
Michal Hrusecki (http://seclists.org/nmap-dev/2014/q3/180).
This commit is contained in:
parent
21ab5d78bd
commit
fd3b2c79d3
2 changed files with 2 additions and 1 deletions
1
nmap.cc
1
nmap.cc
|
|
@ -1748,7 +1748,6 @@ int nmap_main(int argc, char *argv[]) {
|
|||
chomp(mytime);
|
||||
char *xslfname = o.XSLStyleSheet();
|
||||
xml_start_document();
|
||||
log_write(LOG_XML, "<!DOCTYPE nmaprun PUBLIC \"-//IDN nmap.org//DTD Nmap XML %s//EN\" \"https://svn.nmap.org/nmap/docs/nmap.dtd\">\n", NMAP_XMLOUTPUTVERSION);
|
||||
if (xslfname) {
|
||||
xml_open_pi("xml-stylesheet");
|
||||
xml_attribute("href", "%s", xslfname);
|
||||
|
|
|
|||
2
xml.cc
2
xml.cc
|
|
@ -320,6 +320,8 @@ int xml_start_document() {
|
|||
if (xml_newline() < 0)
|
||||
return -1;
|
||||
|
||||
log_write(LOG_XML, "<!DOCTYPE nmaprun PUBLIC \"-//IDN nmap.org//DTD Nmap XML %s//EN\" \"https://svn.nmap.org/nmap/docs/nmap.dtd\">\n", NMAP_XMLOUTPUTVERSION);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue