File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -411,8 +411,9 @@ def dbTableValues(self, tableValues):
411411 rtable .beginTransaction ()
412412
413413 if count > TRIM_STDOUT_DUMP_SIZE :
414- warnMsg = "console output will be trimmed "
415- warnMsg += "due to the large table size"
414+ warnMsg = "console output will be trimmed to "
415+ warnMsg += "last %d rows due to " % TRIM_STDOUT_DUMP_SIZE
416+ warnMsg += "large table size"
416417 logger .warning (warnMsg )
417418
418419 for i in xrange (count ):
Original file line number Diff line number Diff line change 431431
432432# On huge tables there is a considerable slowdown if every row retrieval requires ORDER BY (most noticable in table dumping using ERROR injections)
433433SLOW_ORDER_COUNT_THRESHOLD = 10000
434+
435+ # Give up on hash recognition if nothing was found in first given number of rows
436+ HASH_RECOGNITION_QUIT_THRESHOLD = 10000
Original file line number Diff line number Diff line change 6262from lib .core .settings import DUMMY_USER_PREFIX
6363from lib .core .settings import GENERAL_IP_ADDRESS_REGEX
6464from lib .core .settings import HASH_MOD_ITEM_DISPLAY
65+ from lib .core .settings import HASH_RECOGNITION_QUIT_THRESHOLD
6566from lib .core .settings import IS_WIN
6667from lib .core .settings import ITOA64
6768from lib .core .settings import PYVERSION
@@ -322,6 +323,7 @@ def attackDumpedTable():
322323 columns = table .keys ()
323324 count = table ["__infos__" ]["count" ]
324325
326+ found = False
325327 colUser = ''
326328 colPasswords = set ()
327329 attack_dict = {}
@@ -332,6 +334,9 @@ def attackDumpedTable():
332334 break
333335
334336 for i in xrange (count ):
337+ if not found and i > HASH_RECOGNITION_QUIT_THRESHOLD :
338+ break
339+
335340 for column in columns :
336341 if column == colUser or column == '__infos__' :
337342 continue
@@ -342,6 +347,8 @@ def attackDumpedTable():
342347 value = table [column ]['values' ][i ]
343348
344349 if hashRecognition (value ):
350+ found = True
351+
345352 if colUser and i < len (table [colUser ]['values' ]):
346353 if table [colUser ]['values' ][i ] not in attack_dict :
347354 attack_dict [table [colUser ]['values' ][i ]] = []
You can’t perform that action at this time.
0 commit comments