-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
doc/manual/nasl/built-in-functions/description-functions/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Description Functions | ||
|
||
## GENERAL | ||
|
||
All those functions but script_get_preference are only used in the "description part" of the plugin, i.e. the block that is run when the description variable is 1. They have no effect when the plugin is run with the standalone NASL interpreter. | ||
|
||
|
||
## TABLE OF CONTENT | ||
|
||
**script_add_preference** - Adds an option to the plugin. | ||
**script_bugtraq_id** - Removed. Sets the SecurityFocus “bid”. | ||
**script_category sets** - The “category” of the plugin. | ||
**script_copyright** - Deprecated. Kept for backward compatibility. Sets the copyright string of the plugin. | ||
**script_cve_id** - sets the CVE IDs of the flaws tested by the script. | ||
**script_dependencies** - Sets the lists of scripts that should be run before this one (if “optimize mode” is on). | ||
**script_exclude_keys** - sets the list of “KB items” that must not be set to run this script in “optimize mode”. | ||
**script_mandatory_keys** - sets the list of “KB items” that must be set to run this script. | ||
**script_family** - sets the “family” of the plugin. It takes an unnamed string argument. | ||
**script_oid** - sets the script number. | ||
**script_name** - sets the “name” of the plugin. | ||
**script_require_keys** - sets the list of “KB items” that must be set to run this script. | ||
**script_require_ports** - sets the list of TCP ports that must be open to run this script in “optimize mode”. | ||
**script_require_udp_ports** - sets the list of UDP ports that must be open to run this script in “optimize mode”. | ||
**script_timeout** - sets the default timeout of the plugin. | ||
**script_version** - sets the “version” of the plugin. | ||
**script_xref** - URLs related to the script. | ||
**script_tag** - sets additional information. |
35 changes: 35 additions & 0 deletions
35
doc/manual/nasl/built-in-functions/description-functions/script_dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# script_dependencies | ||
|
||
## NAME | ||
|
||
**script_dependencies** - sets the lists of scripts that should be run before this one (if “optimize mode” is on). | ||
|
||
## SYNOPSIS | ||
|
||
*any* **script_dependencies**(*string*, ...); | ||
|
||
**script dependencies** It takes any number of unnamed string arguments. | ||
|
||
## DESCRIPTION | ||
|
||
Sets the plugin's dependencies. Sets the lists of scripts that should be run before this one (if “optimize mode” is on). | ||
|
||
## RETURN VALUE | ||
|
||
Returns nothing. | ||
|
||
## ERRORS | ||
|
||
It requires at least one string as argument. | ||
|
||
## EXAMPLES | ||
|
||
**1**: | ||
```cpp | ||
script_dependencies("toolcheck.nasl", "host_alive_detection.nasl"); | ||
|
||
``` | ||
## SEE ALSO | ||
**[script_add_preference(3)](script_add_preference.md)**, **[script_copyright(3)](script_copyright.md)**, **[script_cve_id(3)](script_cve_id.md)**, **[script_category(3)](script_dependencies.md)**, **[script_exclude_keys(3)](script_exclude_keys.md)**, **[script_mandatory_keys(3)](script_mandatory_keys.md)**, **[script_family(3)](script_family.md)**, **[script_oid(3)](script_oid.md)**, **[script_name(3)](script_name.md)**, **[script_require_keys(3)](script_require_keys.md)**, **[script_require_ports(3)](script_require_ports.md)**, **[script_require_udp_ports(3)](script_require_udp_ports.md)**, **[script_timeout(3)](script_timeout.md)**, **[script_version(3)](script_version.md)**, **[script_xref(3)](script_xref.md)**, **[script_tag(3)](script_tag.md)**, **[openvas-nasl(1)](../../openvas-nasl.md)** |
33 changes: 33 additions & 0 deletions
33
doc/manual/nasl/built-in-functions/description-functions/script_exclude_keys.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# script_exclude_keys | ||
|
||
## NAME | ||
|
||
**script_exclude_keys** - sets the list of “KB items” that must not be set to run this script in “optimize mode”. | ||
|
||
## SYNOPSIS | ||
|
||
*any* **script_exclude_keys**(*string*, ...); | ||
|
||
**script exclude_keys** takes any number of unnamed string arguments. | ||
|
||
## DESCRIPTION | ||
|
||
Sets the list of “KB items” that must not be set to run this script in “optimize mode”. | ||
|
||
## RETURN VALUE | ||
|
||
Returns nothing. | ||
|
||
## ERRORS | ||
|
||
|
||
## EXAMPLES | ||
|
||
**1**: | ||
```cpp | ||
script_exclude_keys("Settings/disable_cgi_scanning"); | ||
``` | ||
## SEE ALSO | ||
**[script_add_preference(3)](script_add_preference.md)**, **[script_copyright(3)](script_copyright.md)**, **[script_cve_id(3)](script_cve_id.md)**, **[script_dependencies(3)](script_dependencies.md)**, **[script_category(3)](script_category.md)**, **[script_mandatory_keys(3)](script_mandatory_keys.md)**, **[script_family(3)](script_family.md)**, **[script_oid(3)](script_oid.md)**, **[script_name(3)](script_name.md)**, **[script_require_keys(3)](script_require_keys.md)**, **[script_require_ports(3)](script_require_ports.md)**, **[script_require_udp_ports(3)](script_require_udp_ports.md)**, **[script_timeout(3)](script_timeout.md)**, **[script_version(3)](script_version.md)**, **[script_xref(3)](script_xref.md)**, **[script_tag(3)](script_tag.md)**, **[openvas-nasl(1)](../../openvas-nasl.md)** |
33 changes: 33 additions & 0 deletions
33
doc/manual/nasl/built-in-functions/description-functions/script_family.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# script_family | ||
|
||
## NAME | ||
|
||
**script_family** - sets the plugin's family. | ||
|
||
## SYNOPSIS | ||
|
||
*any* **script_family**(*string*); | ||
|
||
**script family** It takes one unnamed value. | ||
|
||
## DESCRIPTION | ||
|
||
Sets the plugin's family. The valid categories are the following: | ||
|
||
## RETURN VALUE | ||
|
||
Returns nothing. | ||
|
||
## ERRORS | ||
|
||
|
||
## EXAMPLES | ||
|
||
**1**: | ||
```cpp | ||
script_family("Ubuntu Local Security Checks"); | ||
``` | ||
## SEE ALSO | ||
**[script_add_preference(3)](script_add_preference.md)**, **[script_copyright(3)](script_copyright.md)**, **[script_cve_id(3)](script_cve_id.md)**, **[script_dependencies(3)](script_dependencies.md)**, **[script_exclude_keys(3)](script_exclude_keys.md)**, **[script_mandatory_keys(3)](script_mandatory_keys.md)**, **[script_category(3)](script_family.md)**, **[script_oid(3)](script_oid.md)**, **[script_name(3)](script_name.md)**, **[script_require_keys(3)](script_require_keys.md)**, **[script_require_ports(3)](script_require_ports.md)**, **[script_require_udp_ports(3)](script_require_udp_ports.md)**, **[script_timeout(3)](script_timeout.md)**, **[script_version(3)](script_version.md)**, **[script_xref(3)](script_xref.md)**, **[script_tag(3)](script_tag.md)**, **[openvas-nasl(1)](../../openvas-nasl.md)** |
33 changes: 33 additions & 0 deletions
33
doc/manual/nasl/built-in-functions/description-functions/script_mandatory_keys.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# script_mandatory_keys | ||
|
||
## NAME | ||
|
||
**script_mandatory_keys** - sets the list of “KB items” that must be set to run this script. | ||
|
||
## SYNOPSIS | ||
|
||
*any* **script_mandatory_keys**(*string*, ..., re: *string*); | ||
|
||
**script mandatory_keys** takes any number of unnamed string arguments. Additionally it takes an optional named string argument re. With this option a specific required key has to contain a value defined with a regular expression. The re argument has to follow the specific pattern: re: '<name>=<regex>'. | ||
|
||
## DESCRIPTION | ||
|
||
Sets the list of “KB items” that must be set to run this script. | ||
|
||
## RETURN VALUE | ||
|
||
Returns nothing. | ||
|
||
## ERRORS | ||
|
||
|
||
## EXAMPLES | ||
|
||
**1**: | ||
```cpp | ||
script_mandatory_keys("ssh/login/centos", "ssh/login/rpms", re:"ssh/login/release=CentOS7"); | ||
``` | ||
## SEE ALSO | ||
**[script_add_preference(3)](script_add_preference.md)**, **[script_copyright(3)](script_copyright.md)**, **[script_cve_id(3)](script_cve_id.md)**, **[script_dependencies(3)](script_dependencies.md)**, **[script_category(3)](script_category.md)**, **[script_exclude_keys(3)](script_mandatory_keys.md)**, **[script_family(3)](script_family.md)**, **[script_oid(3)](script_oid.md)**, **[script_name(3)](script_name.md)**, **[script_require_keys(3)](script_require_keys.md)**, **[script_require_ports(3)](script_require_ports.md)**, **[script_require_udp_ports(3)](script_require_udp_ports.md)**, **[script_timeout(3)](script_timeout.md)**, **[script_version(3)](script_version.md)**, **[script_xref(3)](script_xref.md)**, **[script_tag(3)](script_tag.md)**, **[openvas-nasl(1)](../../openvas-nasl.md)** |
12 changes: 12 additions & 0 deletions
12
doc/manual/nasl/built-in-functions/report-functions/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Knowledge-Base Functions | ||
|
||
## GENERAL | ||
|
||
Those functions are used for reporting (send data back to daemon). | ||
|
||
## TABLE OF CONTENT | ||
|
||
**scanner_status** Remove. Reports the port scan progress (if the plugin is a port scanner!). | ||
**security_message** - reports a severe flaw. | ||
**log_message** - reports a miscellaneous information. | ||
**error_message** - reports an error information. |