From 32bf2dbe6d0e0acbe2006040089ccb3aeefae366 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 23 Jan 2015 23:00:28 +0100 Subject: [PATCH] Patch for an Issue #1133 --- lib/core/option.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index d6eed56c4..2a4d2c49f 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -2273,8 +2273,8 @@ def _basicOptionValidation(): errMsg = "switch '--check-tor' requires usage of switch '--tor' (or option '--proxy' with HTTP proxy address using Tor)" raise SqlmapSyntaxException(errMsg) - if conf.torPort is not None and not (isinstance(conf.torPort, int) and conf.torPort > 0): - errMsg = "value for option '--tor-port' must be a positive integer" + if conf.torPort is not None and not (isinstance(conf.torPort, int) and conf.torPort >= 0 and conf.torPort <= 65535): + errMsg = "value for option '--tor-port' must be in range 0-65535" raise SqlmapSyntaxException(errMsg) if conf.torType not in getPublicTypeMembers(PROXY_TYPE, True):