mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-07-11 19:13:12 +00:00
Fixes --profile
This commit is contained in:
parent
2b55ae3e2a
commit
e5968cae31
4 changed files with 35 additions and 28 deletions
28
sqlmap.py
28
sqlmap.py
|
|
@ -143,10 +143,7 @@ def main():
|
|||
|
||||
if not conf.updateAll:
|
||||
# Postponed imports (faster start)
|
||||
if conf.profile:
|
||||
from lib.core.profiling import profile
|
||||
profile()
|
||||
elif conf.smokeTest:
|
||||
if conf.smokeTest:
|
||||
from lib.core.testing import smokeTest
|
||||
smokeTest()
|
||||
elif conf.liveTest:
|
||||
|
|
@ -154,15 +151,20 @@ def main():
|
|||
liveTest()
|
||||
else:
|
||||
from lib.controller.controller import 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
|
||||
if conf.profile:
|
||||
from lib.core.profiling import profile
|
||||
globals()["start"] = start
|
||||
profile()
|
||||
else:
|
||||
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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue