From fdc463d08b138074877445728060f20034666244 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 3 Jan 2011 23:36:35 +0000 Subject: [PATCH] fix for a bug reported by deep_freeze@mail.ru (IndexError: list index out of range) --- lib/core/dump.py | 3 +++ lib/utils/hash.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/core/dump.py b/lib/core/dump.py index 1ab37894c..bcb520cb9 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -348,6 +348,9 @@ class Dump: if column != "__infos__": info = tableValues[column] + if len(info["values"]) <= i: + continue + value = getUnicode(info["values"][i]) if re.search("^[\ *]*$", value): diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 98d5d2d1c..0b9493af9 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -219,6 +219,9 @@ def attackDumpedTable(): for column in columns: if column == colUser or column == '__infos__': continue + if len(table[column]['values']) <= i: + continue + value = table[column]['values'][i] if hashRecognition(value): if colUser: @@ -244,6 +247,9 @@ def attackDumpedTable(): for column in columns: if column == colUser or column == '__infos__': continue + if len(table[column]['values']) <= i: + continue + value = table[column]['values'][i] if value.lower() == hash_.lower(): table[column]['values'][i] += " (%s)" % password