mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
minor check added for invalid urls (e.g. deliberately too long)
This commit is contained in:
parent
164c8a4020
commit
a675c88894
|
@ -1248,7 +1248,12 @@ def parseTargetUrl():
|
||||||
conf.path = __urlSplit[2].strip()
|
conf.path = __urlSplit[2].strip()
|
||||||
conf.hostname = __hostnamePort[0].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"
|
errMsg = "invalid target url"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user