mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Move log_bogus_target() to output.cc
This commit is contained in:
@@ -1320,6 +1320,15 @@ void write_xml_hosthint(const Target *currenths) {
|
|||||||
log_flush_all();
|
log_flush_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void log_bogus_target(const char *expr) {
|
||||||
|
xml_open_start_tag("target");
|
||||||
|
xml_attribute("specification", "%s", expr);
|
||||||
|
xml_attribute("status", "skipped");
|
||||||
|
xml_attribute("reason", "invalid");
|
||||||
|
xml_close_empty_tag();
|
||||||
|
xml_newline();
|
||||||
|
}
|
||||||
|
|
||||||
static void write_xml_osclass(const OS_Classification *osclass, double accuracy) {
|
static void write_xml_osclass(const OS_Classification *osclass, double accuracy) {
|
||||||
xml_open_start_tag("osclass");
|
xml_open_start_tag("osclass");
|
||||||
xml_attribute("type", "%s", osclass->Device_Type);
|
xml_attribute("type", "%s", osclass->Device_Type);
|
||||||
|
|||||||
5
output.h
5
output.h
@@ -199,6 +199,11 @@ void write_host_status(const Target *currenths);
|
|||||||
/* Writes host status info to the XML stream wrapped in a <hosthint> tag */
|
/* Writes host status info to the XML stream wrapped in a <hosthint> tag */
|
||||||
void write_xml_hosthint(const Target *currenths);
|
void write_xml_hosthint(const Target *currenths);
|
||||||
|
|
||||||
|
/* Add a <target> element to the XML stating that a target specification was
|
||||||
|
ignored. This can be because of, for example, a DNS resolution failure, or a
|
||||||
|
syntax error. */
|
||||||
|
void log_bogus_target(const char *expr);
|
||||||
|
|
||||||
/* Prints the formatted OS Scan output to stdout, logfiles, etc (but only
|
/* Prints the formatted OS Scan output to stdout, logfiles, etc (but only
|
||||||
if an OS Scan was performed */
|
if an OS Scan was performed */
|
||||||
void printosscanoutput(const Target *currenths);
|
void printosscanoutput(const Target *currenths);
|
||||||
|
|||||||
14
targets.cc
14
targets.cc
@@ -74,7 +74,7 @@
|
|||||||
#include "nmap_dns.h"
|
#include "nmap_dns.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "nmap_error.h"
|
#include "nmap_error.h"
|
||||||
#include "xml.h"
|
#include "output.h"
|
||||||
|
|
||||||
extern NmapOps o;
|
extern NmapOps o;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -349,18 +349,6 @@ const char *HostGroupState::next_expression() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a <target> element to the XML stating that a target specification was
|
|
||||||
ignored. This can be because of, for example, a DNS resolution failure, or a
|
|
||||||
syntax error. */
|
|
||||||
static void log_bogus_target(const char *expr) {
|
|
||||||
xml_open_start_tag("target");
|
|
||||||
xml_attribute("specification", "%s", expr);
|
|
||||||
xml_attribute("status", "skipped");
|
|
||||||
xml_attribute("reason", "invalid");
|
|
||||||
xml_close_empty_tag();
|
|
||||||
xml_newline();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns a newly allocated Target with the given address. Handles all the
|
/* Returns a newly allocated Target with the given address. Handles all the
|
||||||
details like setting the Target's address and next hop. */
|
details like setting the Target's address and next hop. */
|
||||||
static Target *setup_target(const HostGroupState *hs,
|
static Target *setup_target(const HostGroupState *hs,
|
||||||
|
|||||||
Reference in New Issue
Block a user