aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorStefan Behte <craig@gentoo.org>2010-02-13 01:09:52 +0000
committerStefan Behte <craig@gentoo.org>2010-02-13 01:09:52 +0000
commit76e0499dad682f24b6088ebcdc04c1b7e95f4c36 (patch)
treeb13a8b7f5589fc0cad0aa7e786f70364f60e1880 /bin
parentMITRE sync (diff)
downloadsecurity-76e0499dad682f24b6088ebcdc04c1b7e95f4c36.tar.gz
security-76e0499dad682f24b6088ebcdc04c1b7e95f4c36.tar.bz2
security-76e0499dad682f24b6088ebcdc04c1b7e95f4c36.zip
pressing B now opens the current CVE in your favorite browser.
svn path=/; revision=1861
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check-todo-issues12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/check-todo-issues b/bin/check-todo-issues
index 46b1cb9..8950d8b 100755
--- a/bin/check-todo-issues
+++ b/bin/check-todo-issues
@@ -39,6 +39,7 @@ class EntryEditor:
self.todo_regex = todo_regex
self.replace_line = replace_line
self.editor = os.environ.get('EDITOR', os.environ.get('VISUAL', "nano"))
+ self.browser = os.environ.get('BROWSER')
self.listdata = self.read_list(self.datafile)
@@ -208,6 +209,8 @@ class EntryEditor:
elif command[0] == 'c':
self.bugs_collected[cve] = entry
self.bugs_atom = product
+ elif command[0] == 'B':
+ self.open_in_browser(cve)
elif command[0] == 'b':
self.file_bug(entry, cve, product)
elif command[0] == 'q':
@@ -303,6 +306,14 @@ class EntryEditor:
self.recently_saved = False
+ def open_in_browser(self, cve):
+ url = "http://nvd.nist.gov/nvd.cfm?cvename=%s" % (cve)
+ if not self.browser:
+ print "Please set the environment variable BROWSER to use this feature."
+ else:
+ os.spawnlp(os.P_WAIT, self.browser, self.browser, url)
+
+
def file_bug(self, entry, cve, product):
cvelist = self.bugs_collected.keys()
cvelist.sort()
@@ -473,6 +484,7 @@ def miniusage():
""" Print available actions """
print ''' * RETURN Goes to the next entry
+ * B open CVE in browser
* pNAME Does a new search in the tree for NAME
* e or v Calls your $EDITOR to edit this entry
* d Redisplays the last search completely