Skip to content

Commit ba05bb6

Browse files
committed
Minor refactoring
1 parent 883bd23 commit ba05bb6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ ac44a343947162532dbf17bd1f9ab424f8008f677367c5ad3f9f7b715a679818 lib/core/agent
170170
86a9cb82c7e7beb4730264dae20bf3b7cd87c0dcaee587367362cf319f7bb079 lib/core/bigarray.py
171171
f6062e324fdeaacf9df0a289fc3f12f755143e3876a70cb65b38aa2e690f73c1 lib/core/common.py
172172
11c748cc96ea2bc507bc6c1930a17fe4bc6fdd2dd2a80430df971cb21428eb00 lib/core/compat.py
173-
8ce42a336f9acc1a10874ee7be4492ae30fb08b79caea20512d109670a2fa159 lib/core/convert.py
173+
c6e54bfb1e3bc116ced8d525978ba3f4a10a59b99bc48d895b73359df0682d9b lib/core/convert.py
174174
ae500647c4074681749735a4f3b17b7eca44868dd3f39f9cab0a575888ba04a1 lib/core/data.py
175175
b22decc8389c94a13f1adf07eb343cf3b2aae3fb3909fd4107e24bbede7c7deb lib/core/datatype.py
176176
253309dc355ae27cd275e7de5a068e7e22feba603c4fe3429e2b69f8a51c0d13 lib/core/decorators.py
@@ -190,7 +190,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
190190
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
191191
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
192192
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
193-
133e0f45cb7f03ea2322235892d6dff38302ddf65c0a7940976e6f54d65147b4 lib/core/settings.py
193+
72affdfd108cd7c4c10b54389917b018731e592a5f8e087c38e14620bea551d0 lib/core/settings.py
194194
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
195195
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
196196
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py

lib/core/convert.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def getUnicode(value, encoding=None, noneToNull=False):
338338
True
339339
>>> getUnicode(None) == 'None'
340340
True
341+
>>> getUnicode(b'/etc/passwd') == '/etc/passwd'
342+
True
341343
"""
342344

343345
# Best position for --time-limit mechanism
@@ -354,7 +356,7 @@ def getUnicode(value, encoding=None, noneToNull=False):
354356
candidates = filterNone((encoding, kb.get("pageEncoding") if kb.get("originalPage") else None, conf.get("encoding"), UNICODE_ENCODING, sys.getfilesystemencoding()))
355357
if all(_ in value for _ in (b'<', b'>')):
356358
pass
357-
elif any(_ in value for _ in (b":\\", b'/', b'.')) and b'\n' not in value:
359+
elif b'\n' not in value and re.search(r"(?i)\w+\.\w{2,3}\Z|\A(\w:\\|/\w+)", six.text_type(value, UNICODE_ENCODING, errors="ignore")):
358360
candidates = filterNone((encoding, sys.getfilesystemencoding(), kb.get("pageEncoding") if kb.get("originalPage") else None, UNICODE_ENCODING, conf.get("encoding")))
359361
elif conf.get("encoding") and b'\n' not in value:
360362
candidates = filterNone((encoding, conf.get("encoding"), kb.get("pageEncoding") if kb.get("originalPage") else None, sys.getfilesystemencoding(), UNICODE_ENCODING))

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.12.52"
22+
VERSION = "1.9.12.53"
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)

0 commit comments

Comments
 (0)