Skip to main content

Command Line Interface to Password Pusher.

Project description

pwpush

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License

Command Line Interface to Password Pusher.

This utility is currently in BETA. Most core functionality exists and works but needs a bit of polishing.

Overview

This command line utility exists to interface with pwpush.com or any privately hosted instance of Password Pusher.

It uses the JSON API of Password Pusher to create, view, retrieve and manage pushes. It can do this anonymously or via the authenticated API.

Installation

pip install pwpush

  • Required Python version >3.8

Quickstart

pwpush.com

# Push a password to pwpush.com
> pwpush push mypassword
https://pwpush.com/en/p/uzij1ybk6rol

# Get JSON output instead
> pwpush --json=true push mypassword
{'url': 'https://pwpush.com/en/p/uzij1ybk6rol'}

Private Self Hosted Instance

# Point this tool to your privately hosted instance
> pwpush config set --key url --value https://pwpush.mydomain.secure
# ...and push away...
> pwpush push mypassword
https://pwpush.mydomain.secure/en/p/uzij1ybk6rol

Authentication with API Token

Get the API token associated with your account and add it to the CLI configuration.

# Get your API token at [/en/users/token](https://pwpush.com/en/users/token)

# Configure the CLI with your email and API token
> pwpush config set --key email --value <pwpush login email>
> pwpush config set --key token --value <api token from /en/users/token>

# List active pushes in your dashboard
> pwpush list

=== Active Pushes:
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Secret URL Token    Note                    Views  Days   Deletable by Viewer  Retrieval Step  Created                ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ uzij1ybk6rol        Push prior to Digital   6/100  28/87  True                 False           10/08/2022, 11:55:49   │
│                     Ocean migration 3                                                          UTC                    │
│ sfoej1fwlfljwlf     Push prior to Digital   0/100  28/90  True                 True            10/08/2022, 11:55:19   │
│                     Ocean migration 2                                                          UTC                    │
└────────────────────┴────────────────────────┴───────┴───────┴─────────────────────┴────────────────┴────────────────────────┘

# Get the audit log for a push
> pwpush audit <secret url token>

Show Configuration

> pwpush config show

=== Instance Settings:
Specify your credentials and even your private Password Pusher instance here.

┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key   ┃ Value              ┃ Description                                                            ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ URL   │ https://pwpush.com │ The Password Pusher instance to work with.                             │
│ email │ Not Set            │ E-mail address of your account on Password Pusher.                     │
│ token │ Not Set            │ API token from your account.  e.g. 'https://pwpush.com/en/users/token' │
└───────┴────────────────────┴────────────────────────────────────────────────────────────────────────┘

=== Expiration Settings:
Pushes created with this tool will have these expiration settings.

If not specified, the application defaults will be used.
Command line options override these settings.  See 'pwpush push --help'

┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key                 ┃ Value   ┃ Valid Values ┃ Description                                                      ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ expire_after_days   │ Not Set │ 1-90         │ Number of days each push will be valid for.                      │
│ expire_after_views  │ Not Set │ 1-100        │ Number of views each push will be valid for.                     │
│ retrieval_step      │ Not Set │ true/false   │ Require users to perform a click through to retrieve a push.     │
│ deletable_by_viewer │ Not Set │ true/false   │ Enables/disables a user from deleting a push payload themselves. │
└─────────────────────┴─────────┴──────────────┴──────────────────────────────────────────────────────────────────┘

=== CLI Settings:
Behavior settings for this CLI.

Command line options override these settings.  See 'pwpush --help'

┏━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key     ┃ Value ┃ Valid Values ┃ Description                      ┃
┡━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ json    │ False │ true/false   │ CLI outputs results in JSON.     │
│ verbose │ False │ true/false   │ More verbosity when appropriate. │
└─────────┴───────┴──────────────┴──────────────────────────────────┘

To change the above the values see: 'pwpush config set --help'

User config is saved in '/Users/pglombardo/Library/Application Support/pwpush/config.ini'

Screenshots

Help

List

Audit

Config

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwpush-0.10.3.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

pwpush-0.10.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pwpush-0.10.3.tar.gz.

File metadata

  • Download URL: pwpush-0.10.3.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Darwin/23.5.0

File hashes

Hashes for pwpush-0.10.3.tar.gz
Algorithm Hash digest
SHA256 ecb6fdf8b8918da7535a08d7c33c597fd66e8a4051901739d1867aab7cd07467
MD5 27e0193919c8bf43e29bb32afddb692b
BLAKE2b-256 2c0cdad279e0be84811a8c802e75831df2546b2a24b7f153a485f7c41b72e35d

See more details on using hashes here.

File details

Details for the file pwpush-0.10.3-py3-none-any.whl.

File metadata

  • Download URL: pwpush-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Darwin/23.5.0

File hashes

Hashes for pwpush-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e0e29bf07f49283464e4b45aa8604a40bb0ba0c9a87b4a1aaff4654657255006
MD5 5b9a56cdbff128c28cc38e54d1df1b7d
BLAKE2b-256 e2b7c1f4629b165e83b8bc576ab1ea8c24710a783041feb5d229a5c60106a132

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page