mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-11 00:23:15 +03:00
minor refactoring
This commit is contained in:
parent
930262f573
commit
8426d48e2e
|
@ -260,9 +260,6 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
||||||
if len(splitValue) > 1:
|
if len(splitValue) > 1:
|
||||||
port = filterStringValue(splitValue[1], '[0-9]')
|
port = filterStringValue(splitValue[1], '[0-9]')
|
||||||
|
|
||||||
if not scheme and port == "443":
|
|
||||||
scheme = "https"
|
|
||||||
|
|
||||||
# Avoid to add a static content length header to
|
# Avoid to add a static content length header to
|
||||||
# conf.httpHeaders and consider the following lines as
|
# conf.httpHeaders and consider the following lines as
|
||||||
# POSTed data
|
# POSTed data
|
||||||
|
@ -277,8 +274,10 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
||||||
getPostReq &= re.search(conf.scope, host) is not None
|
getPostReq &= re.search(conf.scope, host) is not None
|
||||||
|
|
||||||
if getPostReq and (params or cookie):
|
if getPostReq and (params or cookie):
|
||||||
if not port and scheme == "https":
|
if not port and isinstance(scheme, basestring) and scheme.lower() == "https":
|
||||||
port = "443"
|
port = "443"
|
||||||
|
elif not scheme and port == "443":
|
||||||
|
scheme = "https"
|
||||||
|
|
||||||
if not url.startswith("http"):
|
if not url.startswith("http"):
|
||||||
url = "%s://%s:%s%s" % (scheme or "http", host, port or "80", url)
|
url = "%s://%s:%s%s" % (scheme or "http", host, port or "80", url)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user