Can't run interactive hashcat inside a while read loop
#1
Hello,
I am trying to run hashcat v6.1.0 in a bash script multiple times in a loop. The issue that I'm having it that, because hashcat is interactive, the script executes it multiple times over. I would like to run the first hashcat command and, only when that finishes, the second one should run.

Here is my script:
Code:
while read dict[/color]
[color=#0c0d0e]do[/color]
[color=#0c0d0e]    hashcat -m 0 -a 0 hashfile.hash $dict[/color]
[color=#0c0d0e]done < dictionary_paths


Also, what about nested while loop?

For example:

Code:
[color=#0c0d0e]while read rule_right[/color]
[color=#0c0d0e]do[/color]
[color=#0c0d0e]    while read rule_left[/color]
[color=#0c0d0e]    do[/color]
[color=#0c0d0e]        hashcat -m 0 -a 1 hashfile.hash dict.lst dict.lst --rule-right=$rule_right --rule-left=$rule_left[/color]
[color=#0c0d0e]    done < $rule_left_file[/color]
[color=#0c0d0e]done < $rule_right_file[/color]


Also, what about nested while loop?
For example:
Reply


Messages In This Thread
Can't run interactive hashcat inside a while read loop - by richardmalone - Yesterday, 10:55 PM