Ejemplo n.º 1
0
 def verify (self):
     print "Verifying %s" % self.package_uri
     self.file_name = self.package_uri.split ("/")[-1]
     self.file_name_full = os.path.abspath (self.file_name)
     print self.file_name
     try:
         dloader.download_file (self.package_uri)
         self.sha256sum = dloader.get_sha256sum(self.file_name)
     except Exception, e:
         print e
         return False
Ejemplo n.º 2
0
 def check_installation(self):
     if not os.path.exists(self.db_file):
         # Do nothing
         try:
             cwd = os.getcwd()
             dirname = os.path.dirname(self.db_file)
             os.chdir(os.path.dirname(self.db_file))
             download_file(NVDCVE_DB)
             shutil.move(os.path.join(dirname, "nvdcve-2.0-modified.xml"),
                         "nvdcve_db.xml")
             os.chdir(cwd)
         except Exception, e:
             print e
Ejemplo n.º 3
0
 def check_installation(self):
     if not os.path.exists(self.db_file):
         # Do nothing
         try:
             cwd = os.getcwd()
             dirname = os.path.dirname(self.db_file)
             os.chdir(os.path.dirname(self.db_file))
             download_file(NVDCVE_DB)
             shutil.move(os.path.join(dirname, "nvdcve-2.0-modified.xml"),
                         "nvdcve_db.xml")
             os.chdir(cwd)
         except Exception, e:
             print e