@@ -529,7 +529,7 @@ def hashRecognition(value):
529529
530530 return retVal
531531
532- def _bruteProcessVariantA (attack_info , hash_regex , suffix , retVal , proc_id , proc_count , wordlists , custom_wordlist ):
532+ def _bruteProcessVariantA (attack_info , hash_regex , suffix , retVal , proc_id , proc_count , wordlists , custom_wordlist , api ):
533533 if IS_WIN :
534534 coloramainit ()
535535
@@ -583,7 +583,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
583583
584584 status = 'current status: %s... %s' % (word .ljust (5 )[:5 ], ROTATING_CHARS [rotator ])
585585
586- if not conf . api :
586+ if not api :
587587 dataToStdout ("\r [%s] [INFO] %s" % (time .strftime ("%X" ), status ))
588588
589589 except KeyboardInterrupt :
@@ -605,7 +605,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
605605 with proc_count .get_lock ():
606606 proc_count .value -= 1
607607
608- def _bruteProcessVariantB (user , hash_ , kwargs , hash_regex , suffix , retVal , found , proc_id , proc_count , wordlists , custom_wordlist ):
608+ def _bruteProcessVariantB (user , hash_ , kwargs , hash_regex , suffix , retVal , found , proc_id , proc_count , wordlists , custom_wordlist , api ):
609609 if IS_WIN :
610610 coloramainit ()
611611
@@ -657,7 +657,7 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
657657 if user and not user .startswith (DUMMY_USER_PREFIX ):
658658 status += ' (user: %s)' % user
659659
660- if not conf . api :
660+ if not api :
661661 dataToStdout ("\r [%s] [INFO] %s" % (time .strftime ("%X" ), status ))
662662
663663 except KeyboardInterrupt :
@@ -842,12 +842,12 @@ def dictionaryAttack(attack_dict):
842842 count = _multiprocessing .Value ('i' , _multiprocessing .cpu_count ())
843843
844844 for i in xrange (_multiprocessing .cpu_count ()):
845- p = _multiprocessing .Process (target = _bruteProcessVariantA , args = (attack_info , hash_regex , suffix , retVal , i , count , kb .wordlists , custom_wordlist ))
846- processes .append (p )
845+ process = _multiprocessing .Process (target = _bruteProcessVariantA , args = (attack_info , hash_regex , suffix , retVal , i , count , kb .wordlists , custom_wordlist , conf . api ))
846+ processes .append (process )
847847
848- for p in processes :
849- p .daemon = True
850- p .start ()
848+ for process in processes :
849+ process .daemon = True
850+ process .start ()
851851
852852 while count .value > 0 :
853853 time .sleep (0.5 )
@@ -858,7 +858,7 @@ def dictionaryAttack(attack_dict):
858858 singleTimeWarnMessage (warnMsg )
859859
860860 retVal = Queue ()
861- _bruteProcessVariantA (attack_info , hash_regex , suffix , retVal , 0 , 1 , kb .wordlists , custom_wordlist )
861+ _bruteProcessVariantA (attack_info , hash_regex , suffix , retVal , 0 , 1 , kb .wordlists , custom_wordlist , conf . api )
862862
863863 except KeyboardInterrupt :
864864 print
@@ -926,12 +926,12 @@ def dictionaryAttack(attack_dict):
926926 count = _multiprocessing .Value ('i' , _multiprocessing .cpu_count ())
927927
928928 for i in xrange (_multiprocessing .cpu_count ()):
929- p = _multiprocessing .Process (target = _bruteProcessVariantB , args = (user , hash_ , kwargs , hash_regex , suffix , retVal , found_ , i , count , kb .wordlists , custom_wordlist ))
930- processes .append (p )
929+ process = _multiprocessing .Process (target = _bruteProcessVariantB , args = (user , hash_ , kwargs , hash_regex , suffix , retVal , found_ , i , count , kb .wordlists , custom_wordlist , conf . api ))
930+ processes .append (process )
931931
932- for p in processes :
933- p .daemon = True
934- p .start ()
932+ for process in processes :
933+ process .daemon = True
934+ process .start ()
935935
936936 while count .value > 0 :
937937 time .sleep (0.5 )
@@ -950,7 +950,7 @@ class Value():
950950 found_ = Value ()
951951 found_ .value = False
952952
953- _bruteProcessVariantB (user , hash_ , kwargs , hash_regex , suffix , retVal , found_ , 0 , 1 , kb .wordlists , custom_wordlist )
953+ _bruteProcessVariantB (user , hash_ , kwargs , hash_regex , suffix , retVal , found_ , 0 , 1 , kb .wordlists , custom_wordlist , conf . api )
954954
955955 found = found_ .value
956956
0 commit comments