diff --git a/sqlmap.py b/sqlmap.py index 9d76134c3..a1a38d7ae 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -12,6 +12,7 @@ import os import re import shutil import sys +import thread import time import traceback import warnings @@ -109,7 +110,15 @@ def main(): elif conf.liveTest: liveTest() else: - start() + try: + start() + except thread.error as ex: + if "can't start new thread" in getSafeExString(ex): + errMsg = "unable to start new threads. Please check OS (u)limits" + logger.critical(errMsg) + raise SystemExit + else: + raise except SqlmapUserQuitException: errMsg = "user quit" @@ -130,7 +139,6 @@ def main(): logger.critical(errMsg) except KeyboardInterrupt: pass - raise SystemExit except KeyboardInterrupt: