Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b0ca520

Browse files
committed
Fixes #3202
1 parent af89137 commit b0ca520

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,15 +2908,15 @@ def filterStringValue(value, charRegex, replacement=""):
29082908

29092909
return retVal
29102910

2911-
def filterControlChars(value):
2911+
def filterControlChars(value, replacement=' '):
29122912
"""
2913-
Returns string value with control chars being supstituted with ' '
2913+
Returns string value with control chars being supstituted with replacement character
29142914
29152915
>>> filterControlChars(u'AND 1>(2+3)\\n--')
29162916
u'AND 1>(2+3) --'
29172917
"""
29182918

2919-
return filterStringValue(value, PRINTABLE_CHAR_REGEX, ' ')
2919+
return filterStringValue(value, PRINTABLE_CHAR_REGEX, replacement)
29202920

29212921
def isDBMSVersionAtLeast(version):
29222922
"""

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.2.8.0"
22+
VERSION = "1.2.8.1"
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def blindThread():
501501
count = threadData.shared.start
502502

503503
for i in xrange(startCharIndex, endCharIndex + 1):
504-
output += '_' if currentValue[i] is None else currentValue[i]
504+
output += '_' if currentValue[i] is None else filterControlChars(currentValue[i] if len(currentValue[i]) == 1 else ' ', replacement=' ')
505505

506506
for i in xrange(length):
507507
count += 1 if currentValue[i] is not None else 0
@@ -518,7 +518,7 @@ def blindThread():
518518
status = ' %d/%d (%d%%)' % (_, length, int(100.0 * _ / length))
519519
output += status if _ != length else " " * len(status)
520520

521-
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), filterControlChars(output)))
521+
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), output))
522522

523523
runThreads(numThreads, blindThread, startThreadMsg=False)
524524

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
2828
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
2929
0adf547455a76dc71e6a599e52da1ed9 lib/core/agent.py
3030
fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py
31-
ee1b800e860263b877a2b292a3e4becd lib/core/common.py
31+
655326aed648209c5477464825cebea8 lib/core/common.py
3232
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
3333
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
3434
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
@@ -48,7 +48,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4848
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4949
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5050
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
51-
355a1680a1f53013390849ca50322c0e lib/core/settings.py
51+
63ca523cd15143c4c0dc1ee2d307dfa6 lib/core/settings.py
5252
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5353
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5454
12bed9603b6fba3e5ffda11d584bc449 lib/core/target.py
@@ -89,7 +89,7 @@ fb9e34d558293b5d6b9727f440712886 lib/takeover/registry.py
8989
48575dde7bb867b7937769f569a98309 lib/takeover/udf.py
9090
f6f835e4190a55e42d13c1e7ca3f728f lib/takeover/web.py
9191
debc36a3ff80ba915aeeee69b21a8ddc lib/takeover/xp_cmdshell.py
92-
0e9d37cbeabd1bbbfe2c53f01bbb6a6e lib/techniques/blind/inference.py
92+
db208ab47de010836c6bf044e2357861 lib/techniques/blind/inference.py
9393
1e5532ede194ac9c083891c2f02bca93 lib/techniques/blind/__init__.py
9494
1e5532ede194ac9c083891c2f02bca93 lib/techniques/dns/__init__.py
9595
799faf9008527d2e9da9d923e50f685a lib/techniques/dns/test.py

0 commit comments

Comments
 (0)