mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-12-01 14:03:52 +03:00
minor update related to the problem with request files reported by jorge_a_santos@hotmail.com
This commit is contained in:
parent
60102209f6
commit
de4e0c7346
|
@ -27,6 +27,7 @@ from extra.xmlobject import xmlobject
|
||||||
from lib.controller.checks import checkConnection
|
from lib.controller.checks import checkConnection
|
||||||
from lib.core.common import Backend
|
from lib.core.common import Backend
|
||||||
from lib.core.common import extractRegexResult
|
from lib.core.common import extractRegexResult
|
||||||
|
from lib.core.common import filterStringValue
|
||||||
from lib.core.common import getConsoleWidth
|
from lib.core.common import getConsoleWidth
|
||||||
from lib.core.common import getFileItems
|
from lib.core.common import getFileItems
|
||||||
from lib.core.common import getFileType
|
from lib.core.common import getFileType
|
||||||
|
@ -249,11 +250,13 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
||||||
if key.lower() == "cookie":
|
if key.lower() == "cookie":
|
||||||
cookie = value
|
cookie = value
|
||||||
elif key.lower() == "host":
|
elif key.lower() == "host":
|
||||||
|
if '://' in value:
|
||||||
|
scheme, value = value.split('://')[:2]
|
||||||
splitValue = value.split(":")
|
splitValue = value.split(":")
|
||||||
host = splitValue[0]
|
host = splitValue[0]
|
||||||
|
|
||||||
if len(splitValue) > 1:
|
if len(splitValue) > 1:
|
||||||
port = splitValue[1]
|
port = filterStringValue(splitValue[1], '[0-9]')
|
||||||
|
|
||||||
if not scheme and port == "443":
|
if not scheme and port == "443":
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
|
@ -262,7 +265,6 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
||||||
# conf.httpHeaders and consider the following lines as
|
# conf.httpHeaders and consider the following lines as
|
||||||
# POSTed data
|
# POSTed data
|
||||||
if key == "Content-Length":
|
if key == "Content-Length":
|
||||||
data = ""
|
|
||||||
params = True
|
params = True
|
||||||
|
|
||||||
# Avoid proxy and connection type related headers
|
# Avoid proxy and connection type related headers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user