From 12ede1e5deb223692cc7e995b03666c1ee92f3b8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 22 Feb 2011 13:18:47 +0000 Subject: [PATCH] minor JIC (just-in-case) update --- lib/request/comparison.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/request/comparison.py b/lib/request/comparison.py index 08ce9d472..39ddfc8db 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -18,6 +18,7 @@ from lib.core.common import wasLastRequestHTTPError from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger +from lib.core.exception import sqlmapNoneDataException from lib.core.settings import CONSTANT_RATIO from lib.core.settings import DIFF_TOLERANCE from lib.core.settings import MIN_RATIO @@ -59,6 +60,12 @@ def comparison(page, getRatioValue=False, pageLength=None): pageLength = len(page) if kb.nullConnection and pageLength: + if not seqMatcher.a: + errMsg = "problem occured while retrieving original page content " + errMsg += "which prevents sqlmap from continuation. please rerun, " + errMsg += "and if problem persists please turn off optimization switches" + raise sqlmapNoneDataException, errMsg + ratio = 1. * pageLength / len(seqMatcher.a) if ratio > 1.: