mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-05-14 01:16:59 +00:00
Minor patch (proper exit code-ing)
This commit is contained in:
parent
0b93311ef2
commit
01edcbf71d
2 changed files with 7 additions and 3 deletions
|
|
@ -238,6 +238,8 @@ def main():
|
|||
errMsg = getSafeExString(ex)
|
||||
logger.critical(errMsg)
|
||||
|
||||
os._exitcode = 1
|
||||
|
||||
raise SystemExit
|
||||
|
||||
except KeyboardInterrupt:
|
||||
|
|
@ -249,8 +251,8 @@ def main():
|
|||
errMsg = "exit"
|
||||
logger.error(errMsg)
|
||||
|
||||
except SystemExit:
|
||||
pass
|
||||
except SystemExit as ex:
|
||||
os._exitcode = ex.code or 0
|
||||
|
||||
except:
|
||||
print()
|
||||
|
|
@ -258,6 +260,8 @@ def main():
|
|||
excMsg = traceback.format_exc()
|
||||
valid = checkIntegrity()
|
||||
|
||||
os._exitcode = 255
|
||||
|
||||
if any(_ in excMsg for _ in ("MemoryError", "Cannot allocate memory")):
|
||||
errMsg = "memory exhaustion detected"
|
||||
logger.critical(errMsg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue