OpenVAS Scanner
21.4.1
|
#include "../misc/plugutils.h"
#include "../misc/vendorversion.h"
#include "attack.h"
#include "pluginlaunch.h"
#include "processes.h"
#include "sighand.h"
#include "utils.h"
#include <errno.h>
#include <fcntl.h>
#include <gcrypt.h>
#include <glib.h>
#include <gnutls/gnutls.h>
#include <grp.h>
#include <gvm/base/logging.h>
#include <gvm/base/nvti.h>
#include <gvm/base/prefs.h>
#include <gvm/base/proctitle.h>
#include <gvm/base/version.h>
#include <gvm/util/kb.h>
#include <gvm/util/nvticache.h>
#include <gvm/util/uuidutils.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <unistd.h>
#include "../misc/network.h"
Data Structures | |
struct | openvas_option |
Macros | |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
#define | PROCTITLE_WAITING "openvas: Waiting for incoming connections" |
#define | PROCTITLE_LOADING "openvas: Loading Handler" |
#define | PROCTITLE_RELOADING "openvas: Reloading" |
#define | PROCTITLE_SERVING "openvas: Serving %s" |
Functions | |
static void | my_gnutls_log_func (int level, const char *text) |
static void | set_globals_from_preferences (void) |
static void | reload_openvas (void) |
static void | handle_reload_signal (int sig) |
static void | handle_termination_signal (int sig) |
static void | init_signal_handlers (void) |
Initializes main scanner process' signal handlers. More... | |
static int | load_scan_preferences (struct scan_globals *globals) |
Read the scan preferences from redis @input scan_id Scan ID used as key to find the corresponding KB where to take the preferences from. More... | |
static void | scanner_thread (struct scan_globals *globals) |
static int | init_openvas (const char *config_file) |
Initialize everything. More... | |
static void | gcrypt_init (void) |
void | start_single_task_scan (void) |
static void | stop_single_task_scan (void) |
Search in redis the process ID of a running scan and sends it the kill signal SIGUSR1, which will stop the scan. To find the process ID, it uses the scan_id passed with the –scan-stop option. More... | |
int | openvas (int argc, char *argv[]) |
openvas. More... | |
Variables | |
int | global_max_hosts = 15 |
int | global_max_checks = 10 |
int | global_min_memory = 0 |
int | global_max_sysload = 0 |
GSList * | log_config = NULL |
Logging parameters, as passed to setup_log_handlers. More... | |
static volatile int | termination_signal = 0 |
static char * | global_scan_id = NULL |
static openvas_option | openvas_defaults [] |
Default values for scanner options. Must be NULL terminated. More... | |
OpenVAS main module, runs the scanner.
#define G_LOG_DOMAIN "sd main" |
GLib log domain.
#define PROCTITLE_LOADING "openvas: Loading Handler" |
#define PROCTITLE_RELOADING "openvas: Reloading" |
#define PROCTITLE_SERVING "openvas: Serving %s" |
#define PROCTITLE_WAITING "openvas: Waiting for incoming connections" |
|
static |
|
static |
|
static |
|
static |
Initialize everything.
config_file | Path to config file for initialization |
|
static |
Initializes main scanner process' signal handlers.
|
static |
Read the scan preferences from redis @input scan_id Scan ID used as key to find the corresponding KB where to take the preferences from.
|
static |
int openvas | ( | int | argc, |
char * | argv[] | ||
) |
openvas.
argc | Argument count. |
argv | Argument vector. |
|
static |
|
static |
|
static |
void start_single_task_scan | ( | void | ) |
|
static |
Search in redis the process ID of a running scan and sends it the kill signal SIGUSR1, which will stop the scan. To find the process ID, it uses the scan_id passed with the –scan-stop option.
int global_max_checks = 10 |
int global_max_hosts = 15 |
Globals that should not be touched (used in utils module).
int global_max_sysload = 0 |
int global_min_memory = 0 |
|
static |
GSList* log_config = NULL |
Logging parameters, as passed to setup_log_handlers.
|
static |
Default values for scanner options. Must be NULL terminated.
Only include options which are dependent on CMake variables. Empty options must be "\0", not NULL, to match the behavior of prefs_init.
|
static |