Giter Site home page Giter Site logo

40a / pysswords Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcwebbie/passpie

0.0 1.0 0.0 785 KB

Pysswords manages encrypted login credentials in a local database

Home Page: https://marcwebbie.io/pysswords

License: MIT License

Makefile 2.00% Python 98.00%

pysswords's Introduction

Pysswords: Manage your passwords from the terminal

Pysswords lets you manage your login credentials from the terminal. Password files are saved into GnuGPG encrypted files into the Database Path_. Only with the passphrase used to create the pyssword database you can decrypt password files. If you want to know more about how pysswords works internally, check the Under the Hood_ section.

Pysswords console interface


Main Features

  • Console interface
  • Manage multiple databases
  • Add, edit, remove credentials
  • Copy passwords to clipboard
  • List credentials as a table
  • Colored output
  • Search credentials by name, login or comments
  • Search with regular expression
  • Bulk update/remove credentials
  • Select credentials by fullname syntax
  • Grouping credentials
  • Exporting Pysswords database
  • Importing Pysswords database
  • Undo/Redo modifications to the database
  • Importing credentials from other applications

implemented feature, not implemented feature.

Installation

Stable version pypi version

Make sure you have GPG and pip installed.

pip install pysswords

Development version Test Coverage Code Health.

Mac/linux Windows
Build Build on windows

The latest development version can be installed directly from GitHub:

# Universal
$ pip install --upgrade https://github.com/marcwebbie/pysswords/tarball/master

Quickstart

# create a new credentials database. Option: `-I` or `--init`
pysswords --init

# add new credentials. Option: `-a` or `--add`
pysswords -a

# get credential "example". Option: `-g` or `--get`
pysswords -g example

# remove credential "example". Option: `-r` or `--remove`
pysswords -r example

# edit credential "example". Option: `-u` or `--update`
pysswords -u example

# search credentials with the query "octocat". Option: `-s` or `--search`
pysswords -s octocat

# search credentials with the regular expression "example\.com|org".
pysswords -s example\.com|org

# copy password from credential "example" into clipboard. Option: `-c` or `--clipboard`
# this option have to be used with --get|-g option
pysswords -c -g example

# print all credentials as a table with hidden passwords
pysswords

# print all credentials and show passwords in plain text. Option: `-P` or `--show-password`
pysswords -P

# delete database and remove all credentials
pysswords --clean

# export database to a pysswords database file called pysswords.db
pysswords --export pysswords.db

# import database from pysswords database file called pysswords.db
pysswords --import pysswords.db

# specify other pysswords database. Option `-D` or `--database`
pysswords -D /path/to/other/database

# shows help. Option `-h` or `--help`
pysswords --help

# shows version. Option `--version`
pysswords --version

Grouping

Pysswords credentials can have multiple names which groups credentials with the same name together:

pysswords -a
Name: example.com
Login: john
Password: **********
Comment: No comment
pysswords -a
Name: example.com
Login: doe
Password: **********
Comment:
Output

| Name        | Login   | Password   | Comment    |
|-------------+---------+------------+------------|
| example.com | doe     | ***        |            |
| example.com | john    | ***        | No comment |

Fullname syntax

You can select grouped credentials by using fullname syntax login@name:

pysswords -g [email protected]
Output

| Name        | Login   | Password   | Comment   |
|-------------+---------+------------+-----------|
| example.com | doe     | ***        |           |

Under The Hood

Encryption

Encryption is done with GnuGPG using AES256. Take a look at pysswords.crypt module to know more.

Database Path

The default database path is at ~/.pysswords. If you want to change the database path, add --database option to pysswords together with --init.

pysswords --init --database "/path/to/database/"

Database structure

Pysswords database is structured in a directory hierachy. Every credential is a .pyssword file inside a directory named after a credential group.

An empty database would look like this:

pysswords --database /tmp/pysswords --init

tree /tmp/pysswords -la
# /tmp/pysswords
# └── .keys
#     ├── pubring.gpg
#     ├── random_seed
#     ├── secring.gpg
#     └── trustdb.gpg

After adding a new credential the database would look like this:

pysswords --database /tmp/pysswords -a
# Name: github.com
# Login: octocat
# Password: **********
# Comments:

tree /tmp/pysswords -la
# /tmp/pysswords
# ├── .keys
# │   ├── pubring.gpg
# │   ├── random_seed
# │   ├── secring.gpg
# │   └── trustdb.gpg
# └── github.com
#     └── octocat.pyssword

If we add more credentials to group github.com. Directory structure would be:

pysswords --database /tmp/pysswords -a
# Name: github.com
# Login: octocat2
# Password: **********
# Comments:

tree /tmp/pysswords -la
# /tmp/pysswords
# ├── .keys
# │   ├── pubring.gpg
# │   ├── random_seed
# │   ├── secring.gpg
# │   └── trustdb.gpg
# └── github
#     └── octocat.pyssword
#     └── example.pyssword

Contributing

License (MIT License)

The MIT License (MIT)

Copyright (c) 2014 Marc Webbie, http://github.com/marcwebbie

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.