Author: shadzik
Date: Mon Oct  8 00:22:27 2007
New Revision: 8799

Modified:
   security/cve_reader.py
Log:
- hurrey, we can now display more than just one CVE entry that was in one line
- better reg exp


Modified: security/cve_reader.py
==============================================================================
--- security/cve_reader.py      (original)
+++ security/cve_reader.py      Mon Oct  8 00:22:27 2007
@@ -54,9 +54,10 @@
                        cvslog = 1
                        cve = ""
                        while(lines[i+cvslog] != ""):
-                               cve_match = re.match('.*(CVE-[0-9\-]+)', 
lines[i+cvslog])
+                               cve_match = re.findall('(CVE-[0-9]+-[0-9]+)', 
lines[i+cvslog])
                                if cve_match:
-                                       cve += "<a 
href=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s\";>%s</a> " % 
(cve_match.group(1), cve_match.group(1))
+                                       for z in range(len(cve_match)):
+                                               cve += "<a 
href=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s\";>%s</a> " % 
(cve_match[z], cve_match[z])
                                cvslog = cvslog+1
                if lines[i] == "$Log$":
                        p = lines[i+1].split(" ")
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to