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

Skip to content

Commit 941daa1

Browse files
committed
just in case to prevent "object of type 'NoneType' has no len()" error reports
1 parent 2db2e9b commit 941daa1

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,6 @@
298298

299299
# display hash attack info every mod number of items
300300
HASH_MOD_ITEM_DISPLAY = 1117
301+
302+
# maximum integer value
303+
MAX_INT = sys.maxint

plugins/generic/enumeration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from lib.core.settings import CONCAT_ROW_DELIMITER
5656
from lib.core.settings import CONCAT_VALUE_DELIMITER
5757
from lib.core.settings import DEFAULT_MSSQL_SCHEMA
58+
from lib.core.settings import MAX_INT
5859
from lib.core.settings import SQL_STATEMENTS
5960
from lib.core.shell import autoCompletion
6061
from lib.core.unescaper import unescaper
@@ -1137,7 +1138,7 @@ def __pivotDumpTable(self, table, colList, count=None, blind=True):
11371138
else:
11381139
count = inject.getValue(query, blind=False)
11391140

1140-
colList = sorted(colList, key=lambda x: len(x))
1141+
colList = sorted(colList, key=lambda x: len(x) if x else MAX_INT)
11411142

11421143
for column in colList:
11431144
infoMsg = "fetching number of distinct "

0 commit comments

Comments
 (0)