예제 #1
0
 def setUpClass(cls):
     # Run makefile to build faked binaries (in python 3 or 2)
     subprocess.call(["make", "clean"], cwd=BINARIES_PATH)
     subprocess.call(["make", "all"], cwd=BINARIES_PATH)
     # Instantiate the NVD database
     cls.nvd = NVDSQLite()
     cls.nvd.get_cvelist_if_stale()
     # Instantiate a scanner
     cls.scanner = Scanner(cls.nvd)
예제 #2
0
 def setUpClass(cls):
     # Run makefile to build faked binaries (in python 3 or 2)
     subprocess.call(["make", "clean"], cwd=BINARIES_PATH)
     subprocess.call(["make", "all"], cwd=BINARIES_PATH)
     # Instantiate the NVD database
     cls.nvd = NVDSQLite()
     cls.nvd.get_cvelist_if_stale()
     # Instantiate a scanner
     cls.scanner = Scanner(cls.nvd)
     # temp dir for tests that require downloads
     cls.tempdir = tempfile.mkdtemp(prefix='cve-bin-tool-')
예제 #3
0
 def setUpClass(cls):
     # Run makefile to build faked binaries (in python 3 or 2)
     if platform == "linux" or platform == "linux2":
         subprocess.call(["make", "clean-linux"], cwd=BINARIES_PATH)
     elif platform == "win32":
         subprocess.call(["make", "clean-windows"], cwd=BINARIES_PATH)
     subprocess.call(["make", "all"], cwd=BINARIES_PATH)
     # Instantiate the NVD database
     cls.nvd = NVDSQLite()
     if os.getenv("UPDATE_DB") == "1":
         cls.nvd.get_cvelist_if_stale()
     else:
         print("Skip NVD database updates.")
     # Instantiate a scanner
     cls.scanner = Scanner(cls.nvd)
     # temp dir for tests that require downloads
     cls.tempdir = tempfile.mkdtemp(prefix="cve-bin-tool-")
예제 #4
0
 def setUpClass(cls):
     """ NVD database setup: make temporary directory """
     cls.tempdir = tempfile.mkdtemp(prefix="cve-bin-tool-")
     cls.nvd = NVDSQLite(cls.tempdir)