Skip to content

Commit 8cef17b

Browse files
committed
Minor just in case patch (error set in case of --string)
1 parent cb1b5d3 commit 8cef17b

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

lib/controller/checks.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,13 @@ def genCmpPayload():
508508
trueSet = set(getFilteredPageContent(truePage, True, "\n").split("\n"))
509509
falseSet = set(getFilteredPageContent(falsePage, True, "\n").split("\n"))
510510

511+
if threadData.lastErrorPage and threadData.lastErrorPage[1]:
512+
errorSet = set(getFilteredPageContent(threadData.lastErrorPage[1], True, "\n").split("\n"))
513+
else:
514+
errorSet = set()
515+
511516
if originalSet == trueSet != falseSet:
512-
candidates = trueSet - falseSet
517+
candidates = trueSet - falseSet - errorSet
513518

514519
if candidates:
515520
candidates = sorted(candidates, key=lambda _: len(_))
@@ -537,7 +542,13 @@ def genCmpPayload():
537542
falseSet = set(extractTextTagContent(falseRawResponse))
538543
falseSet = falseSet.union(__ for _ in falseSet for __ in _.split())
539544

540-
candidates = filter(None, (_.strip() if _.strip() in trueRawResponse and _.strip() not in falseRawResponse else None for _ in (trueSet - falseSet)))
545+
if threadData.lastErrorPage and threadData.lastErrorPage[1]:
546+
errorSet = set(extractTextTagContent(threadData.lastErrorPage[1]))
547+
errorSet = errorSet.union(__ for _ in errorSet for __ in _.split())
548+
else:
549+
errorSet = set()
550+
551+
candidates = filter(None, (_.strip() if _.strip() in trueRawResponse and _.strip() not in falseRawResponse else None for _ in (trueSet - falseSet - errorSet)))
541552

542553
if candidates:
543554
candidates = sorted(candidates, key=lambda _: len(_))

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.12.13"
22+
VERSION = "1.1.12.14"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/comparison.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
106106
# Preventing "Unicode equal comparison failed to convert both arguments to Unicode"
107107
# (e.g. if one page is PDF and the other is HTML)
108108
if isinstance(seqMatcher.a, str) and isinstance(page, unicode):
109-
page = page.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, 'ignore')
109+
page = page.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
110110
elif isinstance(seqMatcher.a, unicode) and isinstance(page, str):
111-
seqMatcher.a = seqMatcher.a.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, 'ignore')
111+
seqMatcher.a = seqMatcher.a.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
112112

113113
if seqMatcher.a and page and seqMatcher.a == page:
114114
ratio = 1

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ f96467fc5cd1d87f52dd7966c8ae6e79 extra/shutils/regressiontest.py
2121
5fb9aaf874daa47ea2b672a22740e56b extra/sqlharvest/__init__.py
2222
1fc7772edce5a01c31f3932b2fc4c1c6 extra/sqlharvest/sqlharvest.py
2323
21bf2b3a7a22b8cd5d96a6457a1b4997 lib/controller/action.py
24-
c0c9a87e5829c76efc69067081edb8b1 lib/controller/checks.py
24+
8c18f767d400a442f97c72c7d613f200 lib/controller/checks.py
2525
2db2666dba713c710d248a62b2c1c1fe lib/controller/controller.py
2626
d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py
2727
5fb9aaf874daa47ea2b672a22740e56b lib/controller/__init__.py
@@ -46,7 +46,7 @@ f872699e948d0692ce11b54781da814c lib/core/log.py
4646
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
4747
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
4848
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
49-
e4e0634721ad8f7ad97e32519451e5f9 lib/core/settings.py
49+
750dca60518fcc1f37df050b0d97c59a lib/core/settings.py
5050
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
5151
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
5252
d93501771b41315f9fb949305b6ed257 lib/core/target.py
@@ -67,7 +67,7 @@ d8d9bcf9e7107a5e2cf2dd10f115ac28 lib/parse/payloads.py
6767
2b87577dc6d3609e96fc1e049def5b4f lib/parse/sitemap.py
6868
d2f13a0e2fef5273d419d06e516122e1 lib/request/basicauthhandler.py
6969
4f8b3d682093fc577592e85999400149 lib/request/basic.py
70-
28348595147a731677c8bef470c6f57a lib/request/comparison.py
70+
e0da70f14e9bff8288f14d903cfafb36 lib/request/comparison.py
7171
ae823462aad7cd1081e6609192ba3109 lib/request/connect.py
7272
ad6f76839408d827abfcdc57813f8518 lib/request/direct.py
7373
4853bd0d523646315607a6a9a4c0b745 lib/request/dns.py

0 commit comments

Comments
 (0)