Skip to content

stemid/passwordfrank

Repository files navigation

Password Frank

It's a password Pusher in python, web.py, bootstrap and jquery.

Note: This project has been superseded by my new password pusher.

Author

Stefan Midjich

License

CC0 - Creative Commons

Using

  1. Read and configure settings.py first, it's all about settings for directory names, database and locale.
  2. Install web.py and psycopg2 as python libraries.
  3. Install PostgreSQL database schema from tools directory.
  4. Import wordlist into database.
  5. Deploy

To install the PostgreSQL schema you can simply paste it into psql.

Importing of wordlist is done through REPL pretty easy, standing in the project root dir.

>>> from model import db
>>> f = open('tools/wordlist.txt')
>>> for line in f:
...  (freq, word) = line.split()
...  db.insert('wordlist', frequency=freq, word=word)

Either deploy using WSGI:

WSGIPythonPath /var/www/frank
WSGIScriptAlias / /var/www/frank/frank.py/
AddType text/html .py
Alias /static /var/www/frank/static

<Directory /var/www/frank>
 AllowOverride None
 Order deny,allow
 allow from all
</Directory>

Or just run from command line using:

python frank.py

It's also advisable to use the tools/deletephrases.py in a crontab to delete old phrases that have reached their maxdays value regularly instead of waiting for page loads.

In /etc/cron.d/passwordfrank for example, add this.

PATH=$PATH:/var/www/frank/tools
0 0 * * * www-data  deletephrases.py

And use whatever user can access the file and the database.

Translation

Only supports en_US and sv_SE out-of-box. To add more languages you need a Python 2.7 distribution with the msgfmt.py tool.

This tool is usually installed on Linux already, only Mac OS users might have trouble finding it.

  1. Edit i18n/messages.po if needed
  2. cp i18n/messages.po i18n/en_US/LC_MESSAGES/messages.po
  3. ./Python-2.7.1/Tools/i18n/msgfmt.py -o i18n/en_US/LC_MESSAGES/messages.mo i18n/sv_SE/LC_MESSAGES/messages.po

That's an example for english as main language, for any other language just edit the language specific i18n/sv_SE/LC_MESSAGES/messages.po and repeat step 3 for the language in question.

Credit

Wordlist comes courtesy of somewhere on the internet, I don't know its origin.

Hint

Add settings.py to .gitignore for easier pulls during deployment.

About

Password Pusher named Frank who is made of Python, web.py and Bootstrap.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published