mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
Minor patch
This commit is contained in:
parent
efd5e2b62b
commit
772eaa2aee
4 changed files with 17 additions and 9 deletions
|
|
@ -120,7 +120,7 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
|
|||
if isinstance(seqMatcher.a, six.binary_type) and isinstance(page, six.text_type):
|
||||
page = getBytes(page, kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
|
||||
elif isinstance(seqMatcher.a, six.text_type) and isinstance(page, six.binary_type):
|
||||
seqMatcher.a = getBytes(seqMatcher.a, kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
|
||||
seqMatcher.set_seq1(getBytes(seqMatcher.a, kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore"))
|
||||
|
||||
if any(_ is None for _ in (page, seqMatcher.a)):
|
||||
return None
|
||||
|
|
@ -146,12 +146,19 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
|
|||
if seq1 is None or seq2 is None:
|
||||
return None
|
||||
|
||||
seq1 = seq1.replace(REFLECTED_VALUE_MARKER, "")
|
||||
seq2 = seq2.replace(REFLECTED_VALUE_MARKER, "")
|
||||
if isinstance(seq1, six.binary_type):
|
||||
seq1 = seq1.replace(REFLECTED_VALUE_MARKER.encode(), b"")
|
||||
elif isinstance(seq1, six.text_type):
|
||||
seq1 = seq1.replace(REFLECTED_VALUE_MARKER, "")
|
||||
|
||||
if isinstance(seq2, six.binary_type):
|
||||
seq2 = seq2.replace(REFLECTED_VALUE_MARKER.encode(), b"")
|
||||
elif isinstance(seq2, six.text_type):
|
||||
seq2 = seq2.replace(REFLECTED_VALUE_MARKER, "")
|
||||
|
||||
if kb.heavilyDynamic:
|
||||
seq1 = seq1.split("\n")
|
||||
seq2 = seq2.split("\n")
|
||||
seq1 = seq1.split("\n" if isinstance(seq1, six.text_type) else b"\n")
|
||||
seq2 = seq2.split("\n" if isinstance(seq2, six.text_type) else b"\n")
|
||||
|
||||
key = None
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue