A simple local password manager written in Python and MariaDB. It uses PBKDF2 to derive a 256-bit key from a MASTER PASSWORD and DEVICE SECRET, which is then used with AES-256 for encryption and decryption.
- Python 3
- MariaDB
You can run this on Windows, Linux, or macOS.
sudo apt install python3-pip
pip install -r requirements.txt
Follow these instructions to install MariaDB on Windows: https://www.mariadbtutorial.com/getting-started/install-mariadb/
Create MariaDB User and Grant Permissions
file:///C:/Program%20Files/MariaDB/bin
sudo mysql -u root
CREATE USER 'pm'@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'pm'@localhost IDENTIFIED BY 'password';
First, you need to configure the password manager by choosing a MASTER PASSWORD. This config step is only required once.
python config.py make
To delete the existing configuration and all stored entries, use:
python config.py delete
To remake the configuration:
python config.py remake
python pm.py -h
usage: pm.py [-h] [-s NAME] [-u URL] [-e EMAIL] [-l LOGIN] [--length LENGTH] [-c] option
Description
positional arguments:
option (a)dd / (e)xtract / (g)enerate
optional arguments:
-h, --help show this help message and exit
-s NAME, --name NAME Site name
-u URL, --url URL Site URL
-e EMAIL, --email EMAIL
Email
-l LOGIN, --login LOGIN
Username
--length LENGTH Length of the password to generate
-c, --copy Copy password to clipboard
python pm.py add -s mysite -u mysite.com -e hello@email.com -l myusername
python pm.py extract
To retrieve entries matching a site name:
python pm.py e -s mysite
To retrieve entries matching a site name and username:
python pm.py e -s mysite -l myusername
To retrieve and copy the password of a specific site and username:
python pm.py e -s mysite -l myusername --copy
To generate a password of a specified length and copy it to the clipboard:
python pm.py g --length 15
This will generate a password of length 15 and automatically copy it to the clipboard.