Hello, as some of you might have noticed, we recently introduced a NASL API to centralize informations concerning a host. This API allows NVTs to store informations in a host details database, that is then dumped into the report, in a specific section. By now, we mainly focused on OS detection, but this will be enlarged. This already allows the display of nice OS icons in GSA in front of the target's IP address whatever threat level filter is applied.
We changed numerous scripts to make use of this new feature. Whenever a script detects an operating system, it should register it using the register_host_detail() function, which is exported by host_details.inc. You can refer to gather-package-list.nasl, os_fingerprint.nasl or nmap.nasl for instance. Detected OS's should be registered under the name "OS". To know whether a host runs a given operating system or not, you might use the new host_runs(<pattern>) function, also exported by host_details.inc. This function will compare the given pattern against the values that have been registered by the other scripts. Currently, most of the scripts that require to know the running operating system read the Host/OS/ICMP entry from the knowledge base. This value is not very reliable and the new system allows the combination of several ones. This way it takes advantage of the numerous OS detection scripts and methods in order to provide more accurate results and a flexible system. The host_runs() function returns a string that can be "yes" (pattern match), "no" (no match), or "unknown" (no available informations). The http_keepalive traversal_files() function make use of this API. To avoid double inclusion problems we have added the inclusion of host_details.inc to every nvt that already included http_keepalive.inc. This is still in discussion, but ensure that host_details.inc is included in your script if you plan to use file_traversal(). The argument for file_traversal() is now ignored and is not needed anymore. Please let me know if you face any problem or if you have suggestions/questions about this system. Regards. -- Henri Doreau | Greenbone Networks GmbH | http://www.greenbone.net Neuer Graben 17, 49074 Osnabrueck, Germany | AG Osnabrueck, HR B 202460 Executive Directors: Lukas Grunwald, Dr. Jan-Oliver Wagner _______________________________________________ Openvas-plugins mailing list [email protected] http://lists.wald.intevation.org/mailman/listinfo/openvas-plugins
