[Openvas-commits] r2683 - in trunk/openvas-plugins: . extra/lsc_generator/parser

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Mar 6 07:22:26 CET 2009


Author: chandra
Date: 2009-03-06 07:22:21 +0100 (Fri, 06 Mar 2009)
New Revision: 2683

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/extra/lsc_generator/parser/redhat.py
Log:
Fixed a minor issue with redhat parser

Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2009-03-06 04:26:55 UTC (rev 2682)
+++ trunk/openvas-plugins/ChangeLog	2009-03-06 06:22:21 UTC (rev 2683)
@@ -1,4 +1,8 @@
 2009-03-06 Chandrashekhar B <bchandra at secpod.com>
+	* extra/lsc_generator/parser/redhat.py:
+	Fixed a minor issue with the parser
+
+2009-03-06 Chandrashekhar B <bchandra at secpod.com>
 	* scripts/secpod_wsftp_server_sec_bypass_vuln.nasl,
 	scripts/secpod_opera_mult_vuln_dec08_lin.nasl,
 	scripts/secpod_winftp_server_dos_vuln.nasl,

Modified: trunk/openvas-plugins/extra/lsc_generator/parser/redhat.py
===================================================================
--- trunk/openvas-plugins/extra/lsc_generator/parser/redhat.py	2009-03-06 04:26:55 UTC (rev 2682)
+++ trunk/openvas-plugins/extra/lsc_generator/parser/redhat.py	2009-03-06 06:22:21 UTC (rev 2683)
@@ -133,6 +133,7 @@
     Html_content = ''
     XREF = []
     FileName = ''
+    total_prod_list = []
 
 
     def _getYearLinks(self, link, year, debug=0):
@@ -357,6 +358,7 @@
 
         ## Don't include Product/Platform, If not in "os_map" Dict
         ref_list = []
+        self.total_prod_list = prd_list
         for prod in prd_list:
             if os_map.has_key(prod):
                 ref_list.append(prod)
@@ -365,8 +367,8 @@
                   print "If Needed to generate code, then "+ \
                         "add into dict variable os_map in parser"
 
-            if ref_list and debug:
-                print "\nGenerating Code for (%s) Products " %(ref_list)
+        if ref_list and debug:
+            print "\nGenerating Code for (%s) Products " %(ref_list)
 
         return ref_list
 
@@ -394,6 +396,10 @@
 
         for prod in prod_list:
             rpm_list = []
+
+            if debug:
+                print "\nGetting RPM For : ", prod
+
             if string.find(data, prod) == -1:
                 if debug:
                     print "\nERROR: Product not found in the data : ", prod
@@ -407,7 +413,7 @@
                 if not line:
                     continue
 
-                if line in prod_list:
+                if line in self.total_prod_list:
                     break
 
                 flag = 1
@@ -429,6 +435,9 @@
             rpm_list = utils.stripIt(rpm_list, strip_val)
             rpm_list = utils.removeDups(rpm_list)
 
+            if debug:
+                print "Found PRMS are : ", rpm_list
+
             if os_map.has_key(prod):
                 os_pkg_dict[os_map[prod]] = rpm_list
 



More information about the Openvas-commits mailing list