mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Implementation for an Issue #117
This commit is contained in:
parent
3279ce53a8
commit
a7d1a0c250
|
@ -70,9 +70,12 @@ UNION_STDEV_COEFF = 7
|
|||
# length of queue for candidates for time delay adjustment
|
||||
TIME_DELAY_CANDIDATES = 3
|
||||
|
||||
# standard value for HTTP Accept header
|
||||
# default value for HTTP Accept header
|
||||
HTTP_ACCEPT_HEADER_VALUE = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
||||
|
||||
# default value for HTTP Accept-Encoding header
|
||||
HTTP_ACCEPT_ENCODING_HEADER_VALUE = "gzip,deflate"
|
||||
|
||||
# HTTP timeout in silent mode
|
||||
HTTP_SILENT_TIMEOUT = 3
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ from lib.core.exception import sqlmapConnectionException
|
|||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
|
||||
from lib.core.settings import HTTP_ACCEPT_HEADER_VALUE
|
||||
from lib.core.settings import HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||
from lib.core.settings import HTTP_SILENT_TIMEOUT
|
||||
from lib.core.settings import MAX_CONNECTION_CHUNK_SIZE
|
||||
from lib.core.settings import META_REFRESH_REGEX
|
||||
|
@ -267,6 +268,7 @@ class Connect:
|
|||
headers[HTTPHEADER.PROXY_AUTHORIZATION] = kb.proxyAuthHeader
|
||||
|
||||
headers[HTTPHEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
|
||||
headers[HTTPHEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||
|
||||
headers[HTTPHEADER.HOST] = host or getHostHeader(url)
|
||||
|
||||
|
@ -286,9 +288,6 @@ class Connect:
|
|||
else:
|
||||
req = urllib2.Request(url, post, headers)
|
||||
|
||||
if not req.has_header(HTTPHEADER.ACCEPT_ENCODING):
|
||||
requestHeaders += "%s: identity\n" % HTTPHEADER.ACCEPT_ENCODING
|
||||
|
||||
requestHeaders += "\n".join("%s: %s" % (key.capitalize() if isinstance(key, basestring) else key, getUnicode(value)) for (key, value) in req.header_items())
|
||||
|
||||
if not req.has_header(HTTPHEADER.COOKIE) and conf.cj:
|
||||
|
|
Loading…
Reference in New Issue
Block a user