OpenVAS Scanner
7.0.1~git
|
The nasl - plugin class. Loads or launches nasl- plugins. More...
#include "../misc/network.h"
#include "../misc/plugutils.h"
#include "../nasl/nasl.h"
#include "pluginlaunch.h"
#include "pluginload.h"
#include "pluginscheduler.h"
#include "processes.h"
#include <errno.h>
#include <glib.h>
#include <gvm/base/drop_privileges.h>
#include <gvm/base/networking.h>
#include <gvm/base/prefs.h>
#include <gvm/base/proctitle.h>
#include <gvm/util/nvticache.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <utime.h>
Go to the source code of this file.
Macros | |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
Functions | |
static int | check_nvti (const char *filename, nvti_t *nvt) |
Check that the nvt's data is valid. More... | |
int | nasl_plugin_add (char *folder, char *filename) |
Add one .nasl plugin to the plugin list. More... | |
static void | nasl_thread (struct script_infos *) |
int | nasl_plugin_launch (struct scan_globals *globals, struct in6_addr *ip, GSList *vhosts, kb_t kb, const char *oid) |
Launch a NASL plugin. More... | |
The nasl - plugin class. Loads or launches nasl- plugins.
Definition in file nasl_plugins.c.
#define G_LOG_DOMAIN "sd main" |
GLib log domain.
Definition at line 52 of file nasl_plugins.c.
|
static |
Check that the nvt's data is valid.
filename | Filename of the NVT. |
nvt | NVT to check. |
Definition at line 63 of file nasl_plugins.c.
Referenced by nasl_plugin_add().
int nasl_plugin_add | ( | char * | folder, |
char * | filename | ||
) |
Add one .nasl plugin to the plugin list.
The plugin is first attempted to be loaded from the cache. If that fails, it is parsed (via exec_nasl_script) and added to the cache.
folder | Path to the plugin folder. |
filename | File-name of the plugin |
Definition at line 99 of file nasl_plugins.c.
References check_nvti(), exec_nasl_script(), NASL_ALWAYS_SIGNED, and NASL_EXEC_DESCR.
Referenced by plugins_reload_from_dir().
int nasl_plugin_launch | ( | struct scan_globals * | globals, |
struct in6_addr * | ip, | ||
GSList * | vhosts, | ||
kb_t | kb, | ||
const char * | oid | ||
) |
Launch a NASL plugin.
Definition at line 151 of file nasl_plugins.c.
References create_process(), script_infos::globals, script_infos::ip, script_infos::key, script_infos::name, nasl_thread(), script_infos::oid, oid, and script_infos::vhosts.
Referenced by plugin_launch().
|
static |
Definition at line 171 of file nasl_plugins.c.
References exec_nasl_script(), script_infos::ip, script_infos::key, script_infos::name, and NASL_ALWAYS_SIGNED.
Referenced by nasl_plugin_launch().