Skip to content

Commit 08d733c

Browse files
committed
Fixes #1709
1 parent 4ee0495 commit 08d733c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

sqlmap.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import re
1313
import shutil
1414
import sys
15+
import thread
1516
import time
1617
import traceback
1718
import warnings
@@ -109,7 +110,15 @@ def main():
109110
elif conf.liveTest:
110111
liveTest()
111112
else:
112-
start()
113+
try:
114+
start()
115+
except thread.error as ex:
116+
if "can't start new thread" in getSafeExString(ex):
117+
errMsg = "unable to start new threads. Please check OS (u)limits"
118+
logger.critical(errMsg)
119+
raise SystemExit
120+
else:
121+
raise
113122

114123
except SqlmapUserQuitException:
115124
errMsg = "user quit"
@@ -130,7 +139,6 @@ def main():
130139
logger.critical(errMsg)
131140
except KeyboardInterrupt:
132141
pass
133-
134142
raise SystemExit
135143

136144
except KeyboardInterrupt:

0 commit comments

Comments
 (0)