*** Henri Doreau <[email protected]> wrote:
> gb_openssl_dos_vuln_lin_jun09.nasl
>
> app = get_app(app:"cpe:/a:openssl:openssl", nvt:SCRIPT_OID, desc:SCRIPT_DESC);
host_details.inc:
- function get_app(app, desc, cpe) {
+ function get_app(app, desc, nvt) {
> if (isnull(app)) {
> exit(0);
> }
>
> tokens = split(app["CPE"], sep:":", keep:0);
> sslVer = ereg_replace(pattern:"-", replace:".", string:tokens[4]);
We should make it a little bit easier for the nasl-developers to get the
version (If only the version is required). Something like...
| function get_app_version(app, nvt, desc) {
|
| local_var app, desc, nvt, tokens;
|
| a = get_app(app:app, nvt:nvt, desc:desc);
| if ( isnull( a ) )
| return FALSE;
|
| tokens = split( a["CPE"], sep:":", keep:0 );
|
| if ( ! isnull( tokens[4] ) )
| return tokens[4];
|
| return FALSE;
| version = get_app_version(app:"cpe:/a:openssl:openssl", nvt:SCRIPT_OID,
desc:SCRIPT_DESC);
| sslVer = ereg_replace(pattern:"-", replace:".", string:version);
Micha
--
Michael Meyer OpenPGP Key: 52A6EFA6
http://www.greenbone.net/
Greenbone Networks GmbH, Neuer Graben 17, 49074 Osnabrück | AG
Osnabrück, HR B 202460
Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner
_______________________________________________
Openvas-plugins mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-plugins