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

Skip to content

Commit 5b0d597

Browse files
committed
Another patch related to the #1773
1 parent 6c2f985 commit 5b0d597

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
18211821
kb.dnsTest = None
18221822
kb.docRoot = None
18231823
kb.dumpTable = None
1824+
kb.dumpKeyboardInterrupt = False
18241825
kb.dynamicMarkings = []
18251826
kb.dynamicParameter = False
18261827
kb.endDetection = False

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from lib.core.revision import getRevisionNumber
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.0.3.6"
23+
VERSION = "1.0.3.7"
2424
REVISION = getRevisionNumber()
2525
STABLE = VERSION.count('.') <= 2
2626
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

plugins/generic/entries.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def dumpTable(self, foundData=None):
173173
retVal = pivotDumpTable(table, colList, blind=False)
174174
except KeyboardInterrupt:
175175
retVal = None
176+
kb.dumpKeyboardInterrupt = True
176177
clearConsoleLine()
177178
warnMsg = "Ctrl+C detected in dumping phase"
178179
logger.warn(warnMsg)
@@ -279,6 +280,7 @@ def dumpTable(self, foundData=None):
279280
retVal = pivotDumpTable(table, colList, count, blind=True)
280281
except KeyboardInterrupt:
281282
retVal = None
283+
kb.dumpKeyboardInterrupt = True
282284
clearConsoleLine()
283285
warnMsg = "Ctrl+C detected in dumping phase"
284286
logger.warn(warnMsg)
@@ -332,6 +334,7 @@ def dumpTable(self, foundData=None):
332334
entries[column].append(value)
333335

334336
except KeyboardInterrupt:
337+
kb.dumpKeyboardInterrupt = True
335338
clearConsoleLine()
336339
warnMsg = "Ctrl+C detected in dumping phase"
337340
logger.warn(warnMsg)

sqlmap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def main():
192192
logger.error(errMsg)
193193
raise SystemExit
194194

195+
elif "valueStack.pop" in excMsg and kb.get("dumpKeyboardInterrupt"):
196+
raise SystemExit
197+
195198
for match in re.finditer(r'File "(.+?)", line', excMsg):
196199
file_ = match.group(1)
197200
file_ = os.path.relpath(file_, os.path.dirname(__file__))

0 commit comments

Comments
 (0)