minor update of parseTargetUrl method

This commit is contained in:
Miroslav Stampar 2011-01-24 14:52:50 +00:00
parent ceca64193b
commit 81011be0d7

View File

@ -684,9 +684,13 @@ def parseTargetUrl():
__urlSplit = urlparse.urlsplit(conf.url)
__hostnamePort = __urlSplit[1].split(":")
conf.scheme = __urlSplit[0]
conf.path = __urlSplit[2]
conf.hostname = __hostnamePort[0]
conf.scheme = __urlSplit[0].strip()
conf.path = __urlSplit[2].strip()
conf.hostname = __hostnamePort[0].strip()
if re.search(r'\s', conf.hostname):
errMsg = "invalid target url"
raise sqlmapSyntaxException, errMsg
if len(__hostnamePort) == 2:
try: