OpenVAS Libraries
4.0+rc3.SVN
|
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <glib.h>
#include "comm.h"
#include "kb.h"
#include "plugutils.h"
#include "scanners_utils.h"
#include "system.h"
#include "strutils.h"
#include "nasl_tree.h"
#include "nasl_global_ctxt.h"
#include "nasl_func.h"
#include "nasl_var.h"
#include "nasl_lex_ctxt.h"
#include "exec.h"
#include "nasl_debug.h"
#include "nasl_scanner_glue.h"
Defines | |
#define | NASL_DEBUG 0 |
#define | SECRET_KB_PREFIX "Secret/" |
#define | SECRET_SOCKET_PREFIX "Secret/" |
Typedefs | |
typedef void(* | script_register_func_t )(struct arglist *, const char *) |
typedef void(* | proto_post_something_t )(struct arglist *, int, const char *, const char *) |
typedef void(* | post_something_t )(struct arglist *, int, const char *) |
Functions | |
tree_cell * | script_timeout (lex_ctxt *lexic) |
tree_cell * | script_id (lex_ctxt *lexic) |
tree_cell * | script_oid (lex_ctxt *lexic) |
tree_cell * | script_cve_id (lex_ctxt *lexic) |
tree_cell * | script_bugtraq_id (lex_ctxt *lexic) |
tree_cell * | script_xref (lex_ctxt *lexic) |
tree_cell * | script_tag (lex_ctxt *lexic) |
tree_cell * | script_see_also (lex_ctxt *lexic) |
tree_cell * | script_name (lex_ctxt *lexic) |
tree_cell * | script_version (lex_ctxt *lexic) |
tree_cell * | script_description (lex_ctxt *lexic) |
tree_cell * | script_copyright (lex_ctxt *lexic) |
tree_cell * | script_summary (lex_ctxt *lexic) |
tree_cell * | script_category (lex_ctxt *lexic) |
tree_cell * | script_family (lex_ctxt *lexic) |
tree_cell * | script_dependencie (lex_ctxt *lexic) |
tree_cell * | script_require_keys (lex_ctxt *lexic) |
tree_cell * | script_mandatory_keys (lex_ctxt *lexic) |
tree_cell * | script_exclude_keys (lex_ctxt *lexic) |
tree_cell * | script_require_ports (lex_ctxt *lexic) |
tree_cell * | script_require_udp_ports (lex_ctxt *lexic) |
tree_cell * | script_add_preference (lex_ctxt *lexic) |
tree_cell * | script_get_preference (lex_ctxt *lexic) |
tree_cell * | script_get_preference_file_content (lex_ctxt *lexic) |
tree_cell * | script_get_preference_file_location (lex_ctxt *lexic) |
tree_cell * | safe_checks (lex_ctxt *lexic) |
tree_cell * | scan_phase (lex_ctxt *lexic) |
tree_cell * | network_targets (lex_ctxt *lexic) |
tree_cell * | get_kb_list (lex_ctxt *lexic) |
tree_cell * | get_kb_item (lex_ctxt *lexic) |
tree_cell * | get_kb_fresh_item (lex_ctxt *lexic) |
tree_cell * | replace_kb_item (lex_ctxt *lexic) |
tree_cell * | set_kb_item (lex_ctxt *lexic) |
tree_cell * | security_hole (lex_ctxt *lexic) |
tree_cell * | security_warning (lex_ctxt *lexic) |
tree_cell * | security_note (lex_ctxt *lexic) |
tree_cell * | log_message (lex_ctxt *lexic) |
tree_cell * | debug_message (lex_ctxt *lexic) |
tree_cell * | nasl_get_preference (lex_ctxt *lexic) |
tree_cell * | nasl_scanner_get_port (lex_ctxt *lexic) |
tree_cell * | nasl_scanner_add_port (lex_ctxt *lexic) |
tree_cell * | nasl_scanner_status (lex_ctxt *lexic) |
tree_cell * | nasl_shared_socket_register (lex_ctxt *lexic) |
tree_cell * | nasl_shared_socket_acquire (lex_ctxt *lexic) |
tree_cell * | nasl_shared_socket_release (lex_ctxt *lexic) |
tree_cell * | nasl_shared_socket_destroy (lex_ctxt *lexic) |
This file contains all the functions that make the "glue" between as NASL script and openvassd. (script_*(), kb(), scanner_*())
typedef void(* post_something_t)(struct arglist *, int, const char *) |
Function is used when the script wants to report a problem back to openvassd.
typedef void(* proto_post_something_t)(struct arglist *, int, const char *, const char *) |
Function is used when the script wants to report a problem back to openvassd.
tree_cell* get_kb_fresh_item | ( | lex_ctxt * | lexic | ) |
Instead of reading the local copy of the KB, we ask the upstream father the "newest" value of a given KB item. This is especially useful when dealing with shared sockets and SSH.
tree_cell* nasl_scanner_get_port | ( | lex_ctxt * | lexic | ) |
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.