[Openvas-commits] r12024 - in trunk/openvas-plugins: . scripts

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Nov 7 15:30:25 CET 2011


Author: hdoreau
Date: 2011-11-07 15:30:19 +0100 (Mon, 07 Nov 2011)
New Revision: 12024

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl
   trunk/openvas-plugins/scripts/joomla_detect.nasl
   trunk/openvas-plugins/scripts/mldonkey_www.nasl
   trunk/openvas-plugins/scripts/secpod_ftp_anonymous.nasl
   trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl
Log:
* scripts/mldonkey_www.nasl,
scripts/gb_moodle_cms_detect.nasl,
scripts/joomla_detect.nasl,
scripts/secpod_ftp_anonymous.nasl,
scripts/secpod_phpmyadmin_detect_900129.nasl: Don't rely on the
presence of the risk factor in script description to generate output.


Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/ChangeLog	2011-11-07 14:30:19 UTC (rev 12024)
@@ -1,5 +1,14 @@
 2011-11-07  Henri Doreau <henri.doreau at greenbone.net>
 
+	* scripts/mldonkey_www.nasl,
+	scripts/gb_moodle_cms_detect.nasl,
+	scripts/joomla_detect.nasl,
+	scripts/secpod_ftp_anonymous.nasl,
+	scripts/secpod_phpmyadmin_detect_900129.nasl: Don't rely on the
+	presence of the risk factor in script description to generate output.
+
+2011-11-07  Henri Doreau <henri.doreau at greenbone.net>
+
 	* scripts/cutenews_detect.nasl,
 	scripts/invision_power_board_detect.nasl,
 	scripts/postgresql_detect.nasl: Made output independent of the script

Modified: trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl	2011-11-07 14:30:19 UTC (rev 12024)
@@ -134,20 +134,15 @@
        ## build cpe and store it as host_detail
        register_cpe(tmpVers: version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:moodle:moodle:");
 
-       info = string("None\n\nmoodle Version '");
-       info += string(version);
-       info += string("' was detected on the remote host in the following directory:\n\n");
-       info += string(install, "\n"); 
+       desc += string("\nmoodle Version '");
+       desc += string(version);
+       desc += string("' was detected on the remote host in the following directory:\n\n");
+       desc += string(install, "\n"); 
+
        if(not_accurate) {
-	info += string("\nOpenVAs was not able to extract the exact version number. Further tests on moodle\ncould lead in false positives.\n\n");
+	desc += string("\nOpenVAs was not able to extract the exact version number. Further tests on moodle\ncould lead in false positives.\n\n");
        }	 
 
-       desc = ereg_replace(
-         string:desc,
-         pattern:"None$",
-         replace:info
-	);  
-
        security_note(port:port,data:desc);
        exit(0);
   }	

Modified: trunk/openvas-plugins/scripts/joomla_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/joomla_detect.nasl	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/scripts/joomla_detect.nasl	2011-11-07 14:30:19 UTC (rev 12024)
@@ -212,19 +212,13 @@
             if(!isnull(cpe))
                register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
-            info = string("None\n\nJoomla Version (");
-            info += string(vers);
-            info += string(") with lang(");
-            info += string(lang);
-            info += string(") was detected on the remote host in the following directory(s):\n\n");
-            info += string(install, "\n"); 
+            desc += string("\nJoomla Version (");
+            desc += string(vers);
+            desc += string(") with lang(");
+            desc += string(lang);
+            desc += string(") was detected on the remote host in the following directory(s):\n\n");
+            desc += string(install, "\n"); 
 
-            desc = ereg_replace(
-            string:desc,
-            pattern:"None$",
-            replace:info
-            ); 
-            
             if(report_verbosity > 0) {
                 security_note(port:port,data:desc);
             }

Modified: trunk/openvas-plugins/scripts/mldonkey_www.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mldonkey_www.nasl	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/scripts/mldonkey_www.nasl	2011-11-07 14:30:19 UTC (rev 12024)
@@ -105,21 +105,15 @@
        if(!islocalhost())ml_www_remote = TRUE;
      }  
   
-   info = string("Medium\n\nMLDonkey Version (");
-   info += vers;
-   info += string(") was detected on the remote host.\n");
+   desc += string("\nMLDonkey Version (");
+   desc += vers;
+   desc += string(") was detected on the remote host.\n");
    if(ml_www_remote) {
-     info += string("\nRemote access to MLDonkey web interface from ");
-     info +=  this_host_name();
-     info +=  string(" is allowed!\n");
+     desc += string("\nRemote access to MLDonkey web interface from ");
+     desc +=  this_host_name();
+     desc +=  string(" is allowed!\n");
    }
 
-   desc = ereg_replace(
-        string:desc,
-        pattern:"Medium$",
-        replace:info
-    );
-
    tmp_version = string(vers);
    set_kb_item(name: string("www/", port, "/MLDonkey/version"), value: tmp_version);
 

Modified: trunk/openvas-plugins/scripts/secpod_ftp_anonymous.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ftp_anonymous.nasl	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/scripts/secpod_ftp_anonymous.nasl	2011-11-07 14:30:19 UTC (rev 12024)
@@ -110,18 +110,9 @@
   }
 
   if(result && strlen(result)) {
-   info = string("Medium\n\nHere are the contents of the remote FTP directory listing:\n\n"); 
-   info += result;
-   info += string("\n");
-
-   desc = ereg_replace(
-    	string:desc,
-    	pattern:"Medium$",
-    	replace:info
-    );    
-
-  } else { 
-   desc = desc;
+   desc += string("\nHere are the contents of the remote FTP directory listing:\n\n"); 
+   desc += result;
+   desc += string("\n");
   }
   security_warning(port:port,data:desc);
 }

Modified: trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl	2011-11-07 13:46:02 UTC (rev 12023)
+++ trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl	2011-11-07 14:30:19 UTC (rev 12024)
@@ -121,7 +121,7 @@
 
 if(installations) {
 
- info = string("None\n\nphpMyAdmin was detected on the remote host in the following directory(s):\n\n"); 
+ info = string("\nphpMyAdmin was detected on the remote host in the following directory(s):\n\n"); 
 
  foreach found (installations) {
 
@@ -145,12 +145,7 @@
 
  }
 
- desc = ereg_replace(
-    	string:desc,
-    	pattern:"None$",
-    	replace:info
-    );   
-
+ desc += info;
  security_note(port:port,data:desc);
  exit(0);
 



More information about the Openvas-commits mailing list