Skip to main content

cpotp

PyPI

Command line tool to copy the latest OTP received in the connected Android device to the clipboard.

Why?

Simply because I don't want to pickup my phone, open the SMS app, remember the OTP, and then enter it.

Now you might say, haven't you heard about https://messages.google.com? Well, that's what is being used in the package. Selenium Chrome driver automates this process.

Prerequisite

Installation

Install cpotp

cpotp can be installed using pip

pip install cpotp

or install it from the source

git clone https://github.com/riteshpanjwani/cpotp.git
cd cpotp
python setup.py install

Install xclip (Linux only)

If you are using any fairly recent Debian Linux-based OS:

sudo apt install xclip

else, you can install it directly from the source:

git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
make install

Verify that it installed:

man xclip

Set an environment variable

Next, you need to set an environment variable called CHROME_USER_DATA_DIR, in Chrome/Edge/Chromium browser new tab

chrome://version

and set this environment variable to path given in "Profile Path" except the "/Default" part. For example:

export CHROME_USER_DATA_DIR=/home/<username>/.config/google-chrome

Selenium will create a Chrome user profile called "cpotp" in this directory.

Usage

Note: the following command downloads the following files on the first run:

On the first run, scan the QR code using your Messages app on the phone and pair it. Close any instance of https://messages.google.com and fire up a terminal / command prompt and run:

cpotp-setup

On subsequent runs, you just have to run:

cpotp

License

For license information, see LICENSE.md.

Metadata

Release files for cpotp 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cpotp 0.0.8
File Size Uploaded Provenance Actions
cpotp-0.0.8.tar.gz 4.7 kB Without provenance Details for cpotp-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cpotp 0.0.8
File Interpreter ABI Platform Actions
cpotp-0.0.8-py3-none-any.whl Python 3 none any Details for cpotp-0.0.8-py3-none-any.whl

Total release size: 13.7 kB

Release files / cpotp-0.0.8.tar.gz

Download URL cpotp-0.0.8.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e89fbaa5269100dae3ecd037d055a3e4c43bb87841204ad32d27df0705ed5645
BLAKE2b-256 checksum
How to use checksums
4d29dcf0e2538a236110ac650014021a25f4f85ead080e65c83dd8817da9cf47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Release files / cpotp-0.0.8-py3-none-any.whl

Download URL cpotp-0.0.8-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c742eec722d5b2ab6303dbe58c4fc8165545d78f55f7bf110148c0f949f59746
BLAKE2b-256 checksum
How to use checksums
6f105d6fe7788ce6308c77116d029f8bab2c153e6ba793d9935239a26be99a05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Security for cpotp 0.0.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page