OpenVAS Libraries
9.0.3
|
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <regex.h>
#include "../misc/openvas_logging.h"
#include "../misc/prefs.h"
#include "../misc/plugutils.h"
#include "../base/nvticache.h"
#include "nasl.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_init.h"
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
#define | NASL_DEBUG 0 |
Functions | |
int | naslparse (naslctxt *) |
tree_cell * | cell2atom (lex_ctxt *lexic, tree_cell *c1) |
long int | cell_cmp (lex_ctxt *lexic, tree_cell *c1, tree_cell *c2) |
tree_cell * | nasl_exec (lex_ctxt *lexic, tree_cell *st) |
Execute a parse tree. More... | |
tree_cell * | nasl_lint (lex_ctxt *, tree_cell *) |
int | exec_nasl_script (struct arglist *script_infos, const char *name, const char *oid, int mode) |
Execute a NASL script. More... | |
Variables | |
FILE * | nasl_trace_fp = NULL |
lex_ctxt * | truc = NULL |
Definition at line 216 of file exec.c.
References cell2atom(), CONST_DATA, CONST_INT, CONST_STR, deref_cell(), DYN_ARRAY, FAKE_CELL, nasl_exec(), REF_ARRAY, ref_cell(), and TC::type.
Referenced by cell2atom(), cell_cmp(), and nasl_return().
Definition at line 240 of file exec.c.
References cell2atom(), cell_type(), CONST_DATA, CONST_INT, CONST_STR, deref_cell(), FAKE_CELL, and nasl_perror().
int exec_nasl_script | ( | struct arglist * | script_infos, |
const char * | name, | ||
const char * | oid, | ||
int | mode | ||
) |
Execute a NASL script.
"mode" is a bit field: bit #0 (1) is "description" Bit #1 (2) is "parse only"
script_infos | The plugin as arglist. Has to be allocated. |
name | Filename. |
mode | Bit field describing launch mode (description, parse always signed). |
Definition at line 1711 of file exec.c.
References add_named_var_to_ctxt(), naslctxt::always_authenticated, arg_add_value(), arg_get_value(), arg_set_value(), ARG_STRING, CONST_DATA, CONST_INT, deref_cell(), err, free_lex_ctxt(), get_func_ref_by_name(), TC::i_val, init_empty_lex_ctxt(), init_nasl_ctx(), init_nasl_library(), naslctxt::kb, naslctxt::line_nb, log_legacy_write(), name, NASL_ALWAYS_SIGNED, nasl_clean_ctx(), NASL_COMMAND_LINE, nasl_dump_tree(), nasl_exec(), NASL_EXEC_DESCR, NASL_EXEC_PARSE_ONLY, nasl_func_call(), NASL_LINT, nasl_lint(), nasl_perror(), nasl_set_filename(), nasl_trace_fp, naslparse(), nvticache_get_kb(), nvticache_initialized(), struct_lex_ctxt::oid, oid, plug_get_kb(), prefs_get(), struct_lex_ctxt::recv_timeout, struct_lex_ctxt::script_infos, TC::size, TC::str_val, naslctxt::tree, truc, TC::type, and TC::x.
Execute a parse tree.
Definition at line 800 of file exec.c.
References struct_lex_ctxt::break_flag, struct_lex_ctxt::cont_flag, FAKE_CELL, struct_lex_ctxt::line_nb, TC::line_nb, nasl_dump_tree(), nasl_perror(), nasl_trace_fp, ref_cell(), and struct_lex_ctxt::ret_val.
Referenced by cell2atom(), and exec_nasl_script().
Definition at line 36 of file lint.c.
References decl_nasl_func(), FAKE_CELL, get_func_ref_by_name(), struct_lex_ctxt::line_nb, TC::line_nb, TC::link, nasl_perror(), NODE_FUN_CALL, NODE_FUN_DEF, TC::str_val, TC::type, and TC::x.
Referenced by exec_nasl_script().
int naslparse | ( | naslctxt * | ) |
FILE* nasl_trace_fp = NULL |
Definition at line 386 of file exec.c.
Referenced by exec_nasl_script(), main(), nasl_exec(), nasl_func_call(), nasl_trace(), and nasl_trace_enabled().
lex_ctxt* truc = NULL |
Definition at line 388 of file exec.c.
Referenced by exec_nasl_script().