Skip to main content

An alternative implementation for getpass that echoes masked password (such as asterisks)

Project description

getpass_asterisk

An alternative implementation for getpass that echoes masked password (such as asterisks).

Security Note

:warning: This module has been modified to add getpass_asterisk, which can echo asterisks in place of password. Echoing of masked password leaks the length of the password. Use this utility only in a scenario where passwords are always of fixed length. This utility was created to receive secret tokens as input which are always of same size. Echoing the asterisks helped improve user experience. Use at your own risk. Only use for taking constant length secret inputs.

Installation

pip can be used to install getpass_asterisk.

pip install getpass_asterisk

Usage

Usage is identical to getpass.

# getpass_asterisk(prompt[, stream]) - Prompt for a password, with masked output.

from getpass_asterisk.getpass_asterisk import getpass_asterisk
password = getpass_asterisk("Enter password: ")

Feedback

For feedback, contact: Muhammad Akbar (akbarATsecursive.com).

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

getpass_asterisk-1.0.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distributions

getpass_asterisk-1.0.1-py3.8.egg (8.1 kB view hashes)

Uploaded Source

getpass_asterisk-1.0.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

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