From 92e4cdb24122fd0a75d210feee4274d7d8b1926f Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 3 Jan 2011 14:21:41 +0000 Subject: [PATCH] raising critical when google detects strange traffic and also removing obsolete sqlmapSiteTooDynamic --- lib/controller/checks.py | 1 - lib/core/exception.py | 4 ---- lib/utils/google.py | 6 ++++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index ee2b83552..66cd63f10 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -45,7 +45,6 @@ from lib.core.enums import PLACE from lib.core.exception import sqlmapConnectionException from lib.core.exception import sqlmapGenericException from lib.core.exception import sqlmapNoneDataException -from lib.core.exception import sqlmapSiteTooDynamic from lib.core.exception import sqlmapUserQuitException from lib.core.session import setDynamicMarkings from lib.core.session import setString diff --git a/lib/core/exception.py b/lib/core/exception.py index 8006d4562..83eaa8b31 100644 --- a/lib/core/exception.py +++ b/lib/core/exception.py @@ -50,9 +50,6 @@ class sqlmapUserQuitException(Exception): class sqlmapRegExprException(Exception): pass -class sqlmapSiteTooDynamic(Exception): - pass - class sqlmapSyntaxException(Exception): pass @@ -93,7 +90,6 @@ exceptionsTuple = ( sqlmapMissingMandatoryOptionException, sqlmapNoneDataException, sqlmapRegExprException, - sqlmapSiteTooDynamic, sqlmapSyntaxException, sqlmapUndefinedMethod, sqlmapMissingPrivileges, diff --git a/lib/utils/google.py b/lib/utils/google.py index 2d6fe2e41..207bc32c1 100644 --- a/lib/utils/google.py +++ b/lib/utils/google.py @@ -20,6 +20,7 @@ from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger from lib.core.exception import sqlmapConnectionException +from lib.core.exception import sqlmapGenericException from lib.request.basic import decodePage class Google: @@ -128,5 +129,10 @@ class Google: raise sqlmapConnectionException, errMsg self.__matches = self.__parsePage(page) + + if not self.__matches and "detected unusual traffic" in page: + warnMsg = "Google has detected 'unusual' traffic from " + warnMsg += "this computer disabling further searches" + raise sqlmapGenericException, warnMsg return self.__matches