Skip to content

sbassett29/PWL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

PWL

A generic, super-slim password locker for the console written in Python3. It supports a few different commands (list, add, edit, delete - see pwl -h) and stores all data within an AES blob (EAX mode).

Why did you write this? What's wrong with keepassx or pass?

...

Prerequisites

* Python 3.11
* argparse
* base64
* os
* secrets
* subprocess 
* time

pycryptodome (https://www.pycryptodome.org/en/latest/)
* Cryptodome.Cipher
* Cryptodome.Random

Note: pycryptodome can be dropped or overwritten during various python3 upgrades or when using pyenv. If you experience any errors about python3 not being able to find objects under the Cryptodome module, you should 1) double-check that pycryptodome is correctly installed for python3 and 2) that it is not conflicting with older modules like pycrypto or crypto. This may involve uninstalling any older, conflicting modules and then uninstalling and re-installing pycryptodome.

Installing

  1. git clone https://github.com/sbassett29/PWL.git
  2. pip install pycryptodome (if you haven't already)
  3. Set self.pwl_file_name on line 23 to a valid file name. You can run pwl -n for some suggestions.
  4. You'll want to select a random key to use to enc/dec the AES file that pwl creates. You can run pwl -k for some suggestions (base64-encoded random byte strings.) DON'T LOSE THIS KEY, OBVIOUSLY! You'll be prompted for it any time you wish to read/write data.
  5. Run pwl -h for help and options.

Options

There are a few options, set in the constructor for now (will probably turn into env vars at some point):

  1. pwl_length - must be 16 for now
  2. pwl_file_name - full path of the encrypted file where all data will be stored
  3. terminal_width - must be 120 for now
  4. col_one_width - must be 28 for now
  5. col_two_width - must be 28 for now
  6. col_three_width - must be 60 for now
  7. enc_dec_key - default, unusable value
  8. enc_dec_length - must be 16 for now
  9. encoding - utf8 please
  10. clear_list_time - optional time to clear screen after pwl -l, set to 0 or less for more danger
  11. clear_list_cmd - whatever you use to clear your term, default is based upon macos terminal

Usage

Again, see pwl -h. But basically, pwl -l displays the password data to the terminal, pwl -a and pwl -e {#} add and edit data via a few prompts. And pwl -d {#} will delete an item, forever. Oh, you'll probably want to alias the pwl file so you don't have to prepend "./" or whatever every time.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Known Issues

  1. The current data delimiter (|||) isn't great and should be changed or made configurable. Or just use JSON or YAML :)
  2. All of the screen settings (widths, etc) are fixed. This may or may not change.
  3. Really only tested under MacOS (Mojave 10.14.3) at the moment.

Authors

License

This project is licensed under the CC0 License - see the LICENSE file for details.