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

Skip to content

Commit 014e4e0

Browse files
committed
Minor represenation fix
1 parent 67157fa commit 014e4e0

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/core/dump.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def dbTables(self, dbTables):
212212
if table and isListLike(table):
213213
table = table[0]
214214

215-
maxlength = max(maxlength, len(normalizeUnicode(table) or str(table)))
215+
maxlength = max(maxlength, len(unsafeSQLIdentificatorNaming(normalizeUnicode(table) or str(table))))
216216

217217
lines = "-" * (int(maxlength) + 2)
218218

@@ -232,6 +232,7 @@ def dbTables(self, dbTables):
232232
if table and isListLike(table):
233233
table = table[0]
234234

235+
table = unsafeSQLIdentificatorNaming(table)
235236
blank = " " * (maxlength - len(normalizeUnicode(table) or str(table)))
236237
self._write("| %s%s |" % (table, blank))
237238

@@ -263,6 +264,7 @@ def dbTableColumns(self, tableColumns, content_type=None):
263264
for column in colList:
264265
colType = columns[column]
265266

267+
column = unsafeSQLIdentificatorNaming(column)
266268
maxlength1 = max(maxlength1, len(column or ""))
267269
maxlength2 = max(maxlength2, len(colType or ""))
268270

@@ -299,6 +301,8 @@ def dbTableColumns(self, tableColumns, content_type=None):
299301

300302
for column in colList:
301303
colType = columns[column]
304+
305+
column = unsafeSQLIdentificatorNaming(column)
302306
blank1 = " " * (maxlength1 - len(column))
303307

304308
if colType is not None:

lib/techniques/brute/use.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from lib.core.common import randomStr
1919
from lib.core.common import safeStringFormat
2020
from lib.core.common import safeSQLIdentificatorNaming
21+
from lib.core.common import unsafeSQLIdentificatorNaming
2122
from lib.core.data import conf
2223
from lib.core.data import kb
2324
from lib.core.data import logger
@@ -101,7 +102,7 @@ def tableExistsThread():
101102

102103
if conf.verbose in (1, 2) and not hasattr(conf, "api"):
103104
clearConsoleLine(True)
104-
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), table)
105+
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), unsafeSQLIdentificatorNaming(table))
105106
dataToStdout(infoMsg, True)
106107

107108
if conf.verbose in (1, 2):
@@ -197,7 +198,7 @@ def columnExistsThread():
197198

198199
if conf.verbose in (1, 2) and not hasattr(conf, "api"):
199200
clearConsoleLine(True)
200-
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), column)
201+
infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), unsafeSQLIdentificatorNaming(column))
201202
dataToStdout(infoMsg, True)
202203

203204
if conf.verbose in (1, 2):

0 commit comments

Comments
 (0)