diff --git a/sqlmap.py b/sqlmap.py index 1fd6f47f7..4a0e1ff5a 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -147,6 +147,13 @@ def main(): logger.error(errMsg) raise SystemExit + elif "bad marshal data (unknown type code)" in excMsg: + match = re.search(r"\s*(.+)\s+ValueError", excMsg) + errMsg = "one of your .pyc files are corrupted%s" % (" ('%s')" % match.group(1) if match else "") + errMsg += ". Please delete .pyc files on your system to fix the problem" + logger.error(errMsg) + raise SystemExit + for match in re.finditer(r'File "(.+?)", line', excMsg): file_ = match.group(1) file_ = os.path.relpath(file_, os.path.dirname(__file__))