[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvas-plugins
Subject:    [Openvas-plugins] Adobe flash player version detection
From:       Henri Doreau <henri.doreau () greenbone ! net>
Date:       2011-07-04 12:49:50
Message-ID: CAPXEBz6LSbAW11dH5m0=s-hYdxjRQKVaQbZ2ta-4RAuET-SRLw () mail ! gmail ! com
[Download RAW message or body]

Hello,

I had a problem when running gb_adobe_flash_player_detect_lin.nasl
against localhost. It looks like the script generates an invalid
command line when launched against locahost. In this case the string
representation of the array of arguments is appended to the command
name (eg; "grep [ 0: -o, 1: -m1...]") which is obviously wrong.

What was the reason for doing this?

The attached patch solved the problem, I can commit it upon request.

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

["adobe_flash_player.patch" (text/x-patch)]

Index: gb_adobe_flash_player_detect_lin.nasl
===================================================================
--- gb_adobe_flash_player_detect_lin.nasl	(revision 11269)
+++ gb_adobe_flash_player_detect_lin.nasl	(working copy)
@@ -73,17 +73,10 @@
   {
     binaryName = ereg_replace(pattern:" ", replace:"\ ",
                               string:chomp(flashName[a]));
-    if(islocalhost())
-    {
-      garg[4] = binaryName;
-      arg = garg;
-    }
-    else
-    {
-      arg = garg[0]+" "+garg[1]+" "+garg[2]+" "+
-            raw_string(0x22)+garg[3]+raw_string(0x22)+" "+binaryName;
-    }
 
+    arg = garg[0]+" "+garg[1]+" "+garg[2]+" "+
+          raw_string(0x22)+garg[3]+raw_string(0x22)+" "+binaryName;
+
     flashVer = get_bin_version(full_prog_name:grep, version_argv:arg, sock:air_sock,
                                ver_pattern:"([0-9]+,[0-9]+,[0-9]+,[0-9]+)");
     if(flashVer[0] != NULL)


_______________________________________________
Openvas-plugins mailing list
Openvas-plugins@wald.intevation.org
http://lists.wald.intevation.org/mailman/listinfo/openvas-plugins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic