|
OpenVAS Scanner 22.7.9
|
#include "nasl_lex_ctxt.h"

Go to the source code of this file.
Definition at line 1027 of file nasl_scanner_glue.c.
References post_error(), proto_post_error(), and security_something().

Get the kb index of the host running the current script.
| [in] | lexic | NASL lexer. |
Definition at line 761 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_INT, TC::i_val, script_infos::key, struct_lex_ctxt::script_infos, val, and TC::x.

Definition at line 709 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, get_int_var_by_num(), get_str_var_by_num(), TC::i_val, len, plug_get_key(), struct_lex_ctxt::script_infos, TC::size, TC::str_val, TC::type, val, and TC::x.

Definition at line 648 of file nasl_scanner_glue.c.
References add_var_to_array(), alloc_typed_cell(), deref_cell(), DYN_ARRAY, FAKE_CELL, get_str_var_by_num(), nasl_perror(), plug_get_kb(), TC::ref_val, st_nasl_string::s_siz, st_nasl_string::s_val, struct_lex_ctxt::script_infos, st_a_nasl_var::v, st_a_nasl_var::v_int, st_a_nasl_var::v_str, VAR2_DATA, VAR2_INT, st_a_nasl_var::var_type, and TC::x.

Return the OID of the current script.
| [in] | lexic | NASL lexer. |
Definition at line 630 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, oid, struct_lex_ctxt::oid, TC::size, TC::str_val, and TC::x.

Definition at line 1021 of file nasl_scanner_glue.c.
References post_log_with_uri(), proto_post_log(), and security_something().

Definition at line 1033 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, get_str_var_by_num(), name, nasl_perror(), TC::size, TC::str_val, and TC::x.

Definition at line 1117 of file nasl_scanner_glue.c.
References FAKE_CELL, get_int_var_by_name(), get_str_var_by_name(), scanner_add_port(), and struct_lex_ctxt::script_infos.

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.
Definition at line 1077 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_INT, get_int_var_by_num(), getpts(), TC::i_val, nasl_perror(), and TC::x.

Definition at line 1133 of file nasl_scanner_glue.c.
References FAKE_CELL.
Definition at line 1056 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, TC::size, TC::str_val, vendor_version_get(), and TC::x.

Definition at line 780 of file nasl_scanner_glue.c.
References ARG_INT, ARG_STRING, FAKE_CELL, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), get_var_type_by_name(), len, name, nasl_perror(), plug_replace_key(), plug_replace_key_len(), struct_lex_ctxt::script_infos, and VAR2_INT.

Definition at line 612 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_INT, TC::i_val, and TC::x.
Referenced by plugin_run_openvas_tcp_scanner().


Definition at line 435 of file nasl_scanner_glue.c.
References FAKE_CELL, get_int_var_by_name(), get_str_var_by_name(), name, nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 255 of file nasl_scanner_glue.c.
References FAKE_CELL, get_int_var_by_num(), nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 248 of file nasl_scanner_glue.c.
References FAKE_CELL.
Definition at line 112 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 279 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), nasl_perror(), plug_set_dep(), and struct_lex_ctxt::script_infos.

Definition at line 376 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 272 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Get a preferences of the current script.
Search the preference by preference name or by preferences id.
| [in] | lexic | NASL lexer. |
Definition at line 492 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, FAKE_CELL, get_int_var_by_name(), get_plugin_preference(), get_str_var_by_num(), TC::i_val, isalldigit(), nasl_perror(), struct_lex_ctxt::oid, TC::size, TC::str_val, TC::type, and TC::x.

Definition at line 529 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, FAKE_CELL, get_plugin_preference(), get_plugin_preference_file_content(), get_plugin_preference_file_size(), get_str_var_by_num(), nasl_perror(), struct_lex_ctxt::oid, struct_lex_ctxt::script_infos, TC::size, TC::str_val, and TC::x.

Definition at line 573 of file nasl_scanner_glue.c.
References alloc_typed_cell(), CONST_DATA, get_plugin_preference(), get_plugin_preference_fname(), get_str_var_by_num(), len, nasl_perror(), struct_lex_ctxt::oid, struct_lex_ctxt::script_infos, TC::size, TC::str_val, and TC::x.

Definition at line 329 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_name(), get_str_var_by_num(), nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 234 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.
Referenced by nasl_perror(), and nasl_trace().


Definition at line 105 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 305 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 399 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 417 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 194 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_name(), name, nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Add timeout preference to VT preferences.
VT timeout is handled as normal VT preference. Because of backward compatibility issues the timeout preference is always located at the VT pref location with id NVTPREF_TIMEOUT_ID.
| [in] | lexic | lexic |
| [in] | to | script timeout |
Definition at line 87 of file nasl_scanner_glue.c.
References FAKE_CELL, get_int_var_by_num(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Definition at line 241 of file nasl_scanner_glue.c.
References FAKE_CELL.
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", it is equivalent to call script_cve_id(), for example script_cve_id ("CVE-2019-12345"); is identical to script_xref (name: "cve", value: "CVE-2019-12345");
This even works with multiple comma-separated elements like script_xref (name: "cve", csv: "CVE-2019-12345,CVE-2019-54321");
| lexic | The parser context. |
Definition at line 150 of file nasl_scanner_glue.c.
References FAKE_CELL, get_str_var_by_name(), name, nasl_perror(), script_infos::nvti, and struct_lex_ctxt::script_infos.

Send a security message to the client.
| [in] | lexic | NASL lexer. |
Definition at line 1015 of file nasl_scanner_glue.c.
References post_alarm(), proto_post_alarm(), and security_something().

Set a kb item.
If expire is set the key will be removed after it expired.
| [in] | lexic | NASL lexer. |
| [in] | name | Name of Item. |
| [in] | value | Value of Item. |
| [in] | expire | Optional expire for item in seconds. |
Definition at line 890 of file nasl_scanner_glue.c.
References ARG_INT, ARG_STRING, FAKE_CELL, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), get_var_type_by_name(), len, name, nasl_perror(), plug_set_key(), plug_set_key_len(), struct_lex_ctxt::script_infos, set_kb_item_volatile(), and VAR2_INT.
