OpenVAS Scanner 21.4.1
|
glue between openvas and nasl scripts. More...
#include "nasl_scanner_glue.h"
#include "../misc/network.h"
#include "../misc/plugutils.h"
#include "../misc/vendorversion.h"
#include "nasl_debug.h"
#include "nasl_func.h"
#include "nasl_global_ctxt.h"
#include "nasl_lex_ctxt.h"
#include "nasl_tree.h"
#include "nasl_var.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <glib.h>
#include <gvm/base/logging.h>
#include <gvm/base/prefs.h>
#include <gvm/util/kb.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
Macros | |
#define | G_LOG_DOMAIN "lib nasl" |
GLib logging domain. More... | |
Typedefs | |
typedef void(* | proto_post_something_t) (const char *, struct script_infos *, int, const char *, const char *, const char *) |
typedef void(* | post_something_t) (const char *, struct script_infos *, int, const char *, const char *) |
glue between openvas and nasl scripts.
This file contains all the functions that make the "glue" between as NASL script and openvas. (script_*(), kb(), scanner_*())
#define G_LOG_DOMAIN "lib nasl" |
GLib logging domain.
typedef void(* post_something_t) (const char *, struct script_infos *, int, const char *, const char *) |
Function is used when the script wants to report a problem back to openvas.
typedef void(* proto_post_something_t) (const char *, struct script_infos *, int, const char *, const char *, const char *) |
Function is used when the script wants to report a problem back to openvas.
Get the kb index of the host running the current script.
[in] | lexic | NASL lexer. |
Return the OID of the current script.
[in] | lexic | NASL lexer. |
|
static |
If the plugin is a port scanner, it needs to report the list of open ports back to openvas scanner, and it also needs to know which ports are to be scanned.
Get a preferences of the current script.
Search the preference by preference name or by preferences id.
[in] | lexic | NASL lexer. |
Add a cross reference to the meta data.
The parameter "name" of the command defines actually the type, for example "URL" or "OSVDB". The parameter "value" is the actual reference. Alternative to "value", "csv" can be used with a list of comma-separated values.
In fact, if name is "cve" or "bid", it is equivalent to call script_cve_id() or script_bugtraq_id(), for example script_cve_id ("CVE-2019-12345"); is identical to script_xref (name: "cve", value: "CVE-2019-12345");
And also: script_bugtraq_id (12345); is identical to script_xref (name: "bid", value: "12345"); (watch out that the number now needs to be a string).
This even works with multiple comma-separated elements like script_xref (name: "cve", csv: "CVE-2019-12345,CVE-2019-54321");
lexic | The parser context. |
Send a security message to the client.
[in] | lexic | NASL lexer. |
|
static |