This repository provides you a password manager in your terminal (mac OS). You can easily save your passwords but also IDs, mails or any remarks.
All your passwords are protected with one general password that you will be asked to provide during the installation. You can improve the level of security of this password manager by moving to a flash drive a file named .saveSalt
(created during the installation), needed to decode your data. If this file is moved on a flash drive, you will need to plug it in each time you want to use the password manager.
The file .save.json
is used to save all your information and .saveSalt
is used for the encryption.
There are two different ways to retrieve a password :
get
: Copies your password for 10 seconds in the clipboard and displays the ID, the mail and the remark if there is one attached to this password.see
: Copies your password in the clipboard and displays the ID, the mail, the password and the remark if there is one.
All your passwords and their related information will be linked to a key. This key will be used to find the password when you will need it.
The research for the correct key is tolerent and the password manager will ask you to choose the correct key if several passwords match the research. All the options are listed in the How to use it section.
-
First clone this repository.
-
Then run the following command to install necessary packages.
pip3 install cryptography
If you are using a Linux System, you will also need to install xclip :
On Ubuntu :
sudo apt-get install xclip
On Arch :
pacman -S xclip
- Then go in the folder of the project and run this command to initialise your password manager. This will ask you a password that will be used to encode your future data. It will also create two files
.save.json
and.saveSalt
. Do not modify or lose those files, otherwise you will lose all your saved information
python3 passw.py init
If you want to move
.saveSalt
on a flash drive as mentioned in the description you will need to edit inpassw.py
the following constant :saltFileName
. For example :saveFileName = /PATH/TO/.saveSalt
For more safety you can also keep in a safe place a copy of
.saveSalt
- In order to be usable from the terminal, add the following line in your
.bashrc
or.zshrc
file. You need to write the path to this project in"PATH/TO/PROJECT"
in the command line below and also in the filep_command
(can be found by runningpwd
in a terminal while in the project folder).
# password manager shortcut
source /PATH/TO/PROJECT/p_command
Once it is done restart your terminal or run the folowing command : source ~/.bashrc
or source ~/.zshrc
.
- To add a password run :
p add
The first thing asked by this command is the key that will be used to retrieve your password.
- To delete a password run :
p delete
- To edit a password run :
p edit
- To get a password :
p get <key>
- To see a password :
p see <key>
For get
and see
, <key> represents the key linked to the password you're looking for.
This <key> does not have to be exact, the password manager is tolerent and will ask you if several passwords match the research.
p get ""
will list all the current keys that are registered in the password manager