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

Skip to content

Commit dd6c73e

Browse files
committed
fixed --passwords output for API - #297
1 parent 21afba9 commit dd6c73e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

lib/utils/hash.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,14 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
492492

493493
elif (proc_id == 0 or getattr(proc_count, "value", 0) == 1) and count % HASH_MOD_ITEM_DISPLAY == 0 or hash_regex == HASH.ORACLE_OLD or hash_regex == HASH.CRYPT_GENERIC and IS_WIN:
494494
rotator += 1
495+
495496
if rotator >= len(ROTATING_CHARS):
496497
rotator = 0
498+
497499
status = 'current status: %s... %s' % (word.ljust(5)[:5], ROTATING_CHARS[rotator])
498-
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
500+
501+
if not hasattr(conf, "api"):
502+
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
499503

500504
except KeyboardInterrupt:
501505
raise
@@ -560,9 +564,12 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
560564
if rotator >= len(ROTATING_CHARS):
561565
rotator = 0
562566
status = 'current status: %s... %s' % (word.ljust(5)[:5], ROTATING_CHARS[rotator])
567+
563568
if not user.startswith(DUMMY_USER_PREFIX):
564569
status += ' (user: %s)' % user
565-
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
570+
571+
if not hasattr(conf, "api"):
572+
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
566573

567574
except KeyboardInterrupt:
568575
raise

0 commit comments

Comments
 (0)