From 91f665aaaa85da895f0391162fcfc5f229c40ab9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 31 Dec 2010 15:00:19 +0000 Subject: [PATCH] bug fix for Ctrl+C --- lib/controller/checks.py | 10 +++++----- lib/controller/controller.py | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 36a3270a3..372e5c169 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -412,15 +412,15 @@ def checkSqlInjection(place, parameter, value): if not test or test[0] in ("s", "S"): pass elif test[0] in ("n", "N"): - break + return None elif test[0] in ("e", "E"): kb.endDetection = True - break + return None elif test[0] in ("q", "Q"): raise sqlmapUserQuitException - - # Flush the flag - kb.testMode = False + finally: + # Flush the flag + kb.testMode = False # Return the injection object if injection.place is not None and injection.parameter is not None: diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 72732f934..21349b554 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -311,11 +311,11 @@ def start(): if not conf.paramDict.has_key(place): continue - if not proceed: - break - paramDict = conf.paramDict[place] for parameter, value in paramDict.items(): + if not proceed: + break + testSqlInj = True paramKey = (conf.hostname, conf.path, place, parameter) @@ -369,7 +369,6 @@ def start(): proceed = False paramKey = (conf.hostname, conf.path, None, None) kb.testedParams.add(paramKey) - break else: warnMsg = "%s parameter '%s' is not " % (place, parameter) warnMsg += "injectable"