just in case to prevent "object of type 'NoneType' has no len()" error reports

This commit is contained in:
Miroslav Stampar 2011-04-11 11:59:02 +00:00
parent 2db2e9b6a2
commit 941daa1645
2 changed files with 5 additions and 1 deletions

View File

@ -298,3 +298,6 @@ DEFAULT_MSSQL_SCHEMA = 'dbo'
# display hash attack info every mod number of items
HASH_MOD_ITEM_DISPLAY = 1117
# maximum integer value
MAX_INT = sys.maxint

View File

@ -55,6 +55,7 @@ from lib.core.session import setOs
from lib.core.settings import CONCAT_ROW_DELIMITER
from lib.core.settings import CONCAT_VALUE_DELIMITER
from lib.core.settings import DEFAULT_MSSQL_SCHEMA
from lib.core.settings import MAX_INT
from lib.core.settings import SQL_STATEMENTS
from lib.core.shell import autoCompletion
from lib.core.unescaper import unescaper
@ -1137,7 +1138,7 @@ class Enumeration:
else:
count = inject.getValue(query, blind=False)
colList = sorted(colList, key=lambda x: len(x))
colList = sorted(colList, key=lambda x: len(x) if x else MAX_INT)
for column in colList:
infoMsg = "fetching number of distinct "