From 6c2f9859bee9e43a565f73fd091cedb6239e5993 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 23 Mar 2016 10:26:22 +0100 Subject: [PATCH] Potential patch for #1773 --- lib/core/settings.py | 2 +- plugins/generic/entries.py | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 4f939e27b..36ee4ff0e 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.3.5" +VERSION = "1.0.3.6" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev") diff --git a/plugins/generic/entries.py b/plugins/generic/entries.py index 86e088ef3..51f793bf4 100644 --- a/plugins/generic/entries.py +++ b/plugins/generic/entries.py @@ -169,7 +169,13 @@ class Entries: if not (isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and kb.injection.data[PAYLOAD.TECHNIQUE.UNION].where == PAYLOAD.WHERE.ORIGINAL): table = "%s.%s" % (conf.db, tbl) - retVal = pivotDumpTable(table, colList, blind=False) + try: + retVal = pivotDumpTable(table, colList, blind=False) + except KeyboardInterrupt: + retVal = None + clearConsoleLine() + warnMsg = "Ctrl+C detected in dumping phase" + logger.warn(warnMsg) if retVal: entries, _ = retVal @@ -269,7 +275,13 @@ class Entries: elif Backend.isDbms(DBMS.MAXDB): table = "%s.%s" % (conf.db, tbl) - retVal = pivotDumpTable(table, colList, count, blind=True) + try: + retVal = pivotDumpTable(table, colList, count, blind=True) + except KeyboardInterrupt: + retVal = None + clearConsoleLine() + warnMsg = "Ctrl+C detected in dumping phase" + logger.warn(warnMsg) if retVal: entries, lengths = retVal