Python2ですんません。
この脆弱性はどれぐらい危険かを示すCVSSという指標があるのですが、これをCVEから引けたら楽かも、ということで書いてみました。NIST(米国)の値を引っ張ってきて、CSSセレクタで抜いてます。
こんな感じのをAzure NotebookなどJupyter環境でまとめておくと便利ですね。
cve_list = [
"CVE-2017-0001",
"CVE-2016-0001",
"CVE-2015-0001",
"CVE-2014-0001",
"CVE-2013-0001"
]
import urllib2
from bs4 import BeautifulSoup
for cve in cve_list:
instance = urllib2.urlopen("https://nvd.nist.gov/vuln/detail/"+cve)
soup = BeautifulSoup(instance, "html.parser")
desc = soup.select_one("[data-testid=vuln-cvssv2-base-score-link]")
if hasattr(desc,"text"):
print cve, desc.text.strip()