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

List:       openvas-cvs
Subject:    [Openvas-commits] r14981 - in trunk/openvas-plugins: . scripts
From:       scm-commit () wald ! intevation ! org
Date:       2012-12-28 14:39:09
Message-ID: 20121228143912.50C059A21230 () wald ! intevation ! org
[Download RAW message or body]

Author: mime
Date: 2012-12-28 15:39:09 +0100 (Fri, 28 Dec 2012)
New Revision: 14981

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/gb_VMSA-2012-0018.nasl
   trunk/openvas-plugins/scripts/gb_vmware_esxi_init.nasl
   trunk/openvas-plugins/scripts/vmware_esx.inc
Log:
Added check for ESXi 5.1.0. Minor changes for ESXi 5.1.0 support.

Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2012-12-28 13:21:14 UTC (rev 14980)
+++ trunk/openvas-plugins/ChangeLog	2012-12-28 14:39:09 UTC (rev 14981)
@@ -1,3 +1,12 @@
+2012-12-28 Michael Meyer <michael.meyer@greenbone.net>
+
+	* scripts/gb_VMSA-2012-0018.nasl:
+	Added check for ESXi 5.1.0
+
+	* scripts/gb_vmware_esxi_init.nasl,
+	scripts/vmware_esx.inc:
+	Minor changes for ESXi 5.1.0 support.
+
 2012-12-28 Veerendra G.G <veerendragg@secpod.com>
 
 	* scripts/gb_cubecart_mult_vuln.nasl,

Modified: trunk/openvas-plugins/scripts/gb_VMSA-2012-0018.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_VMSA-2012-0018.nasl	2012-12-28 13:21:14 UTC (rev \
                14980)
+++ trunk/openvas-plugins/scripts/gb_VMSA-2012-0018.nasl	2012-12-28 14:39:09 UTC (rev \
14981) @@ -89,7 +89,8 @@
 if(!get_kb_item('VMware/ESXi/LSC'))exit(0);
 if(! esxVersion = get_kb_item("VMware/ESX/version"))exit(0);
 
-patches = make_array("5.0.0","VIB:esx-base:5.0.0-1.25.912577"); 
+patches = make_array("5.0.0","VIB:esx-base:5.0.0-1.25.912577",
+                     "5.1.0","VIB:esx-base:5.1.0-0.8.911593"); 
 
 if(!patches[esxVersion])exit(0);
 

Modified: trunk/openvas-plugins/scripts/gb_vmware_esxi_init.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_vmware_esxi_init.nasl	2012-12-28 13:21:14 UTC \
                (rev 14980)
+++ trunk/openvas-plugins/scripts/gb_vmware_esxi_init.nasl	2012-12-28 14:39:09 UTC \
(rev 14981) @@ -75,8 +75,8 @@
   exit(0);
 }
 
-if(esxi_version !~ "^4\." && esxi_version !~ "^5\.0") {
-  log_message(data:string("Unsupported ESXi version. Currently ESXi 4.0, 4.1 and 5.0 \
are supported. We found ESXi version ", esxi_version, "\n")); +if(esxi_version !~ \
"^4\." && esxi_version !~ "^5\.") { +  log_message(data:string("Unsupported ESXi \
version. Currently ESXi 4.0, 4.1 and 5.0 and 5.1 are supported. We found ESXi version \
", esxi_version, "\n"));  exit(0);
 }
 
@@ -95,16 +95,16 @@
 
 }
 
-if(esxi_version =~ "^5\.0") {
+if(esxi_version =~ "^5\.") {
 
   if(get_esxi5_0_vibs(port:port,user:user,pass:pass)) {
 
     set_kb_item(name:"VMware/ESXi/LSC", value:TRUE);
-    log_message(data:string("It was possible to login and to get all relevant \
information. Local Security Checks for ESXi 5.0 enabled.\n\nWe found the following \
bulletins installed on the remote ESXi:\n", installed_bulletins,"\n"), port:port); +  \
log_message(data:string("It was possible to login and to get all relevant \
information. Local Security Checks for ESXi 5.x enabled.\n\nWe found the following \
bulletins installed on the remote ESXi:\n", installed_bulletins,"\n"), port:port);  \
exit(0);  
   } else {
-    log_message(data:string("It was NOT possible to login and to get all relevant \
information. Local Security Checks for ESXi 5.0 disabled.\n\nError: ", \
esxi_error,"\n"), port:port); +    log_message(data:string("It was NOT possible to \
login and to get all relevant information. Local Security Checks for ESXi 5.x \
disabled.\n\nError: ", esxi_error,"\n"), port:port);  exit(0);
   }
 

Modified: trunk/openvas-plugins/scripts/vmware_esx.inc
===================================================================
--- trunk/openvas-plugins/scripts/vmware_esx.inc	2012-12-28 13:21:14 UTC (rev 14980)
+++ trunk/openvas-plugins/scripts/vmware_esx.inc	2012-12-28 14:39:09 UTC (rev 14981)
@@ -85,13 +85,13 @@
 
   local_var user, pass, recv;
 
-  if(esxi_version !~ "^5\.0") {
-    _esx_error(data:'ESXi 5.0: Wrong ESXi version. Expected: 5.0. Received: ' + \
esxi_version  + '\n'); +  if(esxi_version !~ "^5\.") {
+    _esx_error(data:'ESXi 5.x: Wrong ESXi version. Expected: 5.x. Received: ' + \
esxi_version  + '\n');  return FALSE;
   }
 
   if(!user || !pass) {
-    _esx_error(data:'ESXi 5.0: Could not find user or password\n');
+    _esx_error(data:'ESXi 5.x: Could not find user or password\n');
     return FALSE;
   }
 
@@ -107,7 +107,7 @@
 
 
   if(!recv) {
-    _esx_error(data:'ESXi 5.0: Could not get installed bulletins/patches\n');
+    _esx_error(data:'ESXi 5.x: Could not get installed bulletins/patches\n');
     return FALSE;
   }  
 
@@ -475,7 +475,7 @@
   local_var last, date, datematch, bl, recv, line, bulletins;
 
   if(strlen(recv) < 1) {
-    _esx_error(data:'ESXi 5.0: Unexpected response from ESXi server\n');
+    _esx_error(data:'ESXi 5.x: Unexpected response from ESXi server\n');
     return FALSE;
   }
 
@@ -490,7 +490,7 @@
 
    foreach line (bl) {
 
-      if("releasedate" >< tolower(line)) {
+      if("releasedate" >< tolower(line) || "creationdate" >< tolower(line)) {
 
         datematch = \
eregmatch(pattern:"(20[0-9][0-9]-[012][0-9]-[0-3][0-9])",string:line);  date = \
datematch[1]; @@ -511,14 +511,14 @@
     if(last) {
       installed_bulletins += '\n\nLast ReleaseDate: ' + last + '\n';
     }  
-    set_kb_item(name:"VMware/esxi/5.0.0/bulletins", value:ibs);
+    set_kb_item(name:"VMware/esxi/" + esxi_version  + "/bulletins", value:ibs);
   }
 
   if(!isnull(last)) {
-    set_kb_item(name:"VMware/esxi/5.0.0/last_bulletin", value:last);
+    set_kb_item(name:'VMware/esxi/' + esxi_version  + '/last_bulletin', value:last);
     return TRUE;
   } else {
-    _esx_error(data:'ESXi 5.0: Could not extract date of last bulletin\n');
+    _esx_error(data:'ESXi 5.x: Could not extract date of last bulletin\n');
     return FALSE;
   }
 

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits


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

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