Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d1e1ea

Browse files
committed
Patch for an Issue #1532
1 parent d772e7e commit 8d1e1ea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sqlmap.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ def main():
147147
logger.error(errMsg)
148148
raise SystemExit
149149

150+
elif "bad marshal data (unknown type code)" in excMsg:
151+
match = re.search(r"\s*(.+)\s+ValueError", excMsg)
152+
errMsg = "one of your .pyc files are corrupted%s" % (" ('%s')" % match.group(1) if match else "")
153+
errMsg += ". Please delete .pyc files on your system to fix the problem"
154+
logger.error(errMsg)
155+
raise SystemExit
156+
150157
for match in re.finditer(r'File "(.+?)", line', excMsg):
151158
file_ = match.group(1)
152159
file_ = os.path.relpath(file_, os.path.dirname(__file__))

0 commit comments

Comments
 (0)