Skip to content

Instantly share code, notes, and snippets.

@benlk
Last active August 29, 2015 14:26
Show Gist options
  • Save benlk/76c76ce8789afa187d4e to your computer and use it in GitHub Desktop.
Save benlk/76c76ce8789afa187d4e to your computer and use it in GitHub Desktop.

Do you:

  • open 1Password.html on Dropbox.com to access your shared passwords?
  • receive a 403 error about being unable to load data/default/encryption-keys.js?
  • have your Dropbox folder on your machine, say at ~/Dropbox?
  • have Python installed?

Here's how to get access to your passwords:

  1. Open a terminal
  2. cd ~/Dropbox/your-passwords.agilekeychain - Navigate to your .agilekeychain folder
  3. python -m SimpleHTTPServer - Start a small local webserver
  4. Open http://127.0.0.1:8000/1Password.html in your browser
  5. 👍

Want a one-liner for your shell?

cd ~/Dropbox/your-passwords.agilekeychain/; python -m SimpleHTTPServer & open http://127.0.0.1:8000/1Password.html

Or paste this on a new line at the end of your .bashrc or .bash_profile file:

alias 1pass='cd ~/Dropbox/your-passwords.agilekeychain/; python -m SimpleHTTPServer & open http://127.0.0.1:8000/1Password.html'

Usage: run 1pass, use the file as normal, then run kill PID where PID is the Process ID output when the Python server is backgrounded. In this example, it's 10226:

benlk@compy:~$ 1pass
[1] 10226
benlk@compy:~$ 
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [11/Aug/2015 14:06:17] "GET /1Password.html HTTP/1.1" 200 -
127.0.0.1 - - [11/Aug/2015 14:06:17] "GET /data/default/encryptionKeys.js HTTP/1.1" 200 -
127.0.0.1 - - [11/Aug/2015 13:31:18] "GET /data/default/.password.hint HTTP/1.1" 200 -
benlk@compy:~$ kill 10226

You'll note that the Python server is printing logs to the console. Don't worry about those - they're just a reminder that the server is running. Don't forget to kill it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment