SVN: security/getCVEdesc.py
shadzik
shadzik at pld-linux.org
Wed Jul 29 12:39:36 CEST 2009
Author: shadzik
Date: Wed Jul 29 12:39:35 2009
New Revision: 10433
Modified:
security/getCVEdesc.py
Log:
- use urlib2
Modified: security/getCVEdesc.py
==============================================================================
--- security/getCVEdesc.py (original)
+++ security/getCVEdesc.py Wed Jul 29 12:39:35 2009
@@ -4,8 +4,8 @@
import sys
import re
import readline
+import urllib2
-html = "cve.html"
lines = []
@@ -15,8 +15,10 @@
except(IndexError):
print "Usage: %s cveId" % sys.argv[0]
return
- f = open(html, 'r')
- read = f.xreadlines()
+ html = urllib2.urlopen("http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s" % cveID)
+ #f = open(html, 'r')
+ f = html.read()
+ read = f.split("\n")
for l in read:
l = l.strip()
lines.append(l)
@@ -33,5 +35,5 @@
return
os.popen("wget --quiet -N -O cve.html http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s" % cveID)
-getQueue()
+#getQueue()
parseHtml()
More information about the pld-cvs-commit
mailing list