#!/usr/bin/env bash

if ! command -v hashcat >/dev/null 2>&1; then
  echo "This script requires 'hashcat' to be installed."
  exit 1
fi

usage() {
  echo "
USAGE: crackem -t hashtype -r rules_file -i input_file -o output_file -l wordlist

Parameters:
-t | --hashtype		hash type code
			default: 1000 (NTLM)
			['crackem -ls' to view all hash codes]

-r | --rulesfile	hashcat rules file to implement
			default: OneRuleToRuleThemAll.rule

-i | --inputfile	path to list of hashes
			default: hashes.txt

-o | --outputfile	path to output file
			default: cracked.txt

-w | --wordlist		path to password list
			default: rockyou.txt

-a | --args		additonal arguments to pass to hashcat
                        default: none

Boolean Options:
-ls  | --list-codes	list all hash type codes with associated hash type names
-D   | --default	run with default options listed above
-1   | --onerule	download OneRuleToRuleThemAll.rule
-64  | --best64		download best64.rule
-ru1 | --rockyou	download rockyou.txt.gz and gunzip
-ru2 | --rockyou-2021	get links to download RockYou2021.txt.gz
-k   | --kaonashi	get links to download Kaonashi lists
-h   | --help		show this help text
"
  exit 1
}

if echo "$*" | grep -qE '(\-h$)|(.*help.*)'; then
  usage
fi

# Parse arguments:
while [[ "$#" -gt 0 ]]; do
  case $1 in
    -t|--hashtype) hashtype="$2"; shift; shift ;;
    -r|--rulesfile) rules_file="$2"; shift; shift ;;
    -i|--inputfile) input_file="$2"; shift; shift ;;
    -o|--outputfile) output_file="$2"; shift; shift ;;
    -w|--wordlist) wordlist="$2"; shift; shift ;;
    -a|--args) args="$2"; shift; shift;;
    -ls|--list-codes) list_codes=1; shift;;
    -ru1|--rockyou) download=1; rockyou=1; shift;;
    -ru2|--rockyou-2021) download=1; rockyou2021=1; shift;;
    -k|--kaonashi) download=1; kaonashi=1; shift;;
    -1|--onerule) download=1; onerule=1; shift;;
    -64|--best64) download=1; best64=1; shift;;
    -D|--default) default=1; shift;;
    *) usage; shift; shift ;;
  esac
done

get_crackin() {
  if [[ -z "$hashtype" ]]; then
    hashtype=1000
    echo "[INFO] Defaulting to NTLM (code 1000) for hash type."
  fi
  if [[ ! -f "$rules_file" ]]; then
    echo "$rules_file not found!"
    exit 1
  fi
  if [[ ! -f "$wordlist" ]]; then
    echo "$wordlist not found!"
    exit 1
  fi
  if [[ ! -f "$input_file" ]]; then
    "$input_file not found!"
    exit 1
  fi
  echo "------------------------------------------------"
  echo -e "input file:\t${input_file}"
  echo -e "output file:\t${output_file}"
  echo -e "hash code:\t${hashtype}"
  echo -e "rules:\t\t${rules_file}"
  echo -e "wordlist:\t${wordlist}"
  echo "------------------------------------------------"
  echo "hashcat command:"
  echo hashcat -O -w3 -a 0 -m $hashtype -r "$rules_file" "$input_file" "$wordlist" --outfile "$output_file" --status --status-timer 5 "$args"
  echo "------------------------------------------------"
  hashcat -O -w3 -a 0 -m $hashtype -r "$rules_file" "$input_file" "$wordlist" --outfile "$output_file" --status --status-timer 5 "$args"
}

dl_stuff() {
  if [[ $wget -eq 1 ]]; then
    wget --no-check-certificate "$url"
  elif [[ $curl -eq 1 ]]; then
    curl -skLO "$url"
  fi
  if [[ ($? -eq 0) && ($gunzip -eq 1) ]]; then
    echo "[INFO] gunzipping ${filename}..."
    gunzip "$filename"
    echo "Done."
  fi
}

check_gunzip() {
  if ! command -v gunzip >/dev/null 2>&1; then
    echo "'gunzip' is required to be able to uncompress the downloaded files"
    exit 1
  fi
}

if [[ -n $download ]]; then
  if command -v wget >/dev/null 2>&1; then
    wget=1
  elif command -v curl >/dev/null 2>&1; then
    curl=1
  else
    echo "In order to download files, you must have either 'wget' or 'curl' installed."
    exit 1
  fi
  if [[ -n $rockyou ]]; then
    filename="rockyou.txt.gz"
    url="https://github.com/praetorian-inc/Hob0Rules/raw/master/wordlists/rockyou.txt.gz"
    check_gunzip
    gunzip=1
    dl_stuff
  fi
  if [[ -n $rockyou2021 ]]; then
    filename="RockYou2021.txt.gz"
    url1='https://download632.mediafire.com/heasegbpzb3g/rjt6ytgs9b3scht/RockYou2021.txt.gz'
    url2='https://mega.nz/file/clM11YyC#s3_ePOdV9On4AikJZ3gjYgbZ_HqwmvtApxo9oBJ32Qc'
    echo "[WARNING] ${filename} is a large file (4.19G compressed)"
    echo -e "[INFO] You can download $filename in your browser from the following links:\n"
    echo -e "${url1}\n${url2}\n"
    echo -e "[INFO] You will need to gunzip the file before passing it with the -l|--wordlist parameter to 'crackem'.\n"
  fi
  if [[ -n $kaonashi ]]; then
    echo "[WARNING] These files can be large (much, much larger when uncompressed."
    echo "[INFO] These files are in .7z format."
    echo "[INFO] You will first need to run '7z e [filename].7z' before passing the file with -l|--wordlist to 'crackem'."
    echo -e "[INFO] You can copy/paste the following links in your browser to download from mega.nz:\n"
    echo "Kaonashi (2.35GB): https://mega.nz/#!nWJXzYzS!P1G8HDiMxq5wFaxeWGWx334Wp9wByj5kMEGLZkVX694"
    echo "Kaonashi 14M (47.7MB): https://mega.nz/#!7fIlxQaC!BlrWduRgBwWH_Za9SoEJnnq7ySrV4E_NzfTtn_OI418"
    echo -e "KaonashiWPA 100M (239.2MB): https://mega.nz/#!jeRRgQgZ!xcRcLpm0ftuu7z7JN32LHMECqk9vmpVNH2JFVxSICfU\n"
  fi
  if [[ -n $onerule ]]; then
    url='https://raw.githubusercontent.com/NotSoSecure/password_cracking_rules/master/OneRuleToRuleThemAll.rule'
    gunzip=0
    dl_stuff
  fi
  if [[ -n $best64 ]]; then
    url='https://raw.githubusercontent.com/hashcat/hashcat/master/rules/best64.rule'
    gunzip=0
    dl_stuff
  fi
  exit $?
fi

if [[ -z $list_codes ]]; then
  if [[ $default -eq 1 ]]; then
    hashtype=1000 # NTLM
    wordlist="rockyou.txt"
    rules_file="OneRuleToRuleThemAll.rule"
    input_file="hashes.txt"
    output_file="cracked.txt"
    get_crackin
    exit $?
  fi

  if [[ -z "$input_file" ]]; then
    input_file="hashes.txt"
  fi
  if [[ -z "$output_file" ]]; then
    output_file="cracked.txt"
  fi
  if [[ -z "$rules_file" ]]; then
    rules_file="OneRuleToRuleThemAll.rule"
  fi
  if [[ -z "$wordlist" ]]; then
    wordlist="rockyou.txt"
  fi

  get_crackin
  exit $?
fi

hash_codes="$(cat <<'EOF'
0 MD5
10 md5($pass.$salt)
20 md5($salt.$pass)
30 md5(utf16le($pass).$salt)
40 md5($salt.utf16le($pass))
50 HMAC-MD5 (key = $pass)
60 HMAC-MD5 (key = $salt)
70 md5(utf16le($pass))
100 SHA1
110 sha1($pass.$salt)
120 sha1($salt.$pass)
130 sha1(utf16le($pass).$salt)
140 sha1($salt.utf16le($pass))
150 HMAC-SHA1 (key = $pass)
160 HMAC-SHA1 (key = $salt)
170 sha1(utf16le($pass))
200 MySQL323
300 MySQL4.1/MySQL5
400 phpass
400 phpass
500 md5crypt
501 Juniper IVE
600 BLAKE2b-512
900 MD4
1000 NTLM
1100 Domain Cached Credentials (DCC)
1300 SHA2-224
1400 SHA2-256
1410 sha256($pass.$salt)
1420 sha256($salt.$pass)
1430 sha256(utf16le($pass).$salt)
1440 sha256($salt.utf16le($pass))
1450 HMAC-SHA256 (key = $pass)
1460 HMAC-SHA256 (key = $salt)
1470 sha256(utf16le($pass))
1500 descrypt
1600 Apache $apr1$ MD5
1700 SHA2-512
1710 sha512($pass.$salt)
1720 sha512($salt.$pass)
1730 sha512(utf16le($pass).$salt)
1740 sha512($salt.utf16le($pass))
1750 HMAC-SHA512 (key = $pass)
1760 HMAC-SHA512 (key = $salt)
1770 sha512(utf16le($pass))
1800 sha512crypt $6$
2000 STDOUT
2100 Domain Cached Credentials 2 (DCC2)
2400 Cisco-PIX MD5
2410 Cisco-ASA MD5
2500 WPA-EAPOL-PBKDF2 1
2501 WPA-EAPOL-PMK 14
2600 md5(md5($pass))
3000 LM
3100 Oracle H: Type (Oracle 7+)
3200 bcrypt $2*$
3500 md5(md5(md5($pass)))
3710 md5($salt.md5($pass))
3800 md5($salt.$pass.$salt)
3910 md5(md5($pass).md5($salt))
4010 md5($salt.md5($salt.$pass))
4110 md5($salt.md5($pass.$salt))
4300 md5(strtoupper(md5($pass)))
4400 md5(sha1($pass))
4500 sha1(sha1($pass))
4510 sha1(sha1($pass).$salt)
4520 sha1($salt.sha1($pass))
4700 sha1(md5($pass))
4710 sha1(md5($pass).$salt)
4800 iSCSI CHAP authentication
4900 sha1($salt.$pass.$salt)
5000 sha1(sha1($salt.$pass.$salt))
5100 Half MD5
5200 Password Safe v3
5300 IKE-PSK MD5
5400 IKE-PSK SHA1
5500 NetNTLMv1 / NetNTLMv1+ESS
5600 NetNTLMv2
5700 Cisco-IOS type 4 (SHA256)
5800 Samsung Android Password/PIN
6000 RIPEMD-160
6100 Whirlpool
6211 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES
6211 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent
6211 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish
6212 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish
6213 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish-Serpent
6212 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-AES
6213 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES
6212 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent
6221 TrueCrypt 5.0+ SHA512 + AES
6221 TrueCrypt 5.0+ SHA512 + Serpent
6221 TrueCrypt 5.0+ SHA512 + Twofish
6222 TrueCrypt 5.0+ SHA512 + AES-Twofish
6223 TrueCrypt 5.0+ SHA512 + AES-Twofish-Serpent
6222 TrueCrypt 5.0+ SHA512 + Serpent-AES
6223 TrueCrypt 5.0+ SHA512 + Serpent-Twofish-AES
6222 TrueCrypt 5.0+ SHA512 + Twofish-Serpent
6231 TrueCrypt 5.0+ Whirlpool + AES
6231 TrueCrypt 5.0+ Whirlpool + Serpent
6231 TrueCrypt 5.0+ Whirlpool + Twofish
6232 TrueCrypt 5.0+ Whirlpool + AES-Twofish
6233 TrueCrypt 5.0+ Whirlpool + AES-Twofish-Serpent
6232 TrueCrypt 5.0+ Whirlpool + Serpent-AES
6233 TrueCrypt 5.0+ Whirlpool + Serpent-Twofish-AES
6232 TrueCrypt 5.0+ Whirlpool + Twofish-Serpent
6241 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES + boot
6241 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent + boot
6241 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish + boot
6242 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish + boot
6243 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + AES-Twofish-Serpent + boot
6242 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-AES + boot
6243 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES + boot
6242 TrueCrypt 5.0+ PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent + boot
6300 AIX {smd5}
6400 AIX {ssha256}
6500 AIX {ssha512}
6600 1Password
6700 AIX {ssha1}
6800 LastPass + LastPass sniffed4
6900 GOST R 34.11-94
7000 FortiGate (FortiOS)
7200 GRUB 2
7300 IPMI2 RAKP HMAC-SHA1
7400 sha256crypt $5$
7500 Kerberos 5
7700 SAP CODVN B (BCODE)
7701 SAP CODVN B (BCODE) from RFC_READ_TABLE
7800 SAP CODVN F/G (PASSCODE)
7801 SAP CODVN F/G (PASSCODE) from RFC_READ_TABLE
7900 Drupal7
8000 Sybase ASE
8100 Citrix NetScaler (SHA1)
8200 1Password
8300 DNSSEC (NSEC3)
8400 WBB3 (Woltlab Burning Board)
8500 RACF
8600 Lotus Notes/Domino 5
8700 Lotus Notes/Domino 6
8800 Android FDE <= 4.3
8900 scrypt
9000 Password Safe v2
9100 Lotus Notes/Domino 8
9200 Cisco-IOS $8$ (PBKDF2-SHA256)
9300 Cisco-IOS $9$ (scrypt)
9400 MS Office 2007
9500 MS Office 2010
9600 MS Office 2013
9700 MS Office ⇐ 2003 MD5 + RC4
9710 MS Office ⇐ 2003 $0/$1
9720 MS Office ⇐ 2003 $0/$1
9800 MS Office ⇐ 2003 SHA1 + RC4
9810 MS Office ⇐ 2003 $3
9820 MS Office ⇐ 2003 $3
9900 Radmin2
10000 Django (PBKDF2-SHA256)
10100 SipHash
10200 CRAM-MD5
10300 SAP CODVN H (PWDSALTEDHASH) iSSHA-1
10400 PDF 1.1 - 1.3 (Acrobat 2 - 4)
10410 PDF 1.1 - 1.3 (Acrobat 2 - 4)
10420 PDF 1.1 - 1.3 (Acrobat 2 - 4)
10500 PDF 1.4 - 1.6 (Acrobat 5 - 8)
10600 PDF 1.7 Level 3 (Acrobat 9)
10700 PDF 1.7 Level 8 (Acrobat 10 - 11)
10800 SHA2-384
10810 sha384($pass.$salt)
10820 sha384($salt.$pass)
10830 sha384(utf16le($pass).$salt)
10840 sha384($salt.utf16le($pass))
10870 sha384(utf16le($pass))
10900 PBKDF2-HMAC-SHA256
10901 RedHat 389-DS LDAP (PBKDF2-HMAC-SHA256)
11000 PrestaShop
11100 PostgreSQL CRAM (MD5)
11200 MySQL CRAM (SHA1)
11300 Bitcoin/Litecoin wallet.dat
11400 SIP digest authentication (MD5)
11500 CRC32 5
11600 7-Zip
11700 GOST R 34.11-2012 (Streebog) 256-bit
11750 HMAC-Streebog-256 (key = $pass)
11760 HMAC-Streebog-256 (key = $salt)
11800 GOST R 34.11-2012 (Streebog) 512-bit
11850 HMAC-Streebog-512 (key = $pass)
11860 HMAC-Streebog-512 (key = $salt)
11900 PBKDF2-HMAC-MD5
12000 PBKDF2-HMAC-SHA1
12100 PBKDF2-HMAC-SHA512
12200 eCryptfs
12300 Oracle T: Type (Oracle 12+)
12400 BSDi Crypt
12500 RAR3-hp
12600 ColdFusion 10+
12700 Blockchain
12800 MS-AzureSync PBKDF2-HMAC-SHA256
12900 Android FDE (Samsung DEK)
13000 RAR5
13100 Kerberos 5
13200 AxCrypt 1
13300 AxCrypt 1 in-memory SHA1 13
13400 KeePass 1 AES / without keyfile
13400 KeePass 2 AES / without keyfile
13400 KeePass 1 Twofish / with keyfile
13400 Keepass 2 AES / with keyfile
13500 PeopleSoft PS_TOKEN
13600 WinZip
13711 VeraCrypt PBKDF2-HMAC-RIPEMD160 + AES
13712 VeraCrypt PBKDF2-HMAC-RIPEMD160 + AES-Twofish
13711 VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent
13712 VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent-AES
13713 VeraCrypt PBKDF2-HMAC-RIPEMD160 + Serpent-Twofish-AES
13711 VeraCrypt PBKDF2-HMAC-RIPEMD160 + Twofish
13712 VeraCrypt PBKDF2-HMAC-RIPEMD160 + Twofish-Serpent
13751 VeraCrypt PBKDF2-HMAC-SHA256 + AES
13752 VeraCrypt PBKDF2-HMAC-SHA256 + AES-Twofish
13751 VeraCrypt PBKDF2-HMAC-SHA256 + Serpent
13752 VeraCrypt PBKDF2-HMAC-SHA256 + Serpent-AES
13753 VeraCrypt PBKDF2-HMAC-SHA256 + Serpent-Twofish-AES
13751 VeraCrypt PBKDF2-HMAC-SHA256 + Twofish
13752 VeraCrypt PBKDF2-HMAC-SHA256 + Twofish-Serpent
13721 VeraCrypt PBKDF2-HMAC-SHA512 + AES
13722 VeraCrypt PBKDF2-HMAC-SHA512 + AES-Twofish
13721 VeraCrypt PBKDF2-HMAC-SHA512 + Serpent
13722 VeraCrypt PBKDF2-HMAC-SHA512 + Serpent-AES
13723 VeraCrypt PBKDF2-HMAC-SHA512 + Serpent-Twofish-AES
13721 VeraCrypt PBKDF2-HMAC-SHA512 + Twofish
13722 VeraCrypt PBKDF2-HMAC-SHA512 + Twofish-Serpent
13731 VeraCrypt PBKDF2-HMAC-Whirlpool + AES
13732 VeraCrypt PBKDF2-HMAC-Whirlpool + AES-Twofish
13731 VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent
13732 VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent-AES
13733 VeraCrypt PBKDF2-HMAC-Whirlpool + Serpent-Twofish-AES
13731 VeraCrypt PBKDF2-HMAC-Whirlpool + Twofish
13732 VeraCrypt PBKDF2-HMAC-Whirlpool + Twofish-Serpent
13741 VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES
13742 VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES-Twofish
13743 VeraCrypt PBKDF2-HMAC-RIPEMD160 + boot-mode + AES-Twofish-Serpent
13761 VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Twofish
13762 VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Serpent-AES
13763 VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + Serpent-Twofish-AES
13761 VeraCrypt PBKDF2-HMAC-SHA256 + boot-mode + PIM + AES 16
13771 VeraCrypt Streebog-512 + XTS 512 bit
13772 VeraCrypt Streebog-512 + XTS 1024 bit
13773 VeraCrypt Streebog-512 + XTS 1536 bit
13800 Windows Phone 8+ PIN/password
13900 OpenCart
14000 DES (PT = $salt
14100 3DES (PT = $salt
14400 sha1(CX)
14500 Linux Kernel Crypto API (2.4)
14600 LUKS 10
14700 iTunes backup < 10.0 11
14800 iTunes backup >= 10.0 11
14900 Skip32 (PT = $salt
15000 FileZilla Server >= 0.9.55
15100 Juniper/NetBSD sha1crypt
15200 Blockchain
15300 DPAPI masterkey file v1 + local context
15400 ChaCha20 20
15500 JKS Java Key Store Private Keys (SHA1)
15600 Ethereum Wallet
15700 Ethereum Wallet
15900 DPAPI masterkey file v2 + Active Directory domain context
16000 Tripcode
16100 TACACS+
16200 Apple Secure Notes
16300 Ethereum Pre-Sale Wallet
16400 CRAM-MD5 Dovecot
16500 JWT (JSON Web Token)
16600 Electrum Wallet (Salt-Type 1-3)
16700 FileVault 2
16800 WPA-PMKID-PBKDF2 1
16801 WPA-PMKID-PMK 15
16900 Ansible Vault
17010 GPG (AES-128/AES-256 (SHA-1($pass)))
17200 PKZIP (Compressed)
17210 PKZIP (Uncompressed)
17220 PKZIP (Compressed Multi-File)
17225 PKZIP (Mixed Multi-File)
17230 PKZIP (Mixed Multi-File Checksum-Only)
17300 SHA3-224
17400 SHA3-256
17500 SHA3-384
17600 SHA3-512
17700 Keccak-224
17800 Keccak-256
17900 Keccak-384
18000 Keccak-512
18100 TOTP (HMAC-SHA1)
18200 Kerberos 5
18300 Apple File System (APFS)
18400 Open Document Format (ODF) 1.2 (SHA-256
18500 sha1(md5(md5($pass)))
18600 Open Document Format (ODF) 1.1 (SHA-1
18700 Java Object hashCode()
18800 Blockchain
18900 Android Backup
19000 QNX /etc/shadow (MD5)
19100 QNX /etc/shadow (SHA256)
19200 QNX /etc/shadow (SHA512)
19300 sha1($salt1.$pass.$salt2)
19500 Ruby on Rails Restful-Authentication
19600 Kerberos 5
19700 Kerberos 5
19800 Kerberos 5
19900 Kerberos 5
20011 DiskCryptor SHA512 + XTS 512 bit (AES)
20011 DiskCryptor SHA512 + XTS 512 bit (Twofish)
20011 DiskCryptor SHA512 + XTS 512 bit (Serpent)
20012 DiskCryptor SHA512 + XTS 1024 bit (AES-Twofish)
20012 DiskCryptor SHA512 + XTS 1024 bit (Twofish-Serpent)
20012 DiskCryptor SHA512 + XTS 1024 bit (Serpent-AES)
20013 DiskCryptor SHA512 + XTS 1536 bit (AES-Twofish-Serpent)
20200 Python passlib pbkdf2-sha512
20300 Python passlib pbkdf2-sha256
20400 Python passlib pbkdf2-sha1
20500 PKZIP Master Key
20510 PKZIP Master Key (6 byte optimization) 17
20600 Oracle Transportation Management (SHA256)
20710 sha256(sha256($pass).$salt)
20720 sha256($salt.sha256($pass))
20800 sha256(md5($pass))
20900 md5(sha1($pass).md5($pass).sha1($pass))
21000 BitShares v0.x - sha512(sha512_bin(pass))
21100 sha1(md5($pass.$salt))
21200 md5(sha1($salt).md5($pass))
21300 md5($salt.sha1($salt.$pass))
21400 sha256(sha256_bin($pass))
21500 SolarWinds Orion
21501 SolarWinds Orion v2
21600 Web2py pbkdf2-sha512
21700 Electrum Wallet (Salt-Type 4)
21800 Electrum Wallet (Salt-Type 5)
22000 WPA-PBKDF2-PMKID+EAPOL 1
22001 WPA-PMK-PMKID+EAPOL 18
22100 BitLocker
22200 Citrix NetScaler (SHA512)
22300 sha256($salt.$pass.$salt)
22400 AES Crypt (SHA256)
22500 MultiBit Classic .key (MD5)
22600 Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1)
22700 MultiBit HD (scrypt)
22911 RSA/DSA/EC/OpenSSH Private Keys ($0$)
22921 RSA/DSA/EC/OpenSSH Private Keys ($6$)
22931 RSA/DSA/EC/OpenSSH Private Keys ($1
22941 RSA/DSA/EC/OpenSSH Private Keys ($4$)
22951 RSA/DSA/EC/OpenSSH Private Keys ($5$)
23001 SecureZIP AES-128
23002 SecureZIP AES-192
23003 SecureZIP AES-256
23100 Apple Keychain
23200 XMPP SCRAM PBKDF2-SHA1
23300 Apple iWork
23400 Bitwarden 21
23500 AxCrypt 2 AES-128
23600 AxCrypt 2 AES-256
23700 RAR3-p (Uncompressed)
23800 RAR3-p (Compressed)
23900 BestCrypt v3 Volume Encryption
24100 MongoDB ServerKey SCRAM-SHA-1
24200 MongoDB ServerKey SCRAM-SHA-256
24300 sha1($salt.sha1($pass.$salt))
24410 PKCS#8 Private Keys (PBKDF2-HMAC-SHA1 + 3DES/AES)
24420 PKCS#8 Private Keys (PBKDF2-HMAC-SHA256 + 3DES/AES)
24500 Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512)
24600 SQLCipher
24700 Stuffit5
24800 Umbraco HMAC-SHA1
24900 Dahua Authentication MD5
25000 SNMPv3 HMAC-MD5-96/HMAC-SHA1-96
25100 SNMPv3 HMAC-MD5-96
25200 SNMPv3 HMAC-SHA1-96
25300 MS Office 2016 - SheetProtection
25400 PDF 1.4 - 1.6 (Acrobat 5 - 8) - user and owner pass
25500 Stargazer Stellar Wallet XLM
25600 bcrypt(md5($pass)) / bcryptmd5
25700 MurmurHash
25800 bcrypt(sha1($pass)) / bcryptsha1
25900 KNX IP Secure - Device Authentication Code
26000 Mozilla key3.db
26100 Mozilla key4.db
26200 OpenEdge Progress Encode
26300 FortiGate256 (FortiOS256)
26401 AES-128-ECB NOKDF (PT = $salt
26402 AES-192-ECB NOKDF (PT = $salt
26403 AES-256-ECB NOKDF (PT = $salt
26500 iPhone passcode (UID key + System Keybag)
26600 MetaMask Wallet 8
26700 SNMPv3 HMAC-SHA224-128
26800 SNMPv3 HMAC-SHA256-192 8
26900 SNMPv3 HMAC-SHA384-256 8
27000 NetNTLMv1 / NetNTLMv1+ESS (NT) 22
27100 NetNTLMv2 (NT) 22
27200 Ruby on Rails Restful Auth (one round
27300 SNMPv3 HMAC-SHA512-384 8
27400 VMware VMX (PBKDF2-HMAC-SHA1 + AES-256-CBC)
27500 VirtualBox (PBKDF2-HMAC-SHA256 & AES-128-XTS)
27600 VirtualBox (PBKDF2-HMAC-SHA256 & AES-256-XTS)
27700 MultiBit Classic .wallet (scrypt)
27800 MurmurHash3
27900 CRC32C
28000 CRC64Jones
28100 Windows Hello PIN/Password
99999 Plaintext
EOF
)"

echo "$hash_codes"
exit 0
