This commit is contained in:
Miroslav Stampar
2016-06-10 18:18:48 +02:00
parent 8ca45c5678
commit 041213f22d
2 changed files with 5 additions and 1 deletions

View File

@@ -1398,6 +1398,10 @@ def parseTargetUrl():
else:
conf.port = 80
if conf.port < 0 or conf.port > 65535:
errMsg = "invalid target URL's port (%d)" % conf.port
raise SqlmapSyntaxException(errMsg)
conf.url = getUnicode("%s://%s:%d%s" % (conf.scheme, ("[%s]" % conf.hostname) if conf.ipv6 else conf.hostname, conf.port, conf.path))
conf.url = conf.url.replace(URI_QUESTION_MARKER, '?')