File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.4.5.15 "
21+ VERSION = "1.4.5.16 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -238,6 +238,8 @@ def main():
238238 errMsg = getSafeExString (ex )
239239 logger .critical (errMsg )
240240
241+ os ._exitcode = 1
242+
241243 raise SystemExit
242244
243245 except KeyboardInterrupt :
@@ -249,15 +251,17 @@ def main():
249251 errMsg = "exit"
250252 logger .error (errMsg )
251253
252- except SystemExit :
253- pass
254+ except SystemExit as ex :
255+ os . _exitcode = ex . code or 0
254256
255257 except :
256258 print ()
257259 errMsg = unhandledExceptionMessage ()
258260 excMsg = traceback .format_exc ()
259261 valid = checkIntegrity ()
260262
263+ os ._exitcode = 255
264+
261265 if any (_ in excMsg for _ in ("MemoryError" , "Cannot allocate memory" )):
262266 errMsg = "memory exhaustion detected"
263267 logger .critical (errMsg )
You can’t perform that action at this time.
0 commit comments