/[secure-testing]/bin/update-nvd
ViewVC logotype

Contents of /bin/update-nvd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2488 - (show annotations) (download)
Thu Oct 20 09:03:39 2005 UTC (7 years, 8 months ago) by fw
File MIME type: text/script
File size: 732 byte(s)
 r638@deneb:  fw | 2005-10-14 15:43:12 +0200
 bin/tracker_service.py (TrackerService.page_home):
   Document external interfaces.
 (TrackerService.page_bug):
   Add NVD references.
 (TrackerService.page_status_release_stable,
  TrackerService.page_status_release_testing):
   Show NVD remote attack range if present.
 (TrackerService.url_nvd, TrackerService.make_nvd_ref):
   New.
 
 lib/python/security_db.py (NVDEntry):
   New class.
 (DB.initSchema):
   New nvd_data table.  Update stable_status and testing_status views.
 (DB.replaceNVD, DB.getNVD):
   New methods.
 
 bin/update-nvd, lib/python/nvd.py:
   New files.
1 #!/usr/bin/python
2
3 import os
4 import os.path
5 import string
6 import sys
7
8 def setup_paths():
9 check_file = 'lib/python/debian_support.py'
10 path = os.getcwd()
11 while 1:
12 if os.path.exists("%s/%s" % (path, check_file)):
13 sys.path = [path + '/lib/python'] + sys.path
14 return path
15 idx = string.rfind(path, '/')
16 if idx == -1:
17 raise ImportError, "could not setup paths"
18 path = path[0:idx]
19 os.chdir(setup_paths())
20
21 import nvd
22 import security_db
23
24 db_file = 'data/security.db'
25 db = security_db.DB(db_file)
26
27 data = []
28 for name in sys.argv[1:]:
29 f = file(name)
30 data += nvd.parse(f)
31 f.close()
32
33 cursor = db.writeTxn()
34 db.replaceNVD(cursor, data)
35 db.commit(cursor)

Properties

Name Value
svn:mime-type text/script

  ViewVC Help
Powered by ViewVC 1.1.5