OpenVAS Scanner  21.4.1
Functions
nasl_scanner_glue.h File Reference
#include "nasl_lex_ctxt.h"

Go to the source code of this file.

Functions

tree_cellscript_timeout (lex_ctxt *)
 
tree_cellscript_oid (lex_ctxt *)
 
tree_cellscript_cve_id (lex_ctxt *)
 
tree_cellscript_bugtraq_id (lex_ctxt *)
 
tree_cellscript_xref (lex_ctxt *)
 Add a cross reference to the meta data. More...
 
tree_cellscript_tag (lex_ctxt *)
 
tree_cellscript_name (lex_ctxt *)
 
tree_cellscript_version (lex_ctxt *)
 
tree_cellscript_copyright (lex_ctxt *)
 
tree_cellscript_category (lex_ctxt *)
 
tree_cellscript_family (lex_ctxt *)
 
tree_cellscript_dependencies (lex_ctxt *)
 
tree_cellscript_require_keys (lex_ctxt *)
 
tree_cellscript_mandatory_keys (lex_ctxt *)
 
tree_cellscript_exclude_keys (lex_ctxt *)
 
tree_cellscript_require_ports (lex_ctxt *)
 
tree_cellscript_require_udp_ports (lex_ctxt *)
 
tree_cellnasl_get_preference (lex_ctxt *)
 
tree_cellscript_add_preference (lex_ctxt *)
 
tree_cellscript_get_preference (lex_ctxt *)
 Get a preferences of the current script. More...
 
tree_cellscript_get_preference_file_content (lex_ctxt *)
 
tree_cellscript_get_preference_file_location (lex_ctxt *)
 
tree_cellsafe_checks (lex_ctxt *)
 
tree_cellget_script_oid (lex_ctxt *)
 Return the OID of the current script. More...
 
tree_cellget_host_kb_index (lex_ctxt *)
 Get the kb index of the host running the current script. More...
 
tree_cellget_kb_item (lex_ctxt *)
 
tree_cellget_kb_list (lex_ctxt *)
 
tree_cellset_kb_item (lex_ctxt *)
 
tree_cellreplace_kb_item (lex_ctxt *)
 
tree_cellsecurity_message (lex_ctxt *)
 Send a security message to the client. More...
 
tree_celllog_message (lex_ctxt *)
 
tree_cellerror_message (lex_ctxt *)
 
tree_cellnasl_scanner_get_port (lex_ctxt *)
 
tree_cellnasl_scanner_add_port (lex_ctxt *)
 
tree_cellnasl_scanner_status (lex_ctxt *)
 
tree_cellnasl_vendor_version (lex_ctxt *)
 

Function Documentation

◆ error_message()

tree_cell* error_message ( lex_ctxt lexic)

◆ get_host_kb_index()

tree_cell* get_host_kb_index ( lex_ctxt lexic)

Get the kb index of the host running the current script.

Parameters
[in]lexicNASL lexer.
Returns
lex cell containing the host kb index value as positive integer. NULL otherwise

◆ get_kb_item()

tree_cell* get_kb_item ( lex_ctxt lexic)

◆ get_kb_list()

tree_cell* get_kb_list ( lex_ctxt lexic)

◆ get_script_oid()

tree_cell* get_script_oid ( lex_ctxt lexic)

Return the OID of the current script.

Parameters
[in]lexicNASL lexer.
Returns
lex cell containing the OID as a string.

◆ log_message()

tree_cell* log_message ( lex_ctxt lexic)

◆ nasl_get_preference()

tree_cell* nasl_get_preference ( lex_ctxt lexic)

◆ nasl_scanner_add_port()

tree_cell* nasl_scanner_add_port ( lex_ctxt lexic)

◆ nasl_scanner_get_port()

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.

◆ nasl_scanner_status()

tree_cell* nasl_scanner_status ( lex_ctxt lexic)

◆ nasl_vendor_version()

tree_cell* nasl_vendor_version ( lex_ctxt lexic)

◆ replace_kb_item()

tree_cell* replace_kb_item ( lex_ctxt lexic)

◆ safe_checks()

tree_cell* safe_checks ( lex_ctxt lexic)

◆ script_add_preference()

tree_cell* script_add_preference ( lex_ctxt lexic)

◆ script_bugtraq_id()

tree_cell* script_bugtraq_id ( lex_ctxt lexic)

◆ script_category()

tree_cell* script_category ( lex_ctxt lexic)

◆ script_copyright()

tree_cell* script_copyright ( lex_ctxt lexic)

◆ script_cve_id()

tree_cell* script_cve_id ( lex_ctxt lexic)

◆ script_dependencies()

tree_cell* script_dependencies ( lex_ctxt lexic)

◆ script_exclude_keys()

tree_cell* script_exclude_keys ( lex_ctxt lexic)

◆ script_family()

tree_cell* script_family ( lex_ctxt lexic)

◆ script_get_preference()

tree_cell* script_get_preference ( lex_ctxt lexic)

Get a preferences of the current script.

Search the preference by preference name or by preferences id.

Parameters
[in]lexicNASL lexer.
Returns
lex cell containing the preferences value as a string. Fake cell otherwise

◆ script_get_preference_file_content()

tree_cell* script_get_preference_file_content ( lex_ctxt lexic)

◆ script_get_preference_file_location()

tree_cell* script_get_preference_file_location ( lex_ctxt lexic)

◆ script_mandatory_keys()

tree_cell* script_mandatory_keys ( lex_ctxt lexic)

◆ script_name()

tree_cell* script_name ( lex_ctxt lexic)

◆ script_oid()

tree_cell* script_oid ( lex_ctxt lexic)

◆ script_require_keys()

tree_cell* script_require_keys ( lex_ctxt lexic)

◆ script_require_ports()

tree_cell* script_require_ports ( lex_ctxt lexic)

◆ script_require_udp_ports()

tree_cell* script_require_udp_ports ( lex_ctxt lexic)

◆ script_tag()

tree_cell* script_tag ( lex_ctxt lexic)

◆ script_timeout()

tree_cell* script_timeout ( lex_ctxt lexic)

◆ script_version()

tree_cell* script_version ( lex_ctxt lexic)

◆ script_xref()

tree_cell* script_xref ( lex_ctxt lexic)

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" or "bid", it is equivalent to call script_cve_id() or script_bugtraq_id(), for example script_cve_id ("CVE-2019-12345"); is identical to script_xref (name: "cve", value: "CVE-2019-12345");

And also: script_bugtraq_id (12345); is identical to script_xref (name: "bid", value: "12345"); (watch out that the number now needs to be a string).

This even works with multiple comma-separated elements like script_xref (name: "cve", csv: "CVE-2019-12345,CVE-2019-54321");

Parameters
lexicThe parser context.
Returns
Always FAKE_CELL.

◆ security_message()

tree_cell* security_message ( lex_ctxt lexic)

Send a security message to the client.

Parameters
[in]lexicNASL lexer.
Returns
FAKE_CELL.

◆ set_kb_item()

tree_cell* set_kb_item ( lex_ctxt lexic)