10-22-2024, 10:55 PM
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:
Also, what about nested while loop?
For example:
Also, what about nested while loop?
For example:
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: