Skip to content

Instantly share code, notes, and snippets.

@ss23
Created October 28, 2020 10:03
Show Gist options
  • Select an option

  • Save ss23/8e895eca941f0bb24bfeee7e2abfe742 to your computer and use it in GitHub Desktop.

Select an option

Save ss23/8e895eca941f0bb24bfeee7e2abfe742 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://hashcat.net/wiki/doku.php?id=example_hashes
hashtype=500
filename=./hashes.txt
# You can pass arguments to hashcat using this script, e.g.
# ./crack-template.sh --username --show
hashcat=/opt/hashcat/latest/hashcat.bin
# Dictionary attack (plain)
$hashcat -m $hashtype $filename /usr/share/wordlists/rockyou.txt "$@"
# Dictionary attack with rules (use base64.rule for best bang for buck -- dive.rule for exhaustive rules)
$hashcat -m $hashtype $filename /usr/share/wordlists/crackstation.txt -O -r /opt/hashcat/latest/rules/dive.rule "$@"
# Plain bruteforce (?b is every possible byte)
$hashcat -m $hashtype $filename -a 3 -O --increment --increment-min 1 --increment-max 20 "?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b?b" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment