Skip to content

Commit 00d22f0

Browse files
committed
some consistency in variable naming at the file level
1 parent db526bd commit 00d22f0

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

lib/utils/hash.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,21 +326,21 @@ def attackDumpedTable():
326326
logger.info(infoMsg)
327327

328328
found = False
329-
colUser = ''
330-
colPasswords = set()
329+
col_user = ''
330+
col_passwords = set()
331331
attack_dict = {}
332332

333333
for column in columns:
334334
if column and column.lower() in COMMON_USER_COLUMNS:
335-
colUser = column
335+
col_user = column
336336
break
337337

338338
for i in xrange(count):
339339
if not found and i > HASH_RECOGNITION_QUIT_THRESHOLD:
340340
break
341341

342342
for column in columns:
343-
if column == colUser or column == '__infos__':
343+
if column == col_user or column == '__infos__':
344344
continue
345345

346346
if len(table[column]['values']) <= i:
@@ -351,19 +351,19 @@ def attackDumpedTable():
351351
if hashRecognition(value):
352352
found = True
353353

354-
if colUser and i < len(table[colUser]['values']):
355-
if table[colUser]['values'][i] not in attack_dict:
356-
attack_dict[table[colUser]['values'][i]] = []
354+
if col_user and i < len(table[col_user]['values']):
355+
if table[col_user]['values'][i] not in attack_dict:
356+
attack_dict[table[col_user]['values'][i]] = []
357357

358-
attack_dict[table[colUser]['values'][i]].append(value)
358+
attack_dict[table[col_user]['values'][i]].append(value)
359359
else:
360360
attack_dict['%s%d' % (DUMMY_USER_PREFIX, i)] = [value]
361361

362-
colPasswords.add(column)
362+
col_passwords.add(column)
363363

364364
if attack_dict:
365-
message = "recognized possible password hashes in column%s " % ("s" if len(colPasswords) > 1 else "")
366-
message += "'%s'. Do you want to " % ", ".join(col for col in colPasswords)
365+
message = "recognized possible password hashes in column%s " % ("s" if len(col_passwords) > 1 else "")
366+
message += "'%s'. Do you want to " % ", ".join(col for col in col_passwords)
367367
message += "crack them via a dictionary-based attack? [Y/n/q]"
368368
test = readInput(message, default="Y")
369369

@@ -384,7 +384,7 @@ def attackDumpedTable():
384384

385385
for i in xrange(count):
386386
for column in columns:
387-
if not (column == colUser or column == '__infos__' or len(table[column]['values']) <= i):
387+
if not (column == col_user or column == '__infos__' or len(table[column]['values']) <= i):
388388
value = table[column]['values'][i]
389389

390390
if value and value.lower() in lut:

0 commit comments

Comments
 (0)