@@ -1277,6 +1277,7 @@ def setPaths(rootPath):
12771277 paths .SQLMAP_EXTRAS_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "extra" )
12781278 paths .SQLMAP_PROCS_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "procs" )
12791279 paths .SQLMAP_SHELL_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "shell" )
1280+ paths .SQLMAP_SETTINGS_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "lib" , "core" , "settings.py" )
12801281 paths .SQLMAP_TAMPER_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "tamper" )
12811282 paths .SQLMAP_WAF_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "waf" )
12821283 paths .SQLMAP_TXT_PATH = os .path .join (paths .SQLMAP_ROOT_PATH , "txt" )
@@ -1308,7 +1309,6 @@ def setPaths(rootPath):
13081309 paths .GITHUB_HISTORY = os .path .join (paths .SQLMAP_HISTORY_PATH , "github.hst" )
13091310
13101311 # sqlmap files
1311- paths .CHECKSUM_MD5 = os .path .join (paths .SQLMAP_TXT_PATH , "checksum.md5" )
13121312 paths .COMMON_COLUMNS = os .path .join (paths .SQLMAP_TXT_PATH , "common-columns.txt" )
13131313 paths .COMMON_TABLES = os .path .join (paths .SQLMAP_TXT_PATH , "common-tables.txt" )
13141314 paths .COMMON_OUTPUTS = os .path .join (paths .SQLMAP_TXT_PATH , 'common-outputs.txt' )
@@ -1327,7 +1327,7 @@ def setPaths(rootPath):
13271327 paths .PGSQL_XML = os .path .join (paths .SQLMAP_XML_BANNER_PATH , "postgresql.xml" )
13281328
13291329 for path in paths .values ():
1330- if any (path .endswith (_ ) for _ in (".md5" , ". txt" , ".xml" , ".zip" )):
1330+ if any (path .endswith (_ ) for _ in (".txt" , ".xml" , ".zip" )):
13311331 checkFile (path )
13321332
13331333def weAreFrozen ():
@@ -3394,15 +3394,14 @@ def checkIntegrity():
33943394
33953395 retVal = True
33963396
3397- if os .path .isfile (paths .CHECKSUM_MD5 ):
3398- for checksum , _ in (re .split (r'\s+' , _ ) for _ in getFileItems (paths .CHECKSUM_MD5 )):
3399- path = os .path .normpath (os .path .join (paths .SQLMAP_ROOT_PATH , _ ))
3400- if not os .path .isfile (path ):
3401- logger .error ("missing file detected '%s'" % path )
3402- retVal = False
3403- elif md5File (path ) != checksum :
3404- logger .error ("wrong checksum of file '%s' detected" % path )
3405- retVal = False
3397+ baseTime = os .path .getmtime (paths .SQLMAP_SETTINGS_PATH )
3398+ for root , dirnames , filenames in os .walk (paths .SQLMAP_ROOT_PATH ):
3399+ for filename in filenames :
3400+ if re .search (r"(\.py|\.xml|_)\Z" , filename ):
3401+ filepath = os .path .join (root , filename )
3402+ if os .path .getmtime (filepath ) > baseTime :
3403+ logger .error ("wrong modification time of '%s'" % filepath )
3404+ retVal = False
34063405
34073406 return retVal
34083407
0 commit comments