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

Skip to content

Commit 3513ca6

Browse files
committed
Minor beautification
1 parent 6467c63 commit 3513ca6

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,9 @@ def setColor(message, color=None, bold=False, level=None, istty=None):
949949
if match:
950950
retVal = retVal.replace(match.group(1), colored(match.group(1), color="lightgrey"))
951951

952+
for match in re.finditer(r"[^\w]'([^']+)'", message): # single-quoted
953+
retVal = retVal.replace(match.group(1), colored(match.group(1), color="lightgrey"))
954+
952955
return retVal
953956

954957
def clearColors(message):

lib/core/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def colorize(self, message, levelno):
7474
string = match.group(1)
7575
message = message.replace("'%s" % string, "'%s" % ''.join((self.csi, str(self.color_map["white"] + 30), 'm', string, self._reset(message))), 1)
7676
else:
77-
match = re.search(r" \('(.+)'\)\Z", message)
77+
match = re.search(r" \('(.+)'\)\Z", message) or re.search(r"output: '(.+)'\Z", message)
7878
if match:
7979
string = match.group(1)
8080
message = message.replace("'%s'" % string, "'%s'" % ''.join((self.csi, str(self.color_map["white"] + 30), 'm', string, self._reset(message))), 1)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.2.24"
21+
VERSION = "1.4.2.25"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
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)