otp
Tool to generate One-Time Passwords
PyPI package: myotp
If you spot any problems or have any improvement ideas then feel free to open an issue and I will be glad to look into it for you.
Installation
A recommended way of installing the tool is pip install.
Once installed, a command line tool otp should be available in your system’s PATH.
pip install
The tool is available in PyPI and can be installed using pip:
$ pip install --user myotp $ otp --help
Manual install
Run the following command to install required Python modules:
$ git clone https://github.com/peterpakos/otp.git $ cd otp $ pip install --user -r requirements.txt $ ./otp --help
Usage
$ otp --help usage: otp [--help] [--version] key Tool to generate One-Time Passwords positional arguments: key key or service name from ~/.otpkeys optional arguments: --help show this help message and exit --version show program's version number and exit
Examples
$ otp BEXUS3AVCUU7HYU4OZQ44WFXMULPNQB2TKQ4YCNUASPXMPEH6YAZ3IACFM5VEGUQ 770400
Key file ~/.otpkeys
You can save your keys to ~/.otpkeys file using service=key format, for example:
$ cat ~/.otpkeys aws=N5VEJBTUA553BYJTTTUGS3GANKVDECG62RHVIOV2FLYR5THC726ZOIOF4SQZZ5NV google=QYDL7HS7LHPVKX7GGYKYIP3UEYOML2IENWYQD5NHYGETBZIRWWODKQWC3PRNQ3FO facebook=ZBSLA3KGE4PEXCEGIJ57AKJLOHW2S3ABQNOOWZVV3HOO4Q3455BOG6BRNU5M2QK4
Then you can generate OTP, by running:
$ otp {service}
Example:
$ otp aws 443782 $ otp google 760698 $ otp facebook 009176
Auto copy OTP to clipboard (Mac OS X)
Add the following code at the end of your ~/.bashrc file (change path to otp if needed):
otp_func() {
if code=$(/usr/local/bin/otp $1 2>&1); then
printf "%s\n" "$code" | tee /dev/tty | pbcopy
else
printf "%s\n" "$code" >&2
return 1
fi
}
alias otp='otp_func'
Example:
$ vim ~/.bashrc $ source ~/.bashrc $ otp cloud 324982
At this point the above OTP should be in the clipboard.
Metadata
Release files for myotp 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| myotp-1.1.2.tar.gz | 4.3 kB | Without provenance | Details for myotp-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| myotp-1.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for myotp-1.1.2-py2.py3-none-any.whl |
Total release size: 11.8 kB
Release files / myotp-1.1.2.tar.gz
| Download URL | myotp-1.1.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c1c07f4300a15d7e5feae1e0ace8efaecc32af56de0f61dae2ac15ec5277c46
|
|
BLAKE2b-256 checksum How to use checksums |
cb29667ecb3450eefd9acf266d902d13c72c94d32aef504a973726fff2d373ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / myotp-1.1.2-py2.py3-none-any.whl
| Download URL | myotp-1.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8ad5aafc21a3d46fa6233eec115120c60d792d177e84def53a98f8b5a508003e
|
|
BLAKE2b-256 checksum How to use checksums |
24d2dc0225918712b60c753a75f4869b4444754af89c9282b3970695d2ef7115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for myotp 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.