From 2ad267132a02e51f1e1cd7d59835b2bda57e6360 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 5 Aug 2011 10:55:21 +0000 Subject: [PATCH] minor update for empty normal responses (like AJAX requests) --- lib/controller/checks.py | 4 ++-- lib/core/option.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index d0a0e9c2e..bfd5cc6ef 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -735,7 +735,7 @@ def checkStability(): errMsg += "because of lack of content. please check the " errMsg += "page request results (and probable errors) by " errMsg += "using higher verbosity levels" - raise sqlmapNoneDataException, errMsg + logger.error(errMsg) else: warnMsg = "url is not stable, sqlmap will base the page " @@ -938,7 +938,7 @@ def checkConnection(suppressOutput=False): kb.errorIsNone = False - if not kb.originalPage: + if not kb.originalPage and wasLastRequestHTTPError(): errMsg = "unable to retrieve page content" raise sqlmapConnectionException, errMsg elif wasLastRequestDBMSError(): diff --git a/lib/core/option.py b/lib/core/option.py index e31c0cff4..2cf5b99ba 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1413,6 +1413,8 @@ def __setKnowledgeBaseAttributes(flushAll=True): kb.injection = InjectionDict() kb.injections = [] + kb.lastParserStatus = None + kb.locks = AttribDict() kb.locks.cacheLock = threading.Lock() kb.locks.logLock = threading.Lock()