![]() | ![]() | ![]() | Plugin Description |
script_id()
script_oid()
(by Tim Brown)
This function is intended to replace script_id, the current method of
uniquely identifying NASL scripts. The logic behind this is that script_id has
only a single global namespace. With plans by several organisations to develop and contribute
plugin feeds it was deemed necessary to introduce a new namespace that could be
shared between each organisation.
The current proposed implementation of this function is as follows. Any plugin
that contains a script_id call will automatically be given an OID from the
namespace allocated for legacy plugins. Moreover script_oid can only be used on
plugins that do not have a script_id set. The OID namespace for legacy plugins
has the prefix "1.3.6.1.4.1.25623.1.0". The OpenVAS OID namespace is currently
administered by Tim Brown.
Both the client and server as well as the libraries on which they depend are being updated to support this functionality. You can detect if it is supported by checking OPENVAS_NASL_LEVEL is greater than 2206.
script_oid should be called like so:
...
if(description)
{
if (OPENVAS_NASL_LEVEL >= 2206)
{
script_oid("1.3.6.1.4.1.25623.1.0.90010");
}
else
{
script_id(90010);
}
...
script_version()
script_name()
script_description()
script_summary()
script_category()
script_copyright()
script_family()
script_dependencies()
script_cve_id()
script_require_ports()
script_require_keys()
script_mandatory_keys()
(by Jan-Oliver Wagner)
KB keys are defined which are mandatory to start the NASL script. If the keys are not present, there is no way that the NASL script is considered for execution.
This is a significant difference compared to
script_require_keys() where the presence
of the keys is disregarded in case
the scanner runs without ,,optimize" flag.
A typical use case is the presense of a helper
tool (e.g. ovaldi for OVAL scripts). There
is no sense in trying to run OVAL scripts if the
OVAL interpreter is not available. Thus, the OVAL
scripts will not blow up the report file with as many
messages as OVAL scripts.
This method has been introduced according to change request #38 (,,Mandatory KB keys")2. It is available with OPENVAS_NASL_LEVEL is greater or equal 2320 which is the case for openvas-libnasl from 2.0.2 on and any newer major OpenVAS release.
script_exclude_keys()
scanner_status()
script_get_preference()
script_add_preference()
script_bugtraq_id()
script_dependencie()
script_get_preference_file_content()
script_get_preference_file_location()
script_require_udp_ports()
script_timeout()
![]() | ![]() | ![]() | Plugin Description |