-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: script run duration stats per host (#1774)
* Add: script run duration stats per host For testing, run the following script. Stats are collected only if the log_whole_attack scanner preference is set. Later, the script must run to generate the result. ``` if(description) { script_oid("1.3.6.1.4.1.25623.1.200.1"); script_version("2024-11-29T13:05:23+0000"); script_tag(name:"last_modification", value:"2024-11-29 13:05:23 +0000 (Fri, 29 Nov 2024)"); script_tag(name:"creation_date", value:"2024-11-29 13:05:23 +0100 (Fri, 29 Nov 2024)"); script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N"); script_tag(name:"cvss_base", value:"0.0"); script_name("Script Stats"); script_copyright("Copyright (C) 2024 Greenbone AG"); script_family("Service detection"); # nb: Needs to run at the end of the scan because of the required info only available in this phase... script_category(ACT_END); script_tag(name:"summary", value:"This scripts logs the run duration of the scripts."); script_timeout(3600); exit(0); } log_message( data: generate_host_stats() ); exit( 0 ); ``` * Add: report_scripts openvas setting Stores in a file the script run duration in json format. This option expects a valid path to store a file with scripts stats. Script run durations are collected only if the log_whole_attack setting is set to 'yes'. For testing, set the setting in openvas.conf with a valid path and set log_whole_attack setting to yes. A json file will be created containing script run duration for each host as json objects.
- Loading branch information
Showing
8 changed files
with
195 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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