mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-17 05:07:28 +08:00
Minor patches
This commit is contained in:
@@ -67,7 +67,7 @@ def comparison(page, headers, code=None, getRatioValue=False, pageLength=None):
|
||||
return _
|
||||
|
||||
def _adjust(condition, getRatioValue):
|
||||
if not any((conf.string, conf.notString, conf.regexp, conf.code)):
|
||||
if not any((conf.string, conf.notString, conf.regexp, conf.code, conf.lengths)):
|
||||
# Negative logic approach is used in raw page comparison scheme as that what is "different" than original
|
||||
# PAYLOAD.WHERE.NEGATIVE response is considered as True; in switch based approach negative logic is not
|
||||
# applied as that what is by user considered as True is that what is returned by the comparison mechanism
|
||||
|
||||
@@ -406,7 +406,8 @@ class Connect(object):
|
||||
errMsg = "problem occurred while loading cookies from file '%s'" % conf.liveCookies
|
||||
raise SqlmapValueException(errMsg)
|
||||
|
||||
cookie = openFile(conf.liveCookies).read().strip()
|
||||
with openFile(conf.liveCookies) as f:
|
||||
cookie = f.read().strip()
|
||||
cookie = re.sub(r"(?i)\ACookie:\s*", "", cookie)
|
||||
|
||||
if multipart:
|
||||
@@ -545,7 +546,8 @@ class Connect(object):
|
||||
headers = forgeHeaders(auxHeaders, headers)
|
||||
|
||||
if kb.headersFile:
|
||||
content = openFile(kb.headersFile, 'r').read()
|
||||
with openFile(kb.headersFile, 'r') as f:
|
||||
content = f.read()
|
||||
for line in content.split("\n"):
|
||||
line = getText(line.strip())
|
||||
if ':' in line:
|
||||
|
||||
Reference in New Issue
Block a user