mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
minor check added for invalid urls (e.g. deliberately too long)
This commit is contained in:
@@ -1248,7 +1248,12 @@ def parseTargetUrl():
|
||||
conf.path = __urlSplit[2].strip()
|
||||
conf.hostname = __hostnamePort[0].strip()
|
||||
|
||||
if any((re.search(r'\s', conf.hostname), '..' in conf.hostname, conf.hostname.startswith('.'))):
|
||||
try:
|
||||
_ = conf.hostname.encode("idna")
|
||||
except UnicodeError:
|
||||
_ = None
|
||||
|
||||
if any((_ is None, re.search(r'\s', conf.hostname), '..' in conf.hostname, conf.hostname.startswith('.'))):
|
||||
errMsg = "invalid target url"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user