Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4687383

Browse files
committed
Patch for multiple-Ctrl-C in multiple-target mode
1 parent 62cfd47 commit 4687383

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/controller/controller.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,12 @@ def start():
704704
action()
705705

706706
except KeyboardInterrupt:
707+
if kb.lastCtrlCTime and (time.time() - kb.lastCtrlCTime < 1):
708+
kb.multipleCtrlC = True
709+
raise SqlmapUserQuitException("user aborted (Ctrl+C was pressed multiple times)")
710+
711+
kb.lastCtrlCTime = time.time()
712+
707713
if conf.multipleTargets:
708714
warnMsg = "user aborted in multiple target mode"
709715
logger.warn(warnMsg)

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,6 @@ def _setKnowledgeBaseAttributes(flushAll=True):
20402040
kb.injections = []
20412041
kb.laggingChecked = False
20422042
kb.lastParserStatus = None
2043-
kb.lastCtrlCTime = None
20442043

20452044
kb.locks = AttribDict()
20462045
for _ in ("cache", "connError", "count", "handlers", "hint", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
@@ -2129,6 +2128,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
21292128
kb.checkSitemap = None
21302129
kb.headerPaths = {}
21312130
kb.keywords = set(getFileItems(paths.SQL_KEYWORDS))
2131+
kb.lastCtrlCTime = None
21322132
kb.normalizeCrawlingChoice = None
21332133
kb.passwordMgr = None
21342134
kb.postprocessFunctions = []

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.10.7"
21+
VERSION = "1.4.10.8"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)