From 1f3a5b4d70cc57eaa56805d5bc7c89d755a65bf1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 19 Nov 2019 11:56:01 +0100 Subject: [PATCH] Fixes #4016 --- lib/core/option.py | 6 +++++- lib/core/settings.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 3704f2733..526693768 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -98,6 +98,7 @@ from lib.core.exception import SqlmapSyntaxException from lib.core.exception import SqlmapSystemException from lib.core.exception import SqlmapUnsupportedDBMSException from lib.core.exception import SqlmapUserQuitException +from lib.core.exception import SqlmapValueException from lib.core.log import FORMATTER from lib.core.optiondict import optDict from lib.core.settings import CODECS_LIST_PAGE @@ -1418,7 +1419,10 @@ def _setHTTPTimeout(): else: conf.timeout = 30.0 - socket.setdefaulttimeout(conf.timeout) + try: + socket.setdefaulttimeout(conf.timeout) + except OverflowError as ex: + raise SqlmapValueException("invalid value used for option '--timeout' ('%s')" % getSafeExString(ex)) def _checkDependencies(): """ diff --git a/lib/core/settings.py b/lib/core/settings.py index 63398835d..c0d6a759b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.11.80" +VERSION = "1.3.11.81" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)