49 #include "../misc/plugutils.h" 53 #include <gvm/base/logging.h> 54 #include <gvm/base/prefs.h> 55 #include <gvm/util/kb.h> 60 #include <sys/types.h> 72 #define MAX_TRACE_HOPS 64 77 #define NMAP_CMD "nmap" 84 #define PREF_TREAT_ALL_HOST_ONLINE "Treat all hosts as online" 89 #define PREF_TRACEROUTE "Trace hop path to each host" 95 #define PREF_NO_DNS "Disable DNS resolution" 100 #define PREF_TCP_SCANNING_TECHNIQUE "TCP scanning technique" 106 #define PREF_SERVICE_SCAN "Service scan" 111 #define PREF_RPC_PORT_SCAN "RPC port scan" 116 #define PREF_IDENTIFY_REMOTE_OS "Identify the remote OS" 122 #define PREF_AGGRESSIVE_OS_DETECT "Aggressive OS detection" 128 #define PREF_FRAGMENT_IP "Fragment IP packets (bypasses firewalls)" 133 #define PREF_SOURCE_PORT "Source port" 138 #define PREF_TIMING_POLICY "Timing policy" 144 #define PREF_HOST_TIMEOUT "Host Timeout (ms)" 150 #define PREF_MIN_RTT_TIMEOUT "Min RTT Timeout (ms)" 156 #define PREF_MAX_RTT_TIMEOUT "Max RTT Timeout (ms)" 162 #define PREF_INITIAL_RTT_TIMEOUT "Initial RTT timeout (ms)" 168 #define PREF_MIN_PARALLELISM "Ports scanned in parallel (min)" 174 #define PREF_MAX_PARALLELISM "Ports scanned in parallel (max)" 180 #define PREF_MIN_HOSTGROUP "Hosts scanned in parallel (min)" 186 #define PREF_MAX_HOSTGROUP "Hosts scanned in parallel (max)" 191 #define PREF_INTERPROBE_DELAY "Minimum wait between probes (ms)" 197 #define PREF_EXCLUDE_HOSTS "Exclude hosts" 202 #define PREF_IMPORT_XML_FILE "File containing XML results" 207 #define OPT_SET "yes" 212 #define OPT_UNSET "no" 394 const gchar **attribute_names,
395 const gchar **attribute_values, gpointer user_data,
398 xml_end_element (GMarkupParseContext *context,
const gchar *element_name,
399 gpointer user_data, GError **error);
402 xml_read_text (GMarkupParseContext *context,
const gchar *text, gsize text_len,
403 gpointer user_data, GError **error);
412 const gchar **attrval);
415 const gchar **attrval);
418 const gchar **attrval);
423 const gchar **attrval);
426 const gchar **attrval);
431 const gchar **attrval);
434 const gchar **attrval);
437 const gchar **attrval);
440 const gchar **attrval);
443 const gchar **attrval);
448 const gchar **attrval);
469 const gchar **attribute_values);
513 g_debug (
"Starting Nmap builtin wrapper\n");
518 g_debug (
"Unable to initialize Nmap\n");
552 if (!pref || !strlen (pref))
562 g_debug (
"Nmap initialized: ");
569 g_debug (
"Reading nmap results from file: %s\n", nmap->
filename);
591 for (i = 0; i < nmap->
arg_idx; i++)
592 g_free (nmap->
args[i]);
650 {NULL, NULL, FALSE}};
658 for (i = 0; options[i].
optname; i++)
666 if (options[i].argument_required)
668 if (strlen (optval) > 0)
669 if (
add_arg (nmap, options[i].flag, optval) < 0)
674 if (g_strcmp0 (optval,
OPT_SET) == 0)
675 if (
add_arg (nmap, options[i].flag, NULL) < 0)
684 if (
add_arg (nmap,
"-sU", NULL) < 0)
723 nmap->
args = g_malloc (
sizeof (*nmap->
args));
731 g_realloc (nmap->
args, (nmap->
arg_idx + 2) * sizeof (gchar *));
738 g_realloc (nmap->
args, (nmap->
arg_idx + 3) * sizeof (gchar *));
760 gchar *pscript, *pargs;
764 if (strlen (pscript))
767 add_arg (nmap,
"--script", pscript);
770 add_arg (nmap,
"--script-args", pargs);
790 struct kb_item *top, *res;
791 gchar **scriptv, *scriptstr;
797 top = res = kb_item_get_all (kb,
"NmapNSE/scripts");
800 scriptv = (gchar **) g_realloc (scriptv, (i + 1) *
sizeof (gchar *));
801 scriptv[i++] = g_strdup (res->v_str);
805 scriptv = (gchar **) g_realloc (scriptv, (i + 1) *
sizeof (gchar *));
810 scriptstr = g_strjoinv (
",", scriptv);
812 for (i = 0; scriptv[i]; i++)
832 struct kb_item *top, *res;
833 gchar **argv, *argstr;
838 top = res = kb_item_get_all (kb,
"NmapNSE/arguments");
841 argv = (gchar **) g_realloc (argv, (i + 1) *
sizeof (gchar *));
842 argv[i++] = g_strdup (res->v_str);
846 argv = (gchar **) g_realloc (argv, (i + 1) *
sizeof (gchar *));
851 argstr = g_strjoinv (
",", argv);
853 for (i = 0; argv[i]; i++)
873 {
"connect()",
"-sT", FALSE}, {
"SYN",
"-sS", FALSE},
874 {
"ACK",
"-sA", FALSE}, {
"FIN",
"-sF", FALSE},
875 {
"Window",
"-sW", FALSE}, {
"Maimon",
"-sM", FALSE},
876 {
"Xmas tree",
"-sX", FALSE}, {
"Null",
"-sN", FALSE},
877 {
"SCTP Init",
"-sY", FALSE}, {
"SCTP COOKIE_ECHO",
"-sZ", FALSE},
878 {NULL, NULL, FALSE}};
884 for (i = 0; flagmap[i].
optname; i++)
885 if (g_strcmp0 (scantype, flagmap[i].optname) == 0)
886 return add_arg (nmap, flagmap[i].flag, NULL);
904 {
"Paranoid",
"-T0", FALSE}, {
"Sneaky",
"-T1", FALSE},
905 {
"Polite",
"-T2", FALSE}, {
"Normal",
"-T3", FALSE},
906 {
"Aggressive",
"-T4", FALSE}, {
"Insane",
"-T5", FALSE},
907 {NULL, NULL, FALSE}};
913 for (i = 0; flagmap[i].
optname; i++)
914 if (g_strcmp0 (timing, flagmap[i].optname) == 0)
915 return add_arg (nmap, flagmap[i].flag, NULL);
930 const char *portrange = prefs_get (
"port_range");
934 g_debug (
"Invalid environment: unavailable \"port_range\"\n");
938 return add_arg (nmap,
"-p", portrange);
956 nmap->
parser.
opentag = g_hash_table_new (g_str_hash, g_str_equal);
957 nmap->
parser.
closetag = g_hash_table_new (g_str_hash, g_str_equal);
974 void (*func) (
nmap_t *,
const gchar **,
const gchar **);
993 for (i = 0; callbacks[i].tag; i++)
994 g_hash_table_insert (open, (
void *) callbacks[i].tag, callbacks[i].func);
1017 for (i = 0; callbacks[i].tag; i++)
1018 g_hash_table_insert (close, (
void *) callbacks[i].tag, callbacks[i].func);
1037 g_debug (
"Invalid environment: unavailable \"globals\"\n");
1044 g_debug (
"Invalid environment: unavailable \"network_targets\"\n");
1048 return add_arg (nmap, network, NULL);
1061 for (i = 0; nmap->
args[i]; i++)
1062 g_debug (
"%s ", nmap->
args[i]);
1066 g_debug (
"<empty>");
1077 kill (
pid, SIGKILL);
1087 waitpid (
pid, NULL, WNOHANG);
1106 void (*old_sig_t) () = NULL;
1107 void (*old_sig_i) () = NULL;
1108 void (*old_sig_c) () = NULL;
1109 GMarkupParseContext *ctx;
1110 const GMarkupParser callbacks = {
1118 fproc = fopen (nmap->
filename,
"r");
1123 old_sig_t = signal (SIGTERM,
sig_h);
1124 old_sig_i = signal (SIGINT,
sig_h);
1125 old_sig_c = signal (SIGCHLD,
sig_c);
1128 if (g_spawn_async_with_pipes (NULL, nmap->
args, NULL, G_SPAWN_SEARCH_PATH,
1129 NULL, NULL, &
pid, NULL, &fd, NULL, NULL)
1132 fproc = fdopen (fd,
"r");
1137 perror (
"nmap_run_and_parse()");
1141 ctx = g_markup_parse_context_new (&callbacks, 0, nmap, NULL);
1143 while ((len = fread (chunk,
sizeof (gchar),
CHUNK_LEN, fproc)) > 0)
1147 if (!g_markup_parse_context_parse (ctx, chunk, len, &err))
1151 g_debug (
"g_markup_parse_context_parse() failed (%s)\n",
1157 g_debug (
"Error occurred while parsing: %s\n", chunk);
1165 if (nmap->
filename && ferror (fproc))
1167 perror (
"nmap_run_and_parse()");
1178 g_spawn_close_pid (
pid);
1179 signal (SIGINT, old_sig_i);
1180 signal (SIGTERM, old_sig_t);
1181 signal (SIGCHLD, old_sig_c);
1184 g_markup_parse_context_free (ctx);
1189 #define list_free(list, dtor, udata) \ 1194 g_slist_foreach (list, (GFunc) dtor, udata); \ 1195 g_slist_free (list); \ 1251 g_free (port->
proto);
1253 g_free (port->
state);
1280 g_free (script->
name);
1312 newport = g_malloc0 (
sizeof (
struct nmap_port));
1366 const gchar **attribute_names,
1367 const gchar **attribute_values, gpointer user_data,
1371 void (*callback) (
nmap_t *,
const gchar **,
const gchar **);
1375 callback = g_hash_table_lookup (nmap->
parser.
opentag, element_name);
1377 callback (nmap, attribute_names, attribute_values);
1391 gpointer user_data, GError **error)
1394 void (*callback) (
nmap_t *);
1398 callback = g_hash_table_lookup (nmap->
parser.
closetag, element_name);
1415 gpointer user_data, GError **error)
1429 tmpbuff = g_strdup_printf (
"%s%s", nmap->
parser.
rbuff, text);
1463 const gchar **attrval)
1466 g_debug (
"Error: opening <status> tag out of host description\n");
1480 const gchar **attrval)
1483 g_debug (
"Error: opening <address> tag out of host description\n");
1529 g_debug (
"Error: opening <state> tag out of port description\n");
1543 const gchar **attrval)
1546 g_debug (
"Error: opening <service> tag out of port description\n");
1549 gchar *product, *version, *extrainfo;
1558 if (product || version || extrainfo)
1559 #define PRINT_NOT_NULL(x) ((x) ? (x) : "") 1563 #undef PRINT_NOT_NULL 1602 const gchar **attrval)
1618 const gchar **attrval)
1627 confidence = atoi (confstr);
1648 const gchar **attrval)
1673 const gchar **attrval)
1692 const gchar **attrval)
1709 const gchar **attrval)
1741 ttl = atoi (ttl_str) - 1;
1757 g_debug (
"Inconsistent results: duplicate traceroute information!");
1760 g_debug (
"Trace TTL out of bounds: %d (max=%d)", ttl,
MAX_TRACE_HOPS);
1846 const gchar **attribute_values)
1850 for (i = 0; attribute_names[i]; i++)
1851 if (g_strcmp0 (attribute_names[i],
name) == 0)
1852 return g_strdup (attribute_values[i]);
1898 g_snprintf (key,
sizeof (key),
"%s/Host/State", nmap->
tmphost.
addr);
1913 for (pport = nmap->
tmphost.
ports; pport; pport = g_slist_next (pport))
1918 if (strncmp (p->
state,
"open", 4) == 0)
1922 g_snprintf (key,
sizeof (key),
"%s/Ports/%s/%s", nmap->
tmphost.
addr,
1949 if (g_strcmp0 (p->
proto,
"tcp") == 0)
1950 g_snprintf (key,
sizeof (key),
"%s/Services/%s", nmap->
tmphost.
addr,
1953 g_snprintf (key,
sizeof (key),
"%s/Services/%s/%s", nmap->
tmphost.
addr,
1959 g_snprintf (key,
sizeof (key),
"%s/Known/%s/%s", nmap->
tmphost.
addr, p->
proto,
1966 g_snprintf (key,
sizeof (key),
"%s/Version/%s/%s", nmap->
tmphost.
addr,
1975 g_snprintf (key,
sizeof (key),
"%s/App/%s/%s", nmap->
tmphost.
addr,
1978 for (pcpe = p->
version_cpes; pcpe; pcpe = g_slist_next (pcpe))
1996 g_snprintf (key,
sizeof (key),
"%s/Host/OS", nmap->
tmphost.
addr);
2005 g_snprintf (key,
sizeof (key),
"%s/Host/CPE", nmap->
tmphost.
addr);
2007 for (pcpe = nmap->
tmphost.
os_cpes; pcpe; pcpe = g_slist_next (pcpe))
2026 g_snprintf (key,
sizeof (key),
"%s/Host/tcp_seq_index", nmap->
tmphost.
addr);
2029 g_snprintf (key,
sizeof (key),
"%s/Host/tcp_seq_difficulty",
2047 g_snprintf (key,
sizeof (key),
"%s/Host/ipidseq", nmap->
tmphost.
addr);
2066 g_snprintf (key,
sizeof (key),
"%s/Host/distance", nmap->
tmphost.
addr);
2072 g_snprintf (key,
sizeof (key),
"%s/Host/traceroute/hops/%d",
2076 g_snprintf (key,
sizeof (key),
"%s/Host/traceroute/hops/%d/rtt",
2080 g_snprintf (key,
sizeof (key),
"%s/Host/traceroute/hops/%d/host",
2096 for (pport = nmap->
tmphost.
ports; pport; pport = g_slist_next (pport))
2101 port = (
struct nmap_port *) pport->data;
2104 pscript = g_slist_next (pscript))
2107 gchar key[128], portspec[16];
2109 script = (
struct nse_script *) pscript->data;
2111 g_snprintf (key,
sizeof (key),
"%s/NmapNSE/results/%s",
2114 g_snprintf (portspec,
sizeof (portspec),
"%s/%s", port->
proto,
2118 g_strlcat (key,
"/",
sizeof (key));
2119 g_strlcat (key, portspec,
sizeof (key));
2136 pscript = g_slist_next (pscript))
2141 script = (
struct nse_script *) pscript->data;
2142 g_snprintf (key,
sizeof (key),
"%s/NmapNSE/results/hostscripts/%s",
Handle states for XML parsing.
#define PREF_TREAT_ALL_HOST_ONLINE
Plugin parameter description: skip alive hosts discovery phase.
static void xmltag_open_port(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening port tag.
struct scan_globals * globals
#define PREF_MAX_RTT_TIMEOUT
Plugin parameter description: probe round trip time hint (maximal value).
static int add_scantype_arguments(nmap_t *nmap)
Add the TCP scantype flag to the command line.
static void xmltag_open_cpe(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening cpe tag.
static void xmltag_open_script(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening script tag.
#define NMAP_CMD
Nmap command to call.
static void xmltag_close_port(nmap_t *nmap)
Sublevel XML parser callback: handle an closing port tag.
static void nmap_destroy(nmap_t *nmap)
Release a nmap handler and associated resources.
static nmap_t * nmap_create(lex_ctxt *lexic)
Instantiate a new nmap handler, rebuild command line or open XML file to parse.
static void xmltag_open_hop(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening hop tag.
#define PREF_RPC_PORT_SCAN
Plugin parameter description: perform RPC port scan.
static int add_target(nmap_t *nmap)
Append scan target to the command line.
static void register_service(nmap_t *nmap, struct nmap_port *p)
Save information about a detected service (version) into the knowledge base.
static void save_ipidseq_details(nmap_t *nmap)
Save information about IP ID generation into the knowledge base.
#define PREF_INTERPROBE_DELAY
Plugin parameter description: set idle interval between probes.
static void save_detected_os(nmap_t *nmap)
Save information about detected operating system into the knowledge base.
struct traceroute_hop trace[MAX_TRACE_HOPS]
#define PREF_EXCLUDE_HOSTS
Plugin parameter description: comma-separated list of hosts to exclude from the scan.
static void xml_read_text(GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error)
Top level XML parser callback: handle text sections and store it into the read buffer if enable_read ...
static void save_hostscripts(nmap_t *nmap)
Save information about hostrule NSE scripts into the knowledge base.
#define PREF_MIN_PARALLELISM
Plugin parameter description: force minimum number of parallel active probes.
#define PREF_AGGRESSIVE_OS_DETECT
Plugin parameter description: guess OS from closest match if necessary.
#define PREF_TIMING_POLICY
Plugin parameter description: select timing template.
#define PREF_TCP_SCANNING_TECHNIQUE
Plugin parameter description: TCP port scanning technique to use.
gboolean argument_required
gchar * tcpseq_difficulty
kb_t plug_get_kb(struct script_infos *args)
static gchar * get_attr_value(const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
Helper function: get attribute value from the separate name/value tables.
struct script_infos * env
#define OPT_SET
Checkbox value (when set).
const char * get_plugin_preference_fname(struct script_infos *desc, const char *filename)
Get the file name of a plugins preference that is of type "file".
static void simple_item_destroy(gpointer data, gpointer udata)
Simple wrapper to call g_free from within g_slist_foreach statements.
static void xml_start_element(GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error)
Top level XML parser callback: handle an opening tag and call the corresponding method.
static void set_opentag_callbacks(GHashTable *open)
Populate the callbacks hashtable with handlers for opening tags.
static void current_host_reset(nmap_t *nmap)
Clear the current host object.
Describe a detected hop on the route.
static void xmltag_open_distance(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening distance tag.
#define PREF_TRACEROUTE
Plugin parameter description: perform traceroute.
#define PREF_HOST_TIMEOUT
Plugin parameter description: give up on host after this time elapsed.
#define PREF_MAX_HOSTGROUP
Plugin parameter description: force maximum number of hosts to scan in parallel.
#define PREF_SOURCE_PORT
Plugin parameter description: set source port.
Describe an nmap command line option.
struct script_infos * script_infos
static gchar * get_script_args(nmap_t *nmap)
Make the comma-separated list of NSE arguments set by the user.
static void sig_c()
Signal handler (Child).
static void port_destroy(gpointer data, gpointer udata)
Completely release a port object.
static void save_traceroute_details(nmap_t *nmap)
Save information about network topology to the target (traceroute) into the knowledge base...
static void dbg_display_cmdline(nmap_t *nmap)
Display the final command line for debug.
static int build_cmd_line(nmap_t *nmap)
Rebuild command line to run according to plugin parameters.
#define PREF_MIN_RTT_TIMEOUT
Plugin parameter description: probe round trip time hint (minimal value)
static void xmltag_open_address(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening address tag.
#define PRINT_NOT_NULL(x)
#define PREF_IDENTIFY_REMOTE_OS
Plugin parameter description: perform remote OS fingerprinting.
#define PREF_IMPORT_XML_FILE
Plugin parameter description: import XML file.
static void xmltag_close_ports(nmap_t *nmap)
Sublevel XML parser callback: handle an closing host tag.
void plug_set_key(struct script_infos *args, char *name, int type, const void *value)
static void xmltag_open_hostscript(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening hostscript tag.
static int add_arg(nmap_t *nmap, const gchar *name, const gchar *value)
Add a couple argument/value on the command line.
static void xmltag_close_host(nmap_t *nmap)
Sublevel XML parser callback: handle an closing host tag.
static void nse_script_destroy(gpointer data, gpointer udata)
Completely release a NSE script object.
static void save_portscripts(nmap_t *nmap)
Save information about postrule NSE scripts into the knowledge base.
static void set_closetag_callbacks(GHashTable *close)
Populate the callbacks hashtable with handlers for closing tags.
#define PREF_INITIAL_RTT_TIMEOUT
Plugin parameter description: probe round trip time hint (initial value).
tree_cell * plugin_run_nmap(lex_ctxt *lexic)
Run the nmap_net subsystem.
#define PREF_NO_DNS
Plugin parameter description: don't perform reverse resolution on discovered IP addresses.
static void xmltag_open_osmatch(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening osmatch tag.
static int add_portrange(nmap_t *nmap)
Add the range of ports to scan to the command line.
#define list_free(list, dtor, udata)
#define CHUNK_LEN
Input chunks size for the XML parser.
static void xmltag_open_host(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening host tag.
#define PREF_SERVICE_SCAN
Plugin parameter description: perform service/version detection scan.
static void xmltag_open_ipidsequence(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening ipidsequence tag.
static void xmltag_close_cpe(nmap_t *nmap)
Sublevel XML parser callback: handle an closing cpe tag.
static int add_timing_arguments(nmap_t *nmap)
Add timing template argument to the command line.
struct nmap_parser parser
#define PREF_MAX_PARALLELISM
Plugin parameter description: force maximum number of parallel active probes.
static void setup_xml_parser(nmap_t *nmap)
Setup XML parser internals.
#define MAX_TRACE_HOPS
Maximum number of hops to the target.
static void tmphost_add_nse_hostscript(nmap_t *nmap, gchar *name, gchar *output)
Add NSE hostscript result to the current host object.
static void save_host_state(nmap_t *nmap)
Store host state (host alive/dead) into the knowledge base.
static void tmphost_add_port(nmap_t *nmap)
Add port information to the current host object.
static int nmap_run_and_parse(nmap_t *nmap)
Run nmap and parse its XML output (or load an external file if requested).
static void save_tcpseq_details(nmap_t *nmap)
Save information about TCP sequence number generation into the knowledge base.
char * get_plugin_preference(const char *oid, const char *name, int pref_id)
Get the a plugins preference.
#define PREF_FRAGMENT_IP
Plugin parameter description: try to evade defense by fragmenting IP packets.
static int add_nse_arguments(nmap_t *nmap)
Add NSE (nmap scripting engine) related arguments to the command line according to user script select...
static void current_host_saveall(nmap_t *nmap)
Dump current host object state into the knowledge base.
static void sig_h()
Signal handler (Halt).
Handle the results of a NSE script.
static void xml_end_element(GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error)
Top level XML parser callback: handle an closing tag and call the corresponding method.
static void xmltag_open_ports(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening ports tag.
static void save_open_ports(nmap_t *nmap)
Save information about open ports for the current host into the knowledge base.
static void tmphost_add_nse_portscript(nmap_t *nmap, gchar *name, gchar *output)
Add NSE portscript result to a port of the current host.
static void xmltag_open_status(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening status tag.
#define PREF_MIN_HOSTGROUP
Plugin parameter description: force minimum number of hosts to scan in parallel.
static void xmltag_open_service(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening service tag.
Main nmap execution handler.
static gchar * get_script_list(nmap_t *nmap)
Make the comma-separated list of NSE scripts selected by the user.
static void xmltag_open_state(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening state tag.
static void xmltag_open_tcpsequence(nmap_t *nmap, const gchar **attrnames, const gchar **attrval)
Sublevel XML parser callback: handle an opening tcpsequence tag.
static void xmltag_close_hostscript(nmap_t *nmap)
Sublevel XML parser callback: handle an closing hostscript tag.