Skip to main content

pypotd

Python library to generate an ARRIS/Commscope-compatible password of the day. Inspired by arrispwgen.

The original author essentially reverse-engineered the algorithm after poking modems. Thank you so much @borfast for this incredible work. I ran into a few niche issues based on my needs/specific seed that I hope this project will rectify.

First, the upstream project seems to lock you to a seed between 8-10 characters. The original ARRIS/Commscope tooling to generate these passwords actually only allows seeds between 4-8 characters. (I find this strange, considering that the default ARRIS/Commscope seed is 10 characters in length)

Second, if you supply a seed of less than 10 characters, the upstream project will present a password of the same number of characters. So an 8 character seed will yield the correct first 8 characters of the password, but will not provide the full password.

Third, if you supply a seed of less than 8 characters, the upstream project does not appear to output anything at all. The way ARRIS/Commscope handles the seeds is to iterate through the seed, appending each character to the end of the supplied seed. For example, a seed of "ABCD" is a valid seed, however in effect it will become "ABCDABCDAB".

Fourth, as much as I would love to contribute upstream fixes rather than a fork/port, the upstream project was written in TypeScript and packaged via NPM. I do not have experience with either of these technologies, and as such a port became much more viable.

Installing

pip install pypotd

Usage

Single date

The generate() function accepts two optional keyword arguments.

  • date: Accepts a single date in ISO format (i.e., 2021-07-23)
  • seed: Accepts a seed between 4 and 8 characters

If no arguments are given, the current date and default seed are used.

Using defaults (current date, ARRIS/Commscope default seed)

from pypotd import generate

generate()

Output (Assuming date is 2023-09-23): 4503603RL6

Using custom date, custom seed

from pypotd import generate

generate(date="2023-09-23", seed="ABCDABCD")

Output: AYGLYLIF4L

Range of dates

The generate_multiple() function takes a start and end date, as well as an optional seed.

Using default seed

from json import dumps
from pypotd import generate_multiple

potd_dict = generate_multiple(start_date="2023-09-23", end_date="2024-09-22")
print(dumps(potd_dict), indent=2)

Output (truncated):

{
  "09/23/23": "4503603RL6",
  "09/24/23": "ZOU3MA9ZM5",
  "09/25/23": "L776USZKFV",
  ...
}

Using custom seed

from json import dumps
from pypotd import generate_multiple

potd_dict = generate_multiple(
    start_date="2023-09-23",
    end_date="2024-09-22",
    seed="ABCDABCD")
print(dumps(potd_dict, indent=2))

Output (truncated):

{
  "09/23/23": "AYGLYLIF4L",
  "09/24/23": "BXBL4119CV",
  "09/25/23": "13EW9BEY5O",
  ...
}

Generating a DES Key for modem configs

Despite the fact that ARRIS/CommScope tools limit seed length to between 4 and 8 characters, the default seed they provide is 10 characters. This does not fit neatly into the 8 byte block size of our DES cipher. I was not able to determine what mutations they make to the default seed to return 8 byte values, so the DES value for their default seed is provided as a hardcoded fallback.

from pypotd import seed_to_des

seed_to_des(seed="ABCDABCD")

Output:

'19.A2.3B.2A.F0.A0.F6.15'

License

This project is a fork and language port of a project made by another individual, whose work was partially aided by reverse engineering. Because of this, I have decided to leave the project unlicensed.

Metadata

Release files for pypotd 0.3

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

Source distribution (sdist)

Source distribution for pypotd 0.3
File Size Uploaded
pypotd-0.3.tar.gz 4.6 kB Details

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / pypotd-0.3.tar.gz

Download URL pypotd-0.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
08e6aadb520fe11d78148e8633f5c37b9dd4e82eebcc2f89a2cd7ad008e1741b
BLAKE2b-256 checksum
How to use checksums
7c6b63a62ed692aea6a94acbcb5804d56bb53c42514af2f866cfad1777f7255b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / pypotd-0.3-py3-none-any.whl

Download URL pypotd-0.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8be29d08f7981939106bd1cff6b9b2240104def10976425ad0fc6f960796f2ed
BLAKE2b-256 checksum
How to use checksums
7e8b6dfc7765b4a32ceeb3a16f12d4adb6b5ed5be3babc023ed3369b09c1140f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

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