[Openvas-nvts-commits] r538 - / scripts

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Jul 1 09:17:22 CEST 2014


Author: antu123
Date: 2014-07-01 09:17:22 +0200 (Tue, 01 Jul 2014)
New Revision: 538

Modified:
   ChangeLog
   scripts/gb_avast_av_detect_win.nasl
   scripts/gb_citrix_provisioning_services_detect.nasl
   scripts/gb_firefox_detect_win.nasl
   scripts/gb_ibm_lotus_symphony_detect_win.nasl
   scripts/gb_ibm_spss_sample_power_detect_win.nasl
   scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl
   scripts/gb_mcafee_vulnerability_manager_detect.nasl
   scripts/gb_ms_expression_web_detect.nasl
   scripts/gb_ms_frontpage_detect.nasl
   scripts/gb_openssl_detect_win.nasl
   scripts/gb_perl_detect_win.nasl
   scripts/gb_pgp_desktop_detect_win.nasl
   scripts/gb_python_detect_win.nasl
   scripts/gb_realplayer_detect_win.nasl
Log:
Updated to support 32 and 64 bit applicationa and newest detection method

Modified: ChangeLog
===================================================================
--- ChangeLog	2014-06-30 15:39:55 UTC (rev 537)
+++ ChangeLog	2014-07-01 07:17:22 UTC (rev 538)
@@ -1,3 +1,22 @@
+2014-07-01 Antu Sanadi <santu at secpod.com>
+
+	* scripts/gb_avast_av_detect_win.nasl,
+	scripts/gb_citrix_provisioning_services_detect.nasl,
+	scripts/gb_firefox_detect_win.nasl,
+	scripts/gb_ibm_lotus_symphony_detect_win.nasl,
+	scripts/gb_ibm_spss_sample_power_detect_win.nasl,
+	scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl,
+	scripts/gb_mcafee_vulnerability_manager_detect.nasl,
+	scripts/gb_ms_expression_web_detect.nasl,
+	scripts/gb_ms_frontpage_detect.nasl,
+	scripts/gb_openssl_detect_win.nasl,
+	scripts/gb_perl_detect_win.nasl,
+	scripts/gb_pgp_desktop_detect_win.nasl,
+	scripts/gb_python_detect_win.nasl,
+	scripts/gb_realplayer_detect_win.nasl:
+	Updated to support 32 and 64 bit applicationa and
+	newest detection method.
+
 2014-06-30 Michael Meyer <michael.meyer at greenbone.net>
 
 	* scripts/2014/gb_flussonic_media_server_lfi_06_14.nasl:

Modified: scripts/gb_avast_av_detect_win.nasl
===================================================================
--- scripts/gb_avast_av_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_avast_av_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,6 +7,9 @@
 # Authors:
 # Sharath S <sharaths at secpod.com>
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-24
+# Updated plugin completely according to CR57 and to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -25,33 +28,41 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "This script detects the installed version of avast! AntiVirus
-  and sets the result in KB.";
 
 if(description)
 {
-  script_id(801110);
+  script_oid("1.3.6.1.4.1.25623.1.0.801110");
+  script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
- script_version("$Revision$");
+  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2009-10-08 08:22:29 +0200 (Thu, 08 Oct 2009)");
-  script_tag(name:"cvss_base", value:"0.0");
-  script_tag(name:"risk_factor", value:"None");
+  script_tag(name:"detection", value:"registry version check");
   script_name("avast! AntiVirus Version Detection (Win)");
+
+  tag_summary =
+"Detection of installed version of avast! AntiVirus on Windows.
+
+The script logs in via smb, searches for avast and gets the
+version from 'DisplayVersion' string in registry.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Set KB for the version of avast! AntiVirus");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2009 Greenbone Networks GmbH");
-  script_family("Service detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
+  script_family("Product detection");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
   exit(0);
 }
 
@@ -61,42 +72,93 @@
 include("cpe.inc");
 include("host_details.inc");
 
-## Constant values
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801110";
-SCRIPT_DESC = "avast! AntiVirus Version Detection (Win)";
+## Variable Initialization
+avastName = "";
+avastPath = "";
+avastVer = "";
+os_arch = "";
 
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, loc, con)
+{
+  register_product(cpe:cpe, location:loc);
+
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: loc,
+                                           cpe: cpe,
+                                           concluded: con));
 }
 
-path1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch)
+{
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
 
-foreach path (make_list("avast!", "avast5"))
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
+## Check for 64 bit platform
+## 64bit and 32bit applications both installs in Wow6432Node
+else if("x64" >< os_arch){
+  key = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
+if(!registry_key_exists(key:key)){
+    exit(0);
+}
+
+foreach path (make_list("Avast", "avast!", "avast5"))
 {
-  avastName = registry_get_sz(key:path1 + path, item:"DisplayName");
+  avastName = registry_get_sz(key:key + path, item:"DisplayName");
 
   if(avastName =~ "avast! (Free )?Antivirus")
   {
-    avastVer = registry_get_sz(key:path1 + path, item:"DisplayVersion");
+    avastVer = registry_get_sz(key:key + path, item:"DisplayVersion");
 
     if(!(avastVer =~ "^([0-9]\.[0-9]+\.[0-9]+\.[0-9]+)"))
     {
-      avastPath = registry_get_sz(key:path1 + path, item:"DisplayIcon");
+      avastPath = registry_get_sz(key:key + path, item:"DisplayIcon");
+
+      ## avastPath will have complete path including file name
+      ## To use fetch_file_version() need to split it and take the last part
+      ## and again fetch_file_version() is going to execute below three lines
+      ## so not using fetch_file_version()
       share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:avastPath);
       file = ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:avastPath);
       avastVer = GetVer(file:file, share:share);
     }
+
     if(!isnull(avastVer))
     {
       set_kb_item(name:"Avast!/AV/Win/Ver", value:avastVer);
-      security_note(data:"Avast! Anti virus version " + avastVer +
-                         " was detected on the host");
-    
+
       ## build cpe and store it as host_detail
       cpe = build_cpe(value:avastVer, exp:"^([0-9.]+)", base:"cpe:/a:avast:avast_antivirus:");
-      if(!isnull(cpe))
-         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+      if(isnull(cpe)){
+        cpe = "cpe:/a:avast:avast_antivirus";
+      }
 
+      build_report(app:avastName, ver:avastVer, cpe:cpe, loc:avastPath, con:avastVer);
+
+      if("x64" >< os_arch && "x86" >!< avastPath)
+      {
+        ## Set KB
+        set_kb_item(name:"Avast!/AV64/Win/Ver", value:avastVer);
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:avastVer, exp:"^([0-9.]+)", base:"cpe:/a:avast:avast_antivirus:x64:");
+        if(isnull(cpe)){
+          cpe = "cpe:/a:avast:avast_antivirus:x64";
+        }
+
+        build_report(app:avastName, ver:avastVer, cpe:cpe, loc:avastPath, con:avastVer);
+      }
     }
   }
 }


Property changes on: scripts/gb_avast_av_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_citrix_provisioning_services_detect.nasl
===================================================================
--- scripts/gb_citrix_provisioning_services_detect.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_citrix_provisioning_services_detect.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -10,6 +10,9 @@
 # Updated By : Rachana Shetty <srachana at secpod.com> on 2012-08-03
 # - Updated to Set KB for InstallLocation and according to CR-57
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-26
+# Updated plugin to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (c) 2011 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -28,38 +31,42 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of Citrix Provisioning
-Services.
 
-The script logs in via smb, searches for Citrix Provisioning Services in the
-registry and gets the version from 'DisplayVersion' string in registry";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802220";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.802220");
+  script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
- script_version("$Revision$");
+  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2011-07-13 17:31:13 +0200 (Wed, 13 Jul 2011)");
-  script_tag(name:"cvss_base", value:"0.0");
-  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"detection", value:"registry version check");
   script_name("Citrix Provisioning Services Version Detection");
+
+  tag_summary =
+"Detection of installed version of Citrix Provisioning
+Services.
+
+The script logs in via smb, searches for Citrix Provisioning Services in the
+registry and gets the version from 'DisplayVersion' string in registry.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Detection of installed version of Citrix Provisioning Services");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (c) 2011 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
+  script_require_ports(139, 445);
   exit(0);
 }
 
@@ -70,18 +77,25 @@
 include("host_details.inc");
 
 ## Variables Initialization
-version = "";
+appVer = "";
 cpsPath = "";
-name = "";
+appName = "";
 
-## Confirm Windows
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, loc, con)
+{
+  register_product(cpe:cpe, location:loc);
+
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: loc,
+                                           cpe: cpe,
+                                           concluded: con));
 }
 
 ## Confirm Citrix Provisioning Server
 if(!registry_key_exists(key:"SOFTWARE\Citrix\ProvisioningServer")){
-    exit(0);
+  exit(0);
 }
 
 key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
@@ -92,11 +106,11 @@
 ## Get Version From Registry
 foreach item (registry_enum_keys(key:key))
 {
-  name = registry_get_sz(key:key + item, item:"DisplayName");
-  if("Citrix Provisioning Services" >< name)
+  appName = registry_get_sz(key:key + item, item:"DisplayName");
+  if("Citrix Provisioning Services" >< appName)
   {
-    version = registry_get_sz(key:key + item, item:"DisplayVersion");
-    if(version)
+    appVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+    if(appVer)
     {
       ## Get Install location
       cpsPath = registry_get_sz(key:key + item, item:"InstallLocation");
@@ -105,22 +119,38 @@
       }
 
       ## Set Citrix Provisioning Services Version in KB
-      set_kb_item(name:"Citrix/Provisioning/Services/Ver", value:version);
+      set_kb_item(name:"Citrix/Provisioning/Services/Ver", value:appVer);
 
       ## Set Path in KB
       set_kb_item(name:"Citrix/Provisioning/Services/path", value:cpsPath);
 
-      cpe = build_cpe(value: version, exp:"^([0-9.]+)", base:"cpe:/a:citrix:citrix_provisioning_server:");
-
+      cpe = build_cpe(value: appVer, exp:"^([0-9.]+)", base:"cpe:/a:citrix:citrix_provisioning_server:");
       if(isnull(cpe))
          cpe = 'cpe:/a:citrix:citrix_provisioning_server';
 
-      register_product(cpe:cpe, location:cpsPath, nvt:SCRIPT_OID);
+      build_report(app:appName, ver:appVer, cpe:cpe, loc:cpsPath, con:appVer);
 
-      log_message(data: build_detection_report(app:"Citrix Provisioning Services",
-                  version:version, install: cpsPath,
-                  cpe:cpe, concluded:version));
+      ## Get OS Architecture
+      os_arch = get_kb_item("SMB/Windows/Arch");
+      if(!os_arch){
+        error_message(data:"Failed to get the OS architecture");
+        exit(-1);
+      }
 
+      if("x64" >< os_arch)
+      {
+        ## Set Citrix Provisioning Services Version in KB
+        set_kb_item(name:"Citrix/Provisioning/Services64/Ver", value:appVer);
+
+        ## Set Path in KB
+        set_kb_item(name:"Citrix/Provisioning/Services64/path", value:cpsPath);
+
+        cpe = build_cpe(value: appVer, exp:"^([0-9.]+)", base:"cpe:/a:citrix:citrix_provisioning_server:x64:");
+        if(isnull(cpe))
+           cpe = 'cpe:/a:citrix:citrix_provisioning_server:x64';
+
+        build_report(app:appName, ver:appVer, cpe:cpe, loc:cpsPath, con:appVer);
+      }
     }
   }
 }


Property changes on: scripts/gb_citrix_provisioning_services_detect.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_firefox_detect_win.nasl
===================================================================
--- scripts/gb_firefox_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_firefox_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -16,8 +16,11 @@
 # Update By:  Thanga Prakash S <tprakash at secpod.com> on 2013-09-23
 # According to new style script_tags and Fixed issue in identifying ESR.
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-24
+# According to CR57 and to support 32 and 64 bit.
+#
 # Copyright:
-# Copyright (c) 2008 Greenbone Networks GmbH, http://www.greenbone.net
+# Copyright (C) 2008 Greenbone Networks GmbH, http://www.greenbone.net
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2
@@ -25,7 +28,7 @@
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
@@ -35,11 +38,9 @@
 
 include("revisions-lib.inc");
 
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800014";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.800014");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
@@ -78,48 +79,92 @@
 include("secpod_smb_func.inc");
 include("cpe.inc");
 include("host_details.inc");
+include("version_func.inc");
 
 
 ## Variable Initialization
+os_arch = "";
+key_list = "";
+key = "";
 appPath = "";
 foxVer = "";
 path = "";
 cpe = "";
 
-foreach regKey (make_list("SOFTWARE\Mozilla", "SOFTWARE\mozilla.org"))
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
+
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key_list = make_list("SOFTWARE\Mozilla",
+                       "SOFTWARE\mozilla.org");
+  key_list2 = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion");
+
+}
+
+## Check for 64 bit platform, Currently only 32-bit application is available
+else if("x64" >< os_arch)
 {
-  if(registry_key_exists(key: regKey))
+  key_list =  make_list("SOFTWARE\Wow6432Node\Mozilla",
+                        "SOFTWARE\Wow6432Node\mozilla.org");
+
+   key_list2 = make_list("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion");
+}
+
+if(isnull(key_list && key_list2)){
+  exit(0);
+}
+
+## Confirm Application
+if(!registry_key_exists(key:"SOFTWARE\Mozilla")){
+  if(!registry_key_exists(key:"SOFTWARE\mozilla.org")){
+    if(!registry_key_exists(key:"SOFTWARE\Wow6432Node\Mozilla")){
+      if(!registry_key_exists(key:"SOFTWARE\Wow6432Node\mozilla.org")){
+        exit(-1);
+      }
+    }
+  }
+}
+
+foreach key (key_list)
+{
+  # Check for Firefox browser
+  foxVer = registry_get_sz(key: key + "\Mozilla Firefox",
+                                      item:"CurrentVersion");
+  if(foxVer)
   {
-    # Check for Firefox browser
-    foxVer = registry_get_sz(key: regKey + "\Mozilla Firefox",
-                                        item:"CurrentVersion");
-    if(foxVer)
+    # Special case for Firefox 1.5 (Get the version from file)
+    if(foxVer =~ "^(1.5)")
     {
-      # Special case for Firefox 1.5 (Get the version from file)
-      if(foxVer =~ "^(1.5)")
+      foreach key (key_list2)
       {
-        exeFile  =  registry_get_sz(key:"SOFTWARE\Microsoft\Windows\Current" +
-                                        "Version\Uninstall\Mozilla Firefox (1.5)",
+        exeFile  =  registry_get_sz(key:key + "\Uninstall\Mozilla Firefox (1.5)",
                                     item:"InstallLocation");
-        if(isnull(exeFile))
-          exit(0);
+        appPath = exeFile ;
+        if(appPath)
+        {
+          foxVer = fetch_file_version(sysPath:appPath, file_name:"firefox.exe");
+        }
+        else
+        {
+          foxVer = eregmatch(pattern:"([0-9.]+)([0-9a-zA-Z]*)", string:foxVer);
+          if(foxVer[1] && foxVer[2])
+            foxVer[0] = foxVer[1] + "." + foxVer[2];
 
-        exeFile = exeFile + "\firefox.exe";
-        foxVer = GetVersionFromFile(file: exeFile,verstr:"prod");
-        if(!foxVer) exit(0);
+          foxVer = foxVer[0];
+        }
       }
-      else
-      {
-        foxVer = eregmatch(pattern:"([0-9.]+)([0-9a-zA-Z]*)", string:foxVer);
-        if(foxVer[1] && foxVer[2])
-          foxVer[0] = foxVer[1] + "." + foxVer[2];
+    }
 
-        foxVer = foxVer[0];
-      }
+    # Check for ESR installation
+    foreach key (key_list2)
+    {
+      path = registry_get_sz(key:key, item:"ProgramFilesDir");
 
-      # Check for ESR installation
-      path = registry_get_sz(key:"SOFTWARE\Microsoft\Windows\CurrentVersion\",
-                             item:"ProgramFilesDir");
       if(!path) exit(0);
 
       appPath = path + "\Mozilla Firefox";
@@ -154,11 +199,11 @@
         appName = 'Mozilla Firefox';
       }
 
-      register_product(cpe:cpe, location:appPath, nvt:SCRIPT_OID);
+      ##Currently only 32-bit application is available
+      register_product(cpe:cpe, location:appPath);
 
       log_message(data: build_detection_report(app: appName, version: foxVer,
-                                               install: appPath, cpe:cpe, concluded:foxVer));
-      exit(0);
+                                             install: appPath, cpe:cpe, concluded:foxVer));
     }
   }
 }


Property changes on: scripts/gb_firefox_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_ibm_lotus_symphony_detect_win.nasl
===================================================================
--- scripts/gb_ibm_lotus_symphony_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_ibm_lotus_symphony_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -25,99 +25,129 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of Foxit Reader.
 
-The script logs in via smb, searches for Foxit Reader in the registry and
-gets the version from registry";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802226";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
-  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
+  script_oid("1.3.6.1.4.1.25623.1.0.802226");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
+  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
   script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
-  script_tag(name:"creation_date", value:"2011-08-05 09:04:20 +0200 (Fri, 05 Aug 2011)");
+  script_tag(name:"creation_date", value:"2011-04-11 14:40:00 +0200 (Mon, 11 Apr 2011)");
   script_tag(name:"detection", value:"registry version check");
-  script_name("Foxit Reader Version Detection");
+  script_name("IBM Lotus Symphony Version Detection (Windows)");
+
+ tag_summary =
+"Detection of installed version of IBM Lotus Symphony on Windows.
+
+The script logs in via smb, searches for IBM Lotus Symphony in the registry,
+gets the from registry.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
-
   script_summary("Detection of installed version of IBM Lotus Symphony");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2011 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
   exit(0);
 }
 
-
+include("cpe.inc");
 include("smb_nt.inc");
-include("cpe.inc");
+include("version_func.inc");
 include("host_details.inc");
 include("secpod_smb_func.inc");
 
-## Variable Initialization
-key = "";
-item = "";
-name = "";
-version = "";
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
+}
+
+osArch = "";
+key_list = "";
+gsName = "";
+gsVer = "";
 path = "";
-cpe = "";
 
-## Confirm Windows
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+osArch = get_kb_item("SMB/Windows/Arch");
+if(!osArch)
+{
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
 }
 
-## Confirm IBM Lotus Symphony
-if(!registry_key_exists(key:"SOFTWARE\Lotus\Symphony")){
+#Check if Adobe Application is installed
+if(!registry_key_exists(key:"SOFTWARE\Lotus\Symphony") &&
+   !registry_key_exists(key:"SOFTWARE\Wow6432Node\Lotus\Symphony")){
   exit(0);
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)){
-  exit(0);
+## if os is 32 bit iterate over comman path
+if("x86" >< osArch){
+  key_list = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
 }
 
-## Get Version From Registry
-foreach item (registry_enum_keys(key:key))
+## Check for 64 bit platform
+else if("x64" >< osArch){
+ key_list = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\",
+                      "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+foreach key (key_list)
 {
-  name = registry_get_sz(key:key + item, item:"DisplayName");
-  if("IBM Lotus Symphony" >< name)
+  foreach item (registry_enum_keys(key:key))
   {
-    version = registry_get_sz(key:key + item, item:"DisplayVersion");
-    if(version)
+    gsName = registry_get_sz(key:key + item, item:"DisplayName");
+    if("IBM Lotus Symphony" >< gsName)
     {
-      path = registry_get_sz(key:key + item, item:"InstallLocation");
-      if(!path){
-        path = 'Could not find the install path from registry';
-      }
+      gsVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+      if(gsVer)
+      {
+        path = registry_get_sz(key:key + item , item:"InstallLocation");
+        if(!path){
+          path = "Could not find the install location from registry";
+        }
+            
+        set_kb_item(name:"IBM/Lotus/Symphony/Win/Ver", value:gsVer);
 
-      # Set IBM Lotus Symphony Version in KB
-      set_kb_item(name:"IBM/Lotus/Symphony/Win/Ver", value:version);
+        ## Build CPE
+        cpe = build_cpe(value:gsVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:lotus_symphony:");
+        if(isnull(cpe))
+          cpe = 'cpe:/a:ibm:lotus_symphony';
 
-      ## build cpe and store it as host_detail
-      cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:ibm:lotus_symphony:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:ibm:lotus_symphony";
+        ## Register Product and Build Report
+        build_report(app: "IBM Lotus Symphony", ver:gsVer, cpe:cpe, insloc:path);
 
-      register_product(cpe:cpe, location:path, nvt:SCRIPT_OID);
+        if("x64" >< osArch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"IBM/Lotus/Symphony64/Win/Ver", value:gsVer);
 
-      log_message(data: build_detection_report(app:"IBM Lotus Symphony",
-                                               version:version, install:path,
-                                               cpe:cpe, concluded: version));
-      exit(0);
+          ## Build CPE
+          cpe = build_cpe(value:gsVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:lotus_symphony:x64:");
+          if(isnull(cpe))
+            cpe = 'cpe:/a:ibm:lotus_symphony:x64';
+         
+          ## Register Product and Build Report
+          build_report(app: "IBM Lotus Symphony", ver:gsVer, cpe:cpe, insloc:path);
+        }
+      }
     }
   }
 }


Property changes on: scripts/gb_ibm_lotus_symphony_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_ibm_spss_sample_power_detect_win.nasl
===================================================================
--- scripts/gb_ibm_spss_sample_power_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_ibm_spss_sample_power_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -25,82 +25,124 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of IBM SPSS SamplePower.
 
-The script logs in via smb, searches for IBM SPSS SamplePower in the registry
-and gets the version from 'DisplayVersion' string in registry";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802299";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.802299");
+  script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
- script_version("$Revision$");
+  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
-  script_tag(name:"creation_date", value:"2012-02-01 10:10:10 +0530 (Wed, 01 Feb 2012)");
-  script_tag(name:"cvss_base", value:"0.0");
-  script_tag(name:"risk_factor", value:"None");
+  script_tag(name:"creation_date", value:"2011-04-11 14:40:00 +0200 (Mon, 11 Apr 2011)");
   script_tag(name:"detection", value:"registry version check");
   script_name("IBM SPSS SamplePower Version Detection (Windows)");
+
+ tag_summary =
+"Detection of installed version of IBM SPSS SamplePower on Windows.
+
+The script logs in via smb, searches for IBM SPSS SamplePower in the registry,
+gets the from registry.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Detection of installed version of IBM SPSS SamplePower");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2012 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
+  script_require_ports(139, 445);
   exit(0);
 }
 
 
+
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 include("cpe.inc");
 include("host_details.inc");
 
-## Confirm Windows
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
 }
 
-## Registry Key
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)) {
-  exit(0);
+osArch = "";
+key_list = "";
+gsName = "";
+gsVer = "";
+path = "";
+
+osArch = get_kb_item("SMB/Windows/Arch");
+if(!osArch)
+{
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
 }
 
-## Get Version From Registry
-foreach item (registry_enum_keys(key:key))
+## if os is 32 bit iterate over comman path
+if("x86" >< osArch){
+  key_list = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
+## Check for 64 bit platform
+else if("x64" >< osArch){
+ key_list = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\",
+                      "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+foreach key (key_list)
 {
-  name = registry_get_sz(key:key + item, item:"DisplayName");
-
-  ## Confirm The Application
-  if("SamplePower" >< name)
+  foreach item (registry_enum_keys(key:key))
   {
-    version = registry_get_sz(key:key + item, item:"DisplayVersion");
-    location = registry_get_sz(key:key + item, item:"Readme");
-    if(version)
+    gsName = registry_get_sz(key:key + item, item:"DisplayName");
+    if("SamplePower" >< gsName)
     {
-      ## Set IBM SPSS SamplePower Version in KB
-      set_kb_item(name:"IBM/SPSS/Win/Ver", value:version);
+      gsVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+      if(gsVer)
+      {
+        path = registry_get_sz(key:key + item , item:"Readme");
+        if(!path){
+          path = "Could not find the install location from registry";
+        }
 
-      ## Build CPE
-      cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:ibm:spss_samplepower:");
-      if(!isnull(cpe))
-        register_product(cpe:cpe, location:location, nvt:SCRIPT_OID);
+        set_kb_item(name:"IBM/SPSS/Win/Ver", value:gsVer);
 
-      log_message(data:'Detected IBM SPSS SamplePower version: ' + version +
-        '\nLocation: ' + location +
-        '\nCPE: '+ cpe +
-        '\n\nConcluded from version identification result:\n' +
-        'IBM SPSS SamplePower '+ version);
+        ## Build CPE
+        cpe = build_cpe(value:gsVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:spss_samplepower:");
+        if(isnull(cpe))
+          cpe = 'cpe:/a:ibm:spss_samplepower';
+
+        ## Register Product and Build Report
+        build_report(app: "SamplePower", ver:gsVer, cpe:cpe, insloc:path);
+
+        if("x64" >< osArch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"IBM/SPSS64/Win/Ver", value:gsVer);
+
+          ## Build CPE
+          cpe = build_cpe(value:gsVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:spss_samplepower:x64:");
+          if(isnull(cpe))
+            cpe = 'cpe:/a:ibm:spss_samplepower:x64';
+
+          ## Register Product and Build Report
+          build_report(app: "SamplePower", ver:gsVer, cpe:cpe, insloc:path);
+        }
+      }
     }
   }
 }


Property changes on: scripts/gb_ibm_spss_sample_power_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl
===================================================================
--- scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,6 +7,9 @@
 # Authors:
 # Arun Kallavi <karun at secpod.com>
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-24
+# Updated plugin completely according to CR57 and to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (c) 2013 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -25,107 +28,118 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of McAfee VirusScan Enterprise.
 
-The script detects the version of McAfee VirusScan Enterprise and sets the
-version in KB";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.803319";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.803319");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
   script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2013-03-04 09:45:42 +0530 (Mon, 04 Mar 2013)");
+  script_tag(name:"detection", value:"registry version check");
   script_name("McAfee VirusScan Enterprise Version Detection (Windows)");
+
+  tag_summary =
+"Detection of installed version of McAfee VirusScan Enterprise.
+
+The script detects the version of McAfee VirusScan Enterprise and sets the
+version in KB.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
-
   script_summary("Set the Version of McAfee VirusScan Enterprise in KB");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2013 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_mandatory_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
   exit(0);
 }
 
+
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 include("cpe.inc");
 include("host_details.inc");
+include("version_func.inc");
 
 ## Variable Initialization
+appName = "";
+appPath = "";
+appVer = "";
 key = "";
-name = "";
-path = "";
-version = "";
-version1 = "";
 cpe = "";
 
-## Confirm Windows
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, loc, con)
+{
+  register_product(cpe:cpe, location:loc);
+
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: loc,
+                                           cpe: cpe,
+                                           concluded: con));
 }
 
 ## Confirm Application
 key = "SOFTWARE\McAfee\DesktopProtection";
-if(!registry_key_exists(key:key)) {
-  exit(0);
-}
-
-## Function to set KB and Build CPE
-function SetCpeMvs(version, path, regex)
+if(!registry_key_exists(key:key))
 {
-  set_kb_item(name:"McAfee/VirusScan/Win/Ver", value:version);
-
-  ## Build cpe
-  cpe = build_cpe(value:version, exp:regex,
-        base:"cpe:/a:mcafee:virusscan_enterprise:");
-  if(isnull(cpe))
-   cpe = 'cpe:/a:mcafee:virusscan_enterprise';
-
-  register_product(cpe:cpe, location:path, nvt:SCRIPT_OID);
-  log_message(data: build_detection_report(app:"McAfee VirusScan Enterprise",
-                                           version:version, install:path,
-                                           cpe:cpe, concluded:version));
+  key = "SOFTWARE\Wow6432Node\McAfee\DesktopProtection";
+  if(!registry_key_exists(key:key)){
+    exit(0);
+  }
 }
 
 ## Get Product Name
-name = registry_get_sz(key:key, item:"Product");
-if("McAfee VirusScan Enterprise" >< name)
+appName = registry_get_sz(key:key, item:"Product");
+
+if("McAfee VirusScan Enterprise" >< appName)
 {
   ##Get version
-  version = registry_get_sz(key:key, item:"szProductVer");
-  if(version)
+  appVer = registry_get_sz(key:key, item:"szProductVer");
+
+  if(appVer)
   {
     ## Get Install Path
-    path =registry_get_sz(key:key, item:"szInstallDir");
-    if(path)
+    appPath =registry_get_sz(key:key, item:"szInstallDir");
+
+    if(appPath)
     {
-      path += "readme.txt";
-      share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:path);
-      file = ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:path);
+      appPath += "Readme.txt";
+      share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:appPath);
+      file = ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:appPath);
       txtRead = read_file(share:share, file:file, offset:0, count:500000);
 
       ## Get Version
-      version1 = eregmatch(pattern:"Version ([0-9.]+[a-z])", string:txtRead);
-      if(version1[1]){
-        SetCpeMvs(version:version1[1], path:path, regex:"^([0-9.]+[a-z])");
+      fileVer = eregmatch(pattern:"Version ([0-9.]+[a-z])", string:txtRead);
+      verRegex = "^([0-9.]+)";
+
+      if(fileVer[1])
+      {
+        appVer = fileVer[1];
+        verRegex = "^([0-9.]+[a-z])";
       }
-      else{
-        SetCpeMvs(version:version, path:path, regex:"^([0-9.]+)");
-      }
+
+      set_kb_item(name:"McAfee/VirusScan/Win/Ver", value:appVer);
+
+      ## Build cpe
+      cpe = build_cpe(value:appVer, exp:verRegex, base:"cpe:/a:mcafee:virusscan_enterprise:");
+      if(isnull(cpe))
+        cpe = 'cpe:/a:mcafee:virusscan_enterprise';
+
+      build_report(app:appName, ver:appVer, cpe:cpe, loc:appPath, con:appVer);
     }
   }
 }


Property changes on: scripts/gb_mcafee_virusscan_enterprise_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_mcafee_vulnerability_manager_detect.nasl
===================================================================
--- scripts/gb_mcafee_vulnerability_manager_detect.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_mcafee_vulnerability_manager_detect.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,6 +7,9 @@
 # Authors:
 # Shashi Kiran N <nskiran at secpod.com>
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-26
+# Updated plugin to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (C) 2014 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -26,11 +29,9 @@
 
 include("revisions-lib.inc");
 
-SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.804249";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.804249");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
@@ -59,12 +60,13 @@
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2014 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_mandatory_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
   exit(0);
 }
 
+
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 include("cpe.inc");
@@ -76,7 +78,24 @@
 insloc="";
 mVer="";
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
+
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
+## Presently Adobe RoboHelp 64bit application is not available
+## Check for 32 bit App on 64 bit platform
+else if("x64" >< os_arch){
+  key =  "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
 if(!registry_key_exists(key:key)){
   exit(0);
 }
@@ -104,7 +123,7 @@
         if(isnull(cpe))
           cpe = "cpe:/a:mcafee:vulnerability_manager";
 
-      register_product(cpe: cpe, location: insloc, nvt: SCRIPT_OID);
+      register_product(cpe: cpe, location: insloc);
 
       log_message(data: build_detection_report(app: mName,
                                                version: mVer,

Modified: scripts/gb_ms_expression_web_detect.nasl
===================================================================
--- scripts/gb_ms_expression_web_detect.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_ms_expression_web_detect.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,6 +7,9 @@
 # Authors:
 # Rachana Shetty <srachana at secpod.com>
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-24
+# Updated plugin completely according to CR57 and to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (c) 2012 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -25,38 +28,41 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of Microsoft Expression
-  Web.
 
-The script logs in via smb, searches for Microsoft Expression Web and
-in the registry and gets the version from 'Version' string in registry";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802885";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.802885");
+  script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
- script_version("$Revision$");
+  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2012-07-11 18:35:57 +0530 (Wed, 11 Jul 2012)");
-  script_tag(name:"cvss_base", value:"0.0");
-  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"detection", value:"registry version check");
   script_name("Microsoft Expression Web Detection");
+
+  tag_summary =
+"Detection of installed version of Microsoft Expression Web.
+
+The script logs in via smb, searches for Microsoft Expression Web and
+in the registry and gets the version from 'Version' string in registry.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Detection of installed version of Microsoft Expression Web");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (c) 2012 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("smb_reg_service_pack.nasl");
-  script_require_keys("SMB/WindowsVersion");
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
+  script_require_ports(139, 445);
   exit(0);
 }
 
@@ -72,11 +78,24 @@
 ewVer = "";
 insPath = "";
 
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
+## Presently Adobe RoboHelp 64bit application is not available
+## Check for 32 bit App on 64 bit platform
+else if("x64" >< os_arch){
+  key =  "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\";
+}
+
 if(!registry_key_exists(key:key)){
   exit(0);
 }
@@ -84,13 +103,11 @@
 foreach item (registry_enum_keys(key:key))
 {
   ewName = registry_get_sz(key:key + item, item:"DisplayName");
-  if(!ewName){
-    continue;
-  }
 
   if("Microsoft Expression Web" >< ewName)
   {
     ewVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+
     if(ewVer)
     {
       ## Get the installation path
@@ -101,19 +118,17 @@
 
       ## Set the KB item
       set_kb_item(name:"MS/Expression-Web/Ver", value:ewVer);
-      cpe = build_cpe(value:ewVer, exp:"^([0-9.]+[a-z0-9]*)",
-                           base:"cpe:/a:microsoft:expression_web:");
 
+      cpe = build_cpe(value:ewVer, exp:"^([0-9.]+[a-z0-9]*)", base:"cpe:/a:microsoft:expression_web:");
       if(!cpe){
         cpe = "cpe:/a:microsoft:expression_web";
       }
 
-      register_product(cpe:cpe, location:insPath, nvt:SCRIPT_OID);
+      register_product(cpe:cpe, location:insPath);
 
       log_message(data: build_detection_report(app:"Microsoft Expression Web",
                                               version:ewVer, install:insPath, cpe:cpe,
                                               concluded: ewVer));
-      exit(0);
     }
   }
 }


Property changes on: scripts/gb_ms_expression_web_detect.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_ms_frontpage_detect.nasl
===================================================================
--- scripts/gb_ms_frontpage_detect.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_ms_frontpage_detect.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,8 +7,11 @@
 # Authors:
 # Thanga Prakash S <tprakash at secpod.com>
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-24
+# According to CR57 and to support 32 and 64 bit.
+#
 # Copyright:
-# Copyright (c) 2013 Greenbone Networks GmbH, http://www.greenbone.net
+# Copyright (C) 2013 Greenbone Networks GmbH, http://www.greenbone.net
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2
@@ -26,11 +29,9 @@
 
 include("revisions-lib.inc");
 
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.803891";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.803891");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
@@ -57,10 +58,10 @@
   script_description(desc);
   script_summary("Check for the Microsoft FrontPage installation and set the version in KB for Windows");
   script_category(ACT_GATHER_INFO);
-  script_copyright("Copyright (c) 2013 Greenbone Networks GmbH");
+  script_copyright("Copyright (C) 2013 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_mandatory_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
   exit(0);
 }
@@ -71,65 +72,104 @@
 include("cpe.inc");
 include("host_details.inc");
 
+
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
+}
+
+
 ## Variable Initialization
+os_arch = "";
+key_list = "";
 key = "";
 insloc= "";
 pageVer= "";
 pageName = "";
 
-if(!registry_key_exists(key:"SOFTWARE\Microsoft\Office")){
-  exit(0);
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
 }
 
-foreach val (registry_enum_keys(key:"SOFTWARE\Microsoft\Office"))
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key_list = make_list("SOFTWARE\Microsoft\Office");
+  key_list2 = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+## Check for 64 bit platform, Currently only 32-bit application is available
+else if("x64" >< os_arch)
 {
-  if(eregmatch(pattern:"^([0-9.]+)" , string:val))
-  {
-    rootkey = "SOFTWARE\Microsoft\Office\\"+val+"\FrontPage";
-    if(!registry_key_exists(key: rootkey)){
-      exit(0);
-    }
-    break;
-  }
+  key_list =  make_list("SOFTWARE\Wow6432Node\Microsoft\Office");
+  key_list2 = make_list("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\");
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)){
+if(isnull(key_list && key_list2)){
   exit(0);
 }
 
-foreach item (registry_enum_keys(key:key))
+
+## Confirm Application
+if(!registry_key_exists(key:"SOFTWARE\Microsoft\Office")){
+  if(!registry_key_exists(key:"SOFTWARE\Wow6432Node\Microsoft\Office")){
+    exit(0);
+  }
+}
+
+foreach key (key_list)
 {
-  pageName = registry_get_sz(key:key + item, item:"DisplayName");
-  if("Microsoft Office FrontPage" >< pageName)
+  foreach item (registry_enum_keys(key:key))
   {
-    ## Get the Installed Path
-    insloc = registry_get_sz(key:key + item, item:"InstallLocation");
-    if(!insloc)
+    if(eregmatch(pattern:"^([0-9.]+)" , string:item))
     {
-      insloc = registry_get_sz(key: rootkey + "\InstallRoot", item:"Path");
-      if(!insloc){
-        insloc = "Unable to find the install location";
+      rootkey = key + "\" + item + "\FrontPage";
+      if(!registry_key_exists(key: rootkey)){
+        exit(0);
       }
+      break;
     }
+  }
+}
 
-    ## Get Version
-    pageVer = registry_get_sz(key: key + item, item:"DisplayVersion");
+foreach key (key_list2)
+{
+  foreach item (registry_enum_keys(key:key))
+  {
+    pageName = registry_get_sz(key:key + item, item:"DisplayName");
+    if("Microsoft Office FrontPage" >< pageName)
+    {
 
-    set_kb_item(name:"Microsoft/FrontPage/Ver", value:pageVer);
+      ## Get the Installed Path
+      insloc = registry_get_sz(key:key + item, item:"InstallLocation");
+      if(!insloc)
+      {
+        insloc = registry_get_sz(key: rootkey + "\InstallRoot", item:"Path");
+        if(!insloc){
+          insloc = "Unable to find the install location";
+        }
+      }
 
-    ## build cpe and store it as host_detail
-    cpe = build_cpe(value:pageVer, exp:"^([0-9.]+)", base:"cpe:/a:microsoft:frontpage:");
-    if(isnull(cpe))
-      cpe = "cpe:/a:microsoft:frontpage";
+      ## Get Version
+      pageVer = registry_get_sz(key:key + item, item:"DisplayVersion");
 
-    register_product(cpe:cpe, location:insloc, nvt:SCRIPT_OID);
+      set_kb_item(name:"Microsoft/FrontPage/Ver", value:pageVer);
 
-    log_message(data: build_detection_report(app: pageName,
-                                               version: pageVer,
-                                               install: insloc,
-                                               cpe: cpe,
-                                               concluded: pageVer));
-    exit(0);
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:pageVer, exp:"^([0-9.]+)", base:"cpe:/a:microsoft:frontpage:");
+      if(isnull(cpe))
+        cpe = "cpe:/a:microsoft:frontpage";
+
+      ## Register Product and Build Report
+      build_report(app: pageName, ver:pageVer , cpe:cpe, insloc:insloc);
+    }
   }
 }


Property changes on: scripts/gb_ms_frontpage_detect.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_openssl_detect_win.nasl
===================================================================
--- scripts/gb_openssl_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_openssl_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,8 +7,11 @@
 # Authors:
 # Sujit Ghosal <sghosal at secpod.com>
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-26
+# According to CR57 and to support 32 and 64 bit.
+#
 # Copyright:
-# Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net
+# Copyright (C) 2009 Greenbone Networks GmbH, http://www.greenbone.net
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2
@@ -25,70 +28,127 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "This script finds the installed OpenSSL version and saves the
-  result in KB item.";
 
 if(description)
 {
-  script_id(800257);
+  script_oid("1.3.6.1.4.1.25623.1.0.800257");
+  script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
- script_version("$Revision$");
+  script_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2009-04-02 08:15:32 +0200 (Thu, 02 Apr 2009)");
-  script_tag(name:"cvss_base", value:"0.0");
-  script_tag(name:"risk_factor", value:"None");
+  script_tag(name:"detection", value:"registry version check");
   script_name("OpenSSL Version Detection (Win)");
+
+  tag_summary =
+"This script finds the installed OpenSSL version and saves the result in KB
+item.
+
+The script logs in via smb, searches for OpenSSL in the registry and gets the
+version from registry";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Set Version of OpenSSL in KB for Windows");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2009 Greenbone Networks GmbH");
-  script_family("General");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
+  script_family("Product detection");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
-  exit(0);
+   exit(0);
 }
 
+
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 include("cpe.inc");
 include("host_details.inc");
 
-## Constant values
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800257";
-SCRIPT_DESC = "OpenSSL Version Detection (Win)";
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
 
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
+# Variable Initialization
+os_arch = "";
+key_list = "";
+key= "";
+sslname = "";
+sslver = "";
+sslPath = "";
 
-if(!registry_key_exists(key:key)){
-    exit(0);
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
 }
 
-foreach item (registry_enum_keys(key:key))
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key_list = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+## Check for 64 bit platform
+else if("x64" >< os_arch){
+  key_list =  make_list("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\",
+                        "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+if(isnull(key_list)){
+  exit(0);
+}
+
+
+foreach key (key_list)
 {
-  name = registry_get_sz(key:key + item, item:"DisplayName");
-  if("OpenSSL" >< name)
+  foreach item (registry_enum_keys(key:key))
   {
-    ver = eregmatch(pattern:"([0-9]\.[0-9]\.[0-9.]+[a-z]?)", string:name);
-    if(ver[0] != NULL)
+    sslname = registry_get_sz(key:key + item, item:"DisplayName");
+    if("OpenSSL" >< sslname)
     {
-      set_kb_item(name:"OpenSSL/Win/Ver", value:ver[0]);
-      security_note(data:"OpenSSL version " + ver[0] + " was detected on the host");
-   
-      ## build cpe and store it as host_detail
-      register_host_detail(name:"App", value:string("cpe:/a:openssl:openssl:", ver[0]), nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+      sslver = eregmatch(pattern:"([0-9]\.[0-9]\.[0-9.]+[a-z]?)", string:sslname);
+      sslPath = registry_get_sz(key:key + item, item:"InstallLocation");
+      if(sslver[0] != NULL)
+      {
+        set_kb_item(name:"OpenSSL/Win/Ver", value:sslver[0]);
 
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:sslver[0], exp:"^([0-9.]+[a-z]?)", base:"cpe:/a:openssl:openssl:");
+        if(isnull(cpe))
+          cpe = "cpe:/a:openssl:openssl";
+
+        ## Register Product and Build Report
+        build_report(app: "openssl", ver:sslver[0], cpe:cpe, insloc:sslPath);
+
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"OpenSSL64/Win/Ver", value:sslver[0]);
+          cpe = build_cpe(value:sslver[0], exp:"^([0-9.]+[a-z]?)", base:"cpe:/a:openssl:openssl:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:openssl:openssl:x64";
+
+          ## Register Product and Build Report
+          build_report(app: "openssl", ver:sslver[0], cpe:cpe, insloc:sslPath);
+        }
+      }
     }
-    exit(0);
   }
 }


Property changes on: scripts/gb_openssl_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_perl_detect_win.nasl
===================================================================
--- scripts/gb_perl_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_perl_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,8 +7,11 @@
 # Authors:
 # Nikita MR <rnikita at secpod.com>
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-26
+# According to CR57 and to support 32 and 64 bit.
+#
 # Copyright:
-# Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net
+# Copyright (C) 2009 Greenbone Networks GmbH, http://www.greenbone.net
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2
@@ -16,7 +19,7 @@
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
@@ -25,35 +28,41 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of Active or Strawberry Perl.
 
-The script logs in via smb, searches for Active or Strawberry Perl in the
-registry and gets the version from registry";
-
 if(description)
 {
-  script_id(800966);
+  script_oid("1.3.6.1.4.1.25623.1.0.800966");
   script_version("$Revision$");
+  script_tag(name:"cvss_base", value:"0.0");
   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_tag(name:"risk_factor", value:"None");
   script_tag(name:"last_modification", value:"$Date$");
   script_tag(name:"creation_date", value:"2009-11-05 12:25:48 +0100 (Thu, 05 Nov 2009)");
+  script_tag(name:"detection", value:"registry version check");
   script_name("Perl Version Detection (Windows)");
+
+  tag_summary =
+"Detection of installed version of Active or Strawberry Perl.
+
+The script logs in via smb, searches for Active or Strawberry Perl in the
+registry and gets the version from registry";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Set version of Perl in KB");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2009 Greenbone Networks GmbH");
-  script_family("Service detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
+  script_family("Product detection");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
   exit(0);
 }
 
@@ -63,93 +72,140 @@
 include("cpe.inc");
 include("host_details.inc");
 
-## Constant values
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800966";
-SCRIPT_DESC = "Perl Version Detection (Windows)";
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
 
-## start script
-if(!get_kb_item("SMB/WindowsVersion")){
-  exit(0);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
 }
 
-if(!registry_key_exists(key:"SOFTWARE\Perl")){
+## Variable Initialization
+os_arch = "";
+key_list = "";
+key= "";
+perlName= "";
+perlLoc = "";
+perlVer = "";
+
+
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
+
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key_list = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+## Check for 64 bit platform
+else if("x64" >< os_arch){
+  key_list =  make_list("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\",
+                        "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+if(isnull(key_list)){
   exit(0);
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)) {
+## Confirm Application
+if(!registry_key_exists(key:"SOFTWARE\Perl")){
+  if(!registry_key_exists(key:"SOFTWARE\Wow6432Node\Perl")){
     exit(0);
+  }
 }
 
-foreach item (registry_enum_keys(key:key))
+foreach key (key_list)
 {
-  perlName = registry_get_sz(key:key + item, item:"DisplayName");
-
-  # Check for Strawberry Perl
-  if("Strawberry Perl" >< perlName)
+  foreach item (registry_enum_keys(key:key))
   {
-    ## Get Location
-    perlLoc = registry_get_sz(key:key + item, item:"InstallLocation");
-    if(!perlLoc)
-    {
-      perlLoc = "Location not found";
-    }
+    perlName = registry_get_sz(key:key + item, item:"DisplayName");
 
-    ## Get Version
-    perlVer = registry_get_sz(key:key + item, item:"Comments");
-    perlVer = eregmatch(pattern:"Strawberry Perl ([0-9.]+)", string:perlVer);
-    if(!isnull(perlVer[1]))
+    # Check for Strawberry Perl
+    if("Strawberry Perl" >< perlName)
     {
-      set_kb_item(name:"Strawberry/Perl/Ver", value:perlVer[1]);
-      set_kb_item(name:"Strawberry/Perl/Loc", value:perlLoc);
+      ## Get Location
+      perlLoc = registry_get_sz(key:key + item, item:"InstallLocation");
+      if(!perlLoc)
+      {
+        perlLoc = "Location not found";
+      }
 
-      ## build cpe and store it as host_detail
-      cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)",
+      ## Get Version
+      perlVer = registry_get_sz(key:key + item, item:"Comments");
+      perlVer = eregmatch(pattern:"Strawberry Perl .* ([0-9.]+)", string:perlVer);
+      if(!isnull(perlVer[1]))
+      {
+        set_kb_item(name:"Strawberry/Perl/Ver", value:perlVer[1]);
+        set_kb_item(name:"Strawberry/Perl/Loc", value:perlLoc);
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)",
                       base:"cpe:/a:vanilla_perl_project:strawberry_perl:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:vanilla_perl_project:strawberry_perl";
+        if(isnull(cpe))
+          cpe = "cpe:/a:vanilla_perl_project:strawberry_perl";
 
-      register_product(cpe:cpe, location:perlLoc, nvt:SCRIPT_OID);
+        ## Register Product and Build Report
+        build_report(app: "Strawberry Perl", ver:perlVer[1], cpe:cpe, insloc:perlLoc);
 
-      log_message(data: build_detection_report(app:"Strawberry Perl",
-                                             version:perlVer[1],
-                                             install: perlLoc,
-                                             cpe:cpe,
-                                             concluded:perlVer[1]));
-    }
-  }
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"Strawberry64/Perl/Ver", value:perlVer[1]);    
+          cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)",
+                      base:"cpe:/a:vanilla_perl_project:strawberry_perl:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:vanilla_perl_project:strawberry_perl:x64";
 
-  # Check for ActivePerl
-  if("ActivePerl"  >< perlName)
-  {
-    ## Get Location
-    perlLoc = registry_get_sz(key:key + item, item:"InstallLocation");
-    if(!perlLoc)
-    {
-      perlLoc = "Location not found";
+          ## Register Product and Build Report
+          build_report(app: "Strawberry Perl", ver:perlVer[1], cpe:cpe, insloc:perlLoc);
+        }
+      }
     }
 
-    ## Get Version
-    perlVer = eregmatch(pattern:"ActivePerl ([0-9.]+)", string:perlName);
-    if(!isnull(perlVer[1]))
+    # Check for ActivePerl
+    if("ActivePerl"  >< perlName)
     {
-      set_kb_item(name:"ActivePerl/Ver", value:perlVer[1]);
-      set_kb_item(name:"ActivePerl/Loc", value:perlLoc);
+      ## Get Location
+      perlLoc = registry_get_sz(key:key + item, item:"InstallLocation");
+      if(!perlLoc){
+        perlLoc = "Location not found";
+      }
 
-      ## build cpe and store it as host_detail
-      cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)",
-                      base:"cpe:/a:perl:perl:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:perl:perl";
+      ## Get Version
+      perlVer = eregmatch(pattern:"ActivePerl ([0-9.]+)", string:perlName);
+      if(!isnull(perlVer[1]))
+      {
+        set_kb_item(name:"ActivePerl/Ver", value:perlVer[1]);
+        set_kb_item(name:"ActivePerl/Loc", value:perlLoc);
 
-      register_product(cpe:cpe, location:perlLoc, nvt:SCRIPT_OID);
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)", base:"cpe:/a:perl:perl:");
+        if(isnull(cpe))
+          cpe = "cpe:/a:perl:perl";
 
+        ## Register Product and Build Report
+        build_report(app: "Active Perl", ver:perlVer[1], cpe:cpe, insloc:perlLoc);
 
-      log_message(data: build_detection_report(app:"Active Perl",
-                                               version:perlVer[1],
-                                               install: perlLoc,
-                                               cpe:cpe,
-                                               concluded:perlVer[1]));
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"ActivePerl64/Ver", value:perlVer[1]);
+          cpe = build_cpe(value:perlVer[1], exp:"^([0-9.]+)", base:"cpe:/a:perl:perl:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:perl:perl:x64";
+
+          ## Register Product and Build Report
+          build_report(app: "Active Perl", ver:perlVer[1], cpe:cpe, insloc:perlLoc);
+        }
+      }
     }
   }
 }


Property changes on: scripts/gb_perl_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_pgp_desktop_detect_win.nasl
===================================================================
--- scripts/gb_pgp_desktop_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_pgp_desktop_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -7,12 +7,15 @@
 # Authors:
 # Sujit Ghosal <sghosal at secpod.com>
 #
-# Copyright (c) 2008 Greenbone Networks GmbH, http://www.greenbone.net 
+# Copyright (C) 2008 Greenbone Networks GmbH, http://www.greenbone.net
 #
 # Updated By: Thanga Prakash S <tprakash at secpod.com> on 2013-09-04
 # According to CR57, new style script_tags and to detect
 # Symantec Encryption Desktop Version.
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-26
+# According to CR57 and to support 32 and 64 bit.
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2
 # (or any later version), as published by the Free Software Foundation.
@@ -29,11 +32,9 @@
 
 include("revisions-lib.inc");
 
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800215";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.800215");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
@@ -60,10 +61,10 @@
   script_description(desc);
   script_summary("Check for presence of Symantec PGP/Encryption Desktop");
   script_category(ACT_GATHER_INFO);
+  script_copyright("Copyright (C) 2008 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_copyright("Copyright (C) 2008 Greenbone Networks GmbH");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_mandatory_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
   exit(0);
 }
@@ -75,6 +76,9 @@
 include("host_details.inc");
 
 ## variable initialization
+os_arch = "";
+key_list = "";
+key= "";
 appName = "";
 insloc = "";
 pgpdeskVer = "";
@@ -82,67 +86,103 @@
 ## Function to Build report
 function build_report(app, ver, cpe, insloc)
 {
-  register_product(cpe:cpe, location:insloc, nvt:SCRIPT_OID);
+  register_product(cpe:cpe, location:insloc);
 
   log_message(data: build_detection_report(app: app,
                                            version: ver,
                                            install: insloc,
                                            cpe: cpe,
                                            concluded: ver));
-  exit(0);
 }
 
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
 
-if(!get_kb_item("SMB/WindowsVersion")){
+
+##32-bit application cannot be installed on 64-bit OS
+key_list =  make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+
+if(isnull(key_list)){
   exit(0);
 }
 
+## Confirm Application
 if(!registry_key_exists(key:"SOFTWARE\PGP Corporation\PGP")){
-  exit(0);
+    exit(0);
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)) {
-  exit(0);
-}
-
-foreach item (registry_enum_keys(key:key))
+foreach key (key_list)
 {
-  appName = registry_get_sz(key:key + item, item:"DisplayName");
-
-  if("PGP Desktop" >< appName || "Symantec Encryption Desktop" >< appName)
+  foreach item (registry_enum_keys(key:key))
   {
-    ## Get the Installed Path
-    insloc = registry_get_sz(key:key + item, item:"InstallLocation");
-    if(!insloc){
-      insloc = "Could not find the install location from registry";
-    }
+    appName = registry_get_sz(key:key + item, item:"DisplayName");
 
-    ## Get the version
-    deskVer = registry_get_sz(key:key + item, item:"DisplayVersion");
-    if(!deskVer) exit(0);
-
-    if("PGP Desktop" >< appName)
+    if("PGP Desktop" >< appName || "Symantec Encryption Desktop" >< appName)
     {
-      set_kb_item(name:"PGPDesktop/Win/Ver", value:deskVer);
+      ## Get the Installed Path
+      insloc = registry_get_sz(key:key + item, item:"InstallLocation");
+      if(!insloc){
+        insloc = "Could not find the install location from registry";
+      }
 
-      ## build cpe and store it as host_detail
-      cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:pgp_desktop:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:symantec:pgp_desktop";
+      ## Get the version
+      deskVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+      if(!deskVer) exit(0);
 
-      build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
-    }
-    else
-    {
-      set_kb_item(name:"EncryptionDesktop/Win/Ver", value:deskVer);
+      if("PGP Desktop" >< appName)
+      {
+        set_kb_item(name:"PGPDesktop/Win/Ver", value:deskVer);
 
-      ## build cpe and store it as host_detail
-      cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:encryption_desktop:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:symantec:encryption_desktop";
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:pgp_desktop:");
+        if(isnull(cpe))
+          cpe = "cpe:/a:symantec:pgp_desktop";
 
-      build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
+        build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
+
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch)
+        {
+          set_kb_item(name:"PGPDesktop64/Win/Ver", value:deskVer);
+
+          ## build cpe and store it as host_detail
+          cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:pgp_desktop:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:symantec:pgp_desktop:x64";
+
+          ## Register Product and Build Report
+          build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
+        }
+      }
+      else
+      {
+        set_kb_item(name:"EncryptionDesktop/Win/Ver", value:deskVer);
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:encryption_desktop:");
+        if(isnull(cpe))
+          cpe = "cpe:/a:symantec:encryption_desktop";
+
+        build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
+
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch)
+        {
+          set_kb_item(name:"PGPDesktop64/Win/Ver", value:deskVer);
+
+          ## build cpe and store it as host_detail
+          cpe = build_cpe(value:deskVer, exp:"^([0-9.]+)", base:"cpe:/a:symantec:encryption_desktop:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:symantec:encryption_desktop:x64";
+
+          ## Register Product and Build Report
+          build_report(app: appName, ver: deskVer, cpe: cpe, insloc: insloc);
+        }
+      }
     }
   }
 }


Property changes on: scripts/gb_pgp_desktop_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id

Modified: scripts/gb_python_detect_win.nasl
===================================================================
--- scripts/gb_python_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_python_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -10,6 +10,9 @@
 # Update By:  Shakeel <bshakeel at secpod.com> on 2014-03-05
 # According to cr57 and new style script_tags.
 #
+# Updated By: Shakeel <bshakeel at secpod.com> on 2014-06-24
+# According to CR57 and to support 32 and 64 bit.
+#
 # Copyright:
 # Copyright (C) 2011 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -29,11 +32,9 @@
 
 include("revisions-lib.inc");
 
-SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.801795";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.801795");
   script_version("$Revision$");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
@@ -62,8 +63,8 @@
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2011 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_mandatory_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
   exit(0);
 }
@@ -74,52 +75,99 @@
 include("cpe.inc");
 include("host_details.inc");
 
+
+## Function to Register Product and Build report
+function build_report(app, ver, cpe, insloc)
+{
+  register_product(cpe:cpe, location:insloc);
+  log_message(data: build_detection_report(app: app,
+                                           version: ver,
+                                           install: insloc,
+                                           cpe: cpe,
+                                           concluded: ver));
+}
+
+
 ## Variable Initialization
+os_arch = "";
+key_list = "";
 key="";
 pyPath="";
 pyVer="";
 
-if(!registry_key_exists(key:"SOFTWARE\Python")){
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
+
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key_list = make_list("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+## Check for 64 bit platform
+else if("x64" >< os_arch){
+  key_list =  make_list("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\",
+                        "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
+}
+
+if(isnull(key_list)){
   exit(0);
 }
 
-key = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\";
-if(!registry_key_exists(key:key)) {
+
+## Confirm Application
+if(!registry_key_exists(key:"SOFTWARE\Python")){
+  if(!registry_key_exists(key:"SOFTWARE\Wow6432Node\Python")){
     exit(0);
+  }
 }
 
-foreach item (registry_enum_keys(key:key))
+foreach key (key_list)
 {
-  pyName = registry_get_sz(key:key + item, item:"DisplayName");
-
-  ## Confirm for Python
-  if("Python" >< pyName)
+  foreach item (registry_enum_keys(key:key))
   {
-    ##Get Python install Path
-    pyPath = registry_get_sz(key:key + item, item:"DisplayIcon");
-    if(!pyPath)
-      pyPath = "Could not find the install location from registry";
-    else
-      pyPath = pyPath - "python.exe";
+    pyName = registry_get_sz(key:key + item, item:"DisplayName");
 
-    ##Get Python Version
-    pyVer = registry_get_sz(key:key + item, item:"DisplayVersion");
-    if(pyVer)
+    ## Confirm for Python
+    if("Python" >< pyName)
     {
-      set_kb_item(name:"Python/Win/Ver", value:pyVer);
+      ##Get Python install Path
+      pyPath = registry_get_sz(key:key + item, item:"DisplayIcon");
+      if(!pyPath)
+        pyPath = "Could not find the install location from registry";
+      else
+        pyPath = pyPath - "python.exe";
 
-      ##build cpe and register
-      cpe = build_cpe(value:pyVer, exp:"^([0-9.]+)", base:"cpe:/a:python:python:");
-      if(isnull(cpe))
-        cpe = "cpe:/a:python:python";
+      ##Get Python Version
+      pyVer = registry_get_sz(key:key + item, item:"DisplayVersion");
+      if(pyVer)
+      {
+        set_kb_item(name:"Python/Win/Ver", value:pyVer);
 
-      register_product(cpe: cpe, location: pyPath, nvt: SCRIPT_OID);
+        ##build cpe and register
+        cpe = build_cpe(value:pyVer, exp:"^([0-9.]+)", base:"cpe:/a:python:python:");
+        if(isnull(cpe))
+          cpe = "cpe:/a:python:python";
 
-      log_message(data: build_detection_report(app: "Python",
-                                          version: pyVer,
-                                          install: pyPath,
-                                          cpe: cpe,
-                                          concluded: pyVer));
+        ## Register Product and Build Report
+        build_report(app: "Python", ver:pyVer, cpe:cpe, insloc:pyPath);
+
+        ## 64 bit apps on 64 bit platform
+        if("x64" >< os_arch && "Wow6432Node" >!< key)
+        {
+          set_kb_item(name:"Python64/Win/Ver", value:pyVer);
+
+          cpe = build_cpe(value:pyVer, exp:"^([0-9.]+)", base:"cpe:/a:python:python:x64:");
+          if(isnull(cpe))
+            cpe = "cpe:/a:python:python:x64";
+
+          ## Register Product and Build Report
+          build_report(app: "Python", ver:pyVer, cpe:cpe, insloc:pyPath);
+        }
+      }
     }
   }
 }

Modified: scripts/gb_realplayer_detect_win.nasl
===================================================================
--- scripts/gb_realplayer_detect_win.nasl	2014-06-30 15:39:55 UTC (rev 537)
+++ scripts/gb_realplayer_detect_win.nasl	2014-07-01 07:17:22 UTC (rev 538)
@@ -10,6 +10,9 @@
 # Update By:  Rachana Shetty <srachana at secpod.com> on 2012-12-28
 # Updated to detect Older version and according to CR-57
 #
+# Updated By: Thanga Prakash S <tprakash at secpod.com> on 2014-06-26
+# Updated plugin to support 32 and 64 bit
+#
 # Copyright:
 # Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net
 #
@@ -28,43 +31,46 @@
 ###############################################################################
 
 include("revisions-lib.inc");
-tag_summary = "Detection of installed version of RealNetworks
-RealPlayer.
 
-The script logs in via smb, searches for RealPlayer in the registry and
-gets the path for 'realplayer.exe' file in registry and version from
-realplayer.exe file";
-
-SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800508";
-
 if(description)
 {
-  script_oid(SCRIPT_OID);
+  script_oid("1.3.6.1.4.1.25623.1.0.800508");
   script_version("$Revision$");
-  script_tag(name:"last_modification", value:"$Date$");
-  script_tag(name:"creation_date", value:"2009-02-18 15:32:11 +0100 (Wed, 18 Feb 2009)");
   script_tag(name:"cvss_base", value:"0.0");
   script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
   script_tag(name:"risk_factor", value:"None");
+  script_tag(name:"last_modification", value:"$Date$");
+  script_tag(name:"creation_date", value:"2009-02-18 15:32:11 +0100 (Wed, 18 Feb 2009)");
   script_tag(name:"detection", value:"registry version check");
   script_name("RealPlayer Application Version Detection");
+
+  tag_summary =
+"Detection of installed version of RealNetworks RealPlayer.
+
+The script logs in via smb, searches for RealPlayer in the registry and
+gets the path for 'realplayer.exe' file in registry and version from
+realplayer.exe file.";
+
   desc = "
   Summary:
   " + tag_summary;
+
+  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
+    script_tag(name : "summary" , value : tag_summary);
+  }
+
   script_description(desc);
   script_summary("Detection of installed version of RealPlayer");
   script_category(ACT_GATHER_INFO);
   script_copyright("Copyright (C) 2009 Greenbone Networks GmbH");
   script_family("Product detection");
-  script_dependencies("secpod_reg_enum.nasl");
-  script_require_keys("SMB/WindowsVersion");
+  script_dependencies("secpod_reg_enum.nasl", "smb_reg_service_pack.nasl");
+  script_mandatory_keys("SMB/WindowsVersion", "SMB/Windows/Arch");
   script_require_ports(139, 445);
-  if (revcomp(a: OPENVAS_VERSION, b: "6.0+beta5") >= 0) {
-    script_tag(name : "summary" , value : tag_summary);
-  }
   exit(0);
 }
 
+
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 include("cpe.inc");
@@ -78,7 +84,25 @@
 rpVer = "";
 cpe = "";
 
-if(!get_kb_item("SMB/WindowsVersion")){
+## Get OS Architecture
+os_arch = get_kb_item("SMB/Windows/Arch");
+if(!os_arch){
+  error_message(data:"Failed to get the OS architecture");
+  exit(-1);
+}
+
+## Check for 32 bit platform
+if("x86" >< os_arch){
+  key = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths";
+}
+
+## Presently Adobe RoboHelp 64bit application is not available
+## Check for 32 bit App on 64 bit platform
+else if("x64" >< os_arch){
+  key =  "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths";
+}
+
+if(!registry_key_exists(key:key)){
   exit(0);
 }
 
@@ -86,23 +110,23 @@
 foreach file (make_list("\RealPlay.exe", "\realplay.exe"))
 {
   ## Get the RealPlay.exe Path from Registry
-  rpFile = registry_get_sz(key:"SOFTWARE\Microsoft\Windows\CurrentVersion" +
-                                "\App Paths" + file, item:"Path");
+  rpFile = registry_get_sz(key:key + file, item:"Path");
   if(!rpFile)
     continue;
 }
 
-if(!rpFile)
+if(!rpFile){
   exit(0);
+}
 
 if(file =~ "realplay.exe")
 {
-   oldPath = eregmatch(pattern:"(.*);", string:rpFile);
-   if(oldPath && oldPath[0])
-      rpFile =  oldPath[1];
+  oldPath = eregmatch(pattern:"(.*);", string:rpFile);
+  if(oldPath && oldPath[0]){
+    rpFile =  oldPath[1];
+  }
 }
 
-
 ## Get realplay.exe Version
 rpVer = fetch_file_version(sysPath: rpFile, file_name:"realplay.exe");
 if(isnull(rpVer))
@@ -122,9 +146,9 @@
 }
 
 if(isnull(cpe))
-  cpe = 'cpe:/a:realnetworks:realplayer:';
+  cpe = 'cpe:/a:realnetworks:realplayer';
 
-register_product(cpe:cpe, location:rpFile, nvt:SCRIPT_OID);
+register_product(cpe:cpe, location:rpFile);
 
-log_message(data: build_detection_report(app:"Detected RealNetworks RealPlayer" ,
+log_message(data: build_detection_report(app:"RealNetworks RealPlayer" ,
                                          version: rpVer, install: rpFile, cpe:cpe, concluded:rpVer));


Property changes on: scripts/gb_realplayer_detect_win.nasl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision Date
   + Author Revision Date Id



More information about the Openvas-nvts-commits mailing list