Skip to content

Instantly share code, notes, and snippets.

@lukeross
Last active February 18, 2024 16:21
Show Gist options
  • Save lukeross/32bf0b8fdd9d23144f014a786997e2a1 to your computer and use it in GitHub Desktop.
Save lukeross/32bf0b8fdd9d23144f014a786997e2a1 to your computer and use it in GitHub Desktop.
Extract stored passwords from firefox
#!/bin/sh
# ```
# extract_firefox_passwords.sh profile_directory master_password
# ```
#
# Requires `jq` and `pwdecrypt` (in linbss3-utils). If you have not set a master password, use the empty string.
#
# This is based on the examples at <https://blog.tajuma.com/?p=35>.
jq -r -S '.logins[] | .hostname, .encryptedUsername, .encryptedPassword' $1/logins.json | pwdecrypt -d $1 -p "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment