Skip to content

Commit 648752c

Browse files
committed
Couple of patches
1 parent 264095a commit 648752c

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

data/txt/sha256sums.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ e376093d4f6e42ee38b050af329179df9c1c136b7667b2f1cb559f5d4b69ebd9 lib/controller
168168
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/controller/__init__.py
169169
2a96190ced25d8929861b13866101812fcadf5cac23dd1dd4b29b1a915918769 lib/core/agent.py
170170
1da4ec9cd9b67c8b54e4a3d314f8237d58778d8f3a00bc26a1e0540294dca30f lib/core/bigarray.py
171-
3f1fbe7c15b929db81097d10c2897eb1e711f158de51ef9041b4c74e11f3f1d8 lib/core/common.py
171+
a71a00c5c3efbc259087d90358a0665af15034454455dbd5b02b7451748f7371 lib/core/common.py
172172
a6397b10de7ae7c56ed6b0fa3b3c58eb7a9dbede61bf93d786e73258175c981e lib/core/compat.py
173173
a9997e97ebe88e0bf7efcf21e878bc5f62c72348e5aba18f64d6861390a4dcf2 lib/core/convert.py
174174
c03dc585f89642cfd81b087ac2723e3e1bb3bfa8c60e6f5fe58ef3b0113ebfe6 lib/core/data.py
@@ -189,7 +189,7 @@ e18c0c2c5a57924a623792a48bfd36e98d9bc085f6db61a95fc0dc8a3bcedc0c lib/core/decor
189189
48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py
190190
3574639db4942d16a2dc0a2f04bb7c0913c40c3862b54d34c44075a760e0c194 lib/core/revision.py
191191
888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py
192-
4267b95315e5351fa06aa27c883e187186adc3709e50acedf10079fd611dbb8d lib/core/settings.py
192+
ff964b7b3c344643643dd3235e17ea7e2219bac3d275cc721df243a299e0f77b lib/core/settings.py
193193
cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py
194194
bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py
195195
d35650179816193164a5f177102f18379dfbe6bb6d40fbb67b78d907b41c8038 lib/core/target.py
@@ -231,7 +231,7 @@ f522436fbd14bdab090a1d305fcac0361800cb8e36c8cbcb47933298376a71e0 lib/takeover/r
231231
f6e5d6e2ff368fa39943b2302982f33c47eb9a12d01419bef50fcf934b2bce34 lib/takeover/udf.py
232232
4b5ff4fcfa25454e6a93600d32af42a69bd59151639f569c01920c8610a99656 lib/takeover/web.py
233233
14179e5273378ec8d63660a87c5cb07a42b61a6fceb7f3bb494a7b5ce10ce2cb lib/takeover/xp_cmdshell.py
234-
e29a4054bb5285ba63ae2c0b2c05c8a15b80ec5719ddc4559baa0772d70f24b9 lib/techniques/blind/inference.py
234+
ea78a1e2c94073292664dff6cfb3da2836cc9114fb5f90a3de889fcc7c87dd3d lib/techniques/blind/inference.py
235235
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/blind/__init__.py
236236
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/dns/__init__.py
237237
3df9839fb92a81d46b6194d7adacb43f391efb78b071783c132e8d596ecbfaf1 lib/techniques/dns/test.py
@@ -241,7 +241,7 @@ f552b6140d4069be6a44792a08f295da8adabc1c4bb6a5e100f222f87144ca9d lib/techniques
241241
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/__init__.py
242242
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/union/__init__.py
243243
30cae858e2a5a75b40854399f65ad074e6bb808d56d5ee66b94d4002dc6e101b lib/techniques/union/test.py
244-
77d2404e5b23fa419113de963bf9eb207582d1548fb0d3f36876d198785c88c3 lib/techniques/union/use.py
244+
a17c1d201bd084de0093254bcd303aa859399891de13a7259e8c200e98294efb lib/techniques/union/use.py
245245
67dff80a17503b91c8ff93788ccc037b6695aa18b0793894b42488cbb21c4c83 lib/utils/api.py
246246
ea5e14f8c9d74b0fb17026b14e3fb70ee90e4046e51ab2c16652d86b3ca9b949 lib/utils/brute.py
247247
3fa1b9fd57ff47c6a283e8381bf70259dce57bb2327f99d8cb56450f1acf2d46 lib/utils/crawler.py

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ def getCharset(charsetType=None):
20652065

20662066
# Digits
20672067
elif charsetType == CHARSET_TYPE.DIGITS:
2068-
asciiTbl.extend((0, 9))
2068+
asciiTbl.extend(xrange(0, 10))
20692069
asciiTbl.extend(xrange(47, 58))
20702070

20712071
# Hexadecimal

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.10.1.47"
22+
VERSION = "1.10.1.48"
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/techniques/blind/inference.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,16 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
471471
bit = 0
472472
while len(candidates) > 1:
473473
bits = {}
474+
maxCandidate = max(candidates)
475+
maxBits = maxCandidate.bit_length() if maxCandidate > 0 else 1
476+
474477
for candidate in candidates:
475-
bit = 0
476-
while candidate:
478+
for bit in xrange(maxBits):
477479
bits.setdefault(bit, 0)
478-
bits[bit] += 1 if candidate & 1 else -1
479-
candidate >>= 1
480-
bit += 1
480+
if candidate & (1 << bit):
481+
bits[bit] += 1
482+
else:
483+
bits[bit] -= 1
481484

482485
choice = sorted(bits.items(), key=lambda _: abs(_[1]))[0][0]
483486
mask = 1 << choice
@@ -499,7 +502,10 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
499502
incrementCounter(getTechnique())
500503

501504
if result:
502-
return decodeIntToUnicode(candidates[0])
505+
if candidates[0] == 0: # Trailing zeros
506+
return None
507+
else:
508+
return decodeIntToUnicode(candidates[0])
503509

504510
# Go multi-threading (--threads > 1)
505511
if numThreads > 1 and isinstance(length, int) and length > 1:

lib/techniques/union/use.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ def _oneShotUnionUse(expression, unpack=True, limited=False):
121121
fields = list(json_data[0].keys())
122122

123123
if fields:
124-
retVal = ""
124+
parts = []
125125
for row in json_data:
126-
retVal += "%s%s%s" % (kb.chars.start, kb.chars.delimiter.join(getUnicode(row.get(field) or NULL) for field in fields), kb.chars.stop)
126+
parts.append("%s%s%s" % (kb.chars.start, kb.chars.delimiter.join(getUnicode(row.get(field) or NULL) for field in fields), kb.chars.stop))
127+
retVal = "".join(parts)
127128
except:
128129
retVal = None
129130
else:

0 commit comments

Comments
 (0)