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

Skip to content

Commit 4ecf6ee

Browse files
committed
Minor style update
1 parent 57be185 commit 4ecf6ee

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

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.7.5"
22+
VERSION = "1.2.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)

thirdparty/ansistrm/ansistrm.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def colorize(self, message, levelno):
150150
else:
151151
prefix = ""
152152

153-
match = re.search(r"\[([A-Z]+)\]", message)
153+
match = re.search(r"\[([A-Z ]+)\]", message)
154154
if match:
155155
level = match.group(1)
156156
if message.startswith("\x1b[1m"):
@@ -174,6 +174,17 @@ def colorize(self, message, levelno):
174174
reset = self.reset
175175
message = message.replace(time, ''.join((self.csi, str(self.color_map["cyan"] + 30), 'm', time, reset)), 1)
176176

177+
match = re.search(r"\[(#\d+)\]", message)
178+
if match:
179+
counter = match.group(1)
180+
if not message.endswith(self.reset):
181+
reset = self.reset
182+
elif message.startswith("\x1b[1m"): # bold
183+
reset = self.reset + "\x1b[1m"
184+
else:
185+
reset = self.reset
186+
message = message.replace(counter, ''.join((self.csi, str(self.color_map["yellow"] + 30), 'm', counter, reset)), 1)
187+
177188
return message
178189

179190
def format(self, record):

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
9f27c2f2abae2c21eb623f16abfeccf9 lib/core/settings.py
51+
f1e0cc7708df13f9f973dbcabfd77007 lib/core/settings.py
5252
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5353
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5454
95f04c1c1d8c3998d86e1bdf0e12771c lib/core/target.py
@@ -285,7 +285,7 @@ fd1bff6caefe5007444f7a0fabbc8ce9 tamper/space2mysqlblank.py
285285
929a2586dbb7b758a454eb09e13e5a73 tamper/versionedkeywords.py
286286
3aff4d344ebd4f38e033e73b63f84447 tamper/versionedmorekeywords.py
287287
ed1acafbac707bfa71c72f76b81c1bdd tamper/xforwardedfor.py
288-
b743632abd4eee8654f98dcfdb753246 thirdparty/ansistrm/ansistrm.py
288+
2350c4ab8a9972980ad93466066294e9 thirdparty/ansistrm/ansistrm.py
289289
d41d8cd98f00b204e9800998ecf8427e thirdparty/ansistrm/__init__.py
290290
8e775c25bc9e84891ad6fcb4f0005c23 thirdparty/beautifulsoup/beautifulsoup.py
291291
cb2e1fe7c404dff41a2ae9132828f532 thirdparty/beautifulsoup/__init__.py

0 commit comments

Comments
 (0)