mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Fixes --profile
This commit is contained in:
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"
|
||||
|
||||
Reference in New Issue
Block a user