From 3f8eadf4fe690c7273231e0b2de94c2d7eee0a2c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 22 Feb 2011 13:00:58 +0000 Subject: [PATCH] minor refactoring --- lib/core/settings.py | 3 +++ lib/request/connect.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index d73cdea4b..e3da391bf 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -74,6 +74,9 @@ TIME_DELAY_CANDIDATES = 3 # default time delay in seconds TIME_DEFAULT_DELAY = 5 +# HTTP timeout in silent mode +HTTP_SILENT_TIMEOUT = 3 + # maximum number of techniques used in inject.py/getValue() per one value MAX_TECHNIQUES_PER_VALUE = 2 diff --git a/lib/request/connect.py b/lib/request/connect.py index e5c5941ee..223047a31 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -40,6 +40,7 @@ from lib.core.enums import NULLCONNECTION from lib.core.enums import PLACE from lib.core.exception import sqlmapConnectionException from lib.core.exception import sqlmapSyntaxException +from lib.core.settings import HTTP_SILENT_TIMEOUT from lib.core.settings import MIN_TIME_RESPONSES from lib.core.settings import URI_HTTP_HEADER from lib.core.threads import getCurrentThreadData @@ -102,7 +103,7 @@ class Connect: try: if silent: - socket.setdefaulttimeout(3) + socket.setdefaulttimeout(HTTP_SILENT_TIMEOUT) if direct: if "?" in url: