Skip to content

Commit 12594c2

Browse files
committed
Nobody is reporting comparison bug, thus, changing behavior
1 parent 52e83cd commit 12594c2

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
187187
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
188188
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
189189
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
190-
b63ca0a001ddca7f8b0c29046e1c79d0d394fb4026c24321d7dd8d530f19dd91 lib/core/settings.py
190+
a7498d5d6e0e51b8a8458c85dee52c20aeb815412f65dca979001ff7d78354b1 lib/core/settings.py
191191
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
192192
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
193193
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
@@ -209,7 +209,7 @@ d7082e4a5937f65cbb4862701bad7d4fbc096a826621ba7eab92e52e48ebd6d7 lib/parse/site
209209
0f52f3c1d1f1322a91c98955bd8dc3be80964d8b3421d453a0e73a523c9cfcbf lib/request/basicauthhandler.py
210210
48bdb0f5f05ece57e6e681801f7ed765739ebe537f9fa5a0465332d4f3f91c06 lib/request/basic.py
211211
fdb4a9f2ca9d01480c3eb115f6fdf8d89f8ff0506c56a223421b395481527670 lib/request/chunkedhandler.py
212-
bb8a06257d170b268c66dcbd3c0fbe013de52eed1e63bb68caa112af5b9f8ca9 lib/request/comparison.py
212+
c56a2c170507861403e0ddebd68a111bcf3a5f5fddc7334a9de4ecd572fdcc2f lib/request/comparison.py
213213
cfa172dbc459a3250db7fbaadb62b282b62d56b4f290c585d3abec01597fcd40 lib/request/connect.py
214214
a890be5dee3fb4f5cb8b5f35984017a5c172d587722cf0c690bf50e338deebfa lib/request/direct.py
215215
a53fa3513431330ce1725a90e7e3d20f223e14605d699e1f66b41625f04439c7 lib/request/dns.py

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.9.7.5"
22+
VERSION = "1.9.7.6"
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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
from lib.core.data import kb
2222
from lib.core.data import logger
2323
from lib.core.exception import SqlmapNoneDataException
24-
from lib.core.exception import SqlmapSilentQuitException
2524
from lib.core.settings import DEFAULT_PAGE_ENCODING
26-
from lib.core.settings import DEV_EMAIL_ADDRESS
2725
from lib.core.settings import DIFF_TOLERANCE
2826
from lib.core.settings import HTML_TITLE_REGEX
2927
from lib.core.settings import LOWER_RATIO_BOUND
@@ -37,14 +35,16 @@
3735
from thirdparty import six
3836

3937
def comparison(page, headers, code=None, getRatioValue=False, pageLength=None):
40-
try:
41-
_ = _adjust(_comparison(page, headers, code, getRatioValue, pageLength), getRatioValue)
42-
return _
43-
except:
44-
warnMsg = "there was a KNOWN issue inside the internals regarding the difflib/comparison of pages. "
45-
warnMsg += "Please report details privately via e-mail to '%s'" % DEV_EMAIL_ADDRESS
46-
logger.critical(warnMsg)
47-
raise SqlmapSilentQuitException
38+
if not isinstance(page, (six.text_type, six.binary_type, type(None))):
39+
logger.critical("got page of type %s; repr(page)[:200]=%s" % (type(page), repr(page)[:200]))
40+
41+
try:
42+
page = b"".join(page)
43+
except:
44+
page = six.text_type(page)
45+
46+
_ = _adjust(_comparison(page, headers, code, getRatioValue, pageLength), getRatioValue)
47+
return _
4848

4949
def _adjust(condition, getRatioValue):
5050
if not any((conf.string, conf.notString, conf.regexp, conf.code)):

0 commit comments

Comments
 (0)