def checkIntegrity():
 logger.debug('running code integrity check')
 retVal = True
 for (checksum, _) in (re.split('\\s+', _) for _ in getFileItems(paths.CHECKSUM_MD5)):
  path = os.path.normpath(os.path.join(paths.SQLMAP_ROOT_PATH, _))
  if (not os.path.isfile(path)):
   logger.error(("missing file detected '%s'" % path))
   retVal = False
  elif (hashlib.md5(open(path, 'rb').read()).hexdigest() != checksum):
   logger.error(("wrong checksum of file '%s' detected" % path))
   retVal = False
 return retVal

def checkIntegrity ( ) : logger . debug ( 'running code integrity check' ) retVal = True for ( checksum , _ ) in ( re . split ( '\\s+' , _ ) for _ in getFileItems ( paths . CHECKSUM_MD5 ) ) : path = os . path . normpath ( os . path . join ( paths . SQLMAP_ROOT_PATH , _ ) ) if ( not os . path . isfile ( path ) ) : logger . error ( ( "missing file detected '%s'" % path ) ) retVal = False elif ( hashlib . md5 ( open ( path , 'rb' ) . read ( ) ) . hexdigest ( ) != checksum ) : logger . error ( ( "wrong checksum of file '%s' detected" % path ) ) retVal = False return retVal
checks integrity of code files during the unhandled exceptions .