Skip to content

PRNV0612/local-password-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Password Manager

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.

Installation

Prerequisites

  • Python 3
  • MariaDB

You can run this on Windows, Linux, or macOS.


Windows Installation

1. Install Python Requirements

sudo apt install python3-pip
pip install -r requirements.txt

2.Install MariaDB

Follow these instructions to install MariaDB on Windows: https://www.mariadbtutorial.com/getting-started/install-mariadb/

Create MariaDB User and Grant Permissions

Navigate to the MariaDB bin directory:

file:///C:/Program%20Files/MariaDB/bin
Login to MariaDB as root:
sudo mysql -u root
Create a user:
CREATE USER 'pm'@localhost IDENTIFIED BY 'password';
Grant privileges:
GRANT ALL PRIVILEGES ON *.* TO 'pm'@localhost IDENTIFIED BY 'password';

Running the password manager

Configure

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

Usage

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

To Add an Entry:

python pm.py add -s mysite -u mysite.com -e hello@email.com -l myusername

To Retrieve an entry:

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

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages