Skip to main content

At the moment this Script is nowhere near being complete, use at your own risk!

Shelly

Stuff based around the beautifull small electronic devices from Allterco

Auto-Restrict-Login

This Script queries trough a given number of ips and restricts the http login with a given username and password

Installation

To install the Script(s) run:

pip install shelly-restrict-login-page==0.0.4
Usage

To use the script run:

  1. The Script requires the ips as fourth parameter, each seperated by a comma eg ip1,ip2,...
  2. When a login page is already restricted you will be prompted to provide the old password
  3. The Script doesnt work with mdns names, just ip addresses
  4. The Script will automatically generate a file called Shelly.json in the same directory as the script, to store the last username and the hash of the last password.
python3 secure.py [mode] [username] [password] [ip1,ip2]
  mode  enable/disable
Error-Codes
  • 0: Failed to load Shelly.json, check the directory and path. (The script cant find the Credentials-File)
  • 1: Wrong password entered. (The provided password doesnt match with the saved hash)
  • 2: Right hash found but wrong password provided. (The entered password matches the saved hash, but not the actual password on the login page)
  • 3: Found Shelly.json, but didnt find entry for this device. (The script found the Credentials-File, but the restricted login was never enabled with this script)
Credentials-File

The Credentials-File (Shellys.json) is generated and then located in the same directory as the script. The structure is:

{"devices": [{"ip": "192.168.xxx.xxx", "username": "test", "password": "$pbkdf2-sha256$30000$yZnzPqc0Rqi1NibEeM.5Fw$QZ0sk1Z6K4LMt3UM3AGrrKLk9jBOjwrXsY1psfAPY4Q"}, {"ip": "192.168.xxx.xxx", "username": "test", "password": "$pbkdf2-sha256$30000$yZnzPqc0Rqi1NibEeM.5Fw$QZ0sk1Z6K4LMt3UM3AGrrKLk9jBOjwrXsY1psfAPY4Q"}]}

Metadata

Release files for shelly-restrict-login-page 0.0.6

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

Source distribution (sdist)

Source distribution for shelly-restrict-login-page 0.0.6
File Size Uploaded Provenance Actions
shelly-restrict-login-page-0.0.6.tar.gz 4.6 kB Without provenance Details for shelly-restrict-login-page-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shelly-restrict-login-page 0.0.6
File Interpreter ABI Platform Actions
shelly_restrict_login_page-0.0.6-py3-none-any.whl Python 3 none any Details for shelly_restrict_login_page-0.0.6-py3-none-any.whl

Total release size: 10.0 kB

Release files / shelly-restrict-login-page-0.0.6.tar.gz

Download URL shelly-restrict-login-page-0.0.6.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
88854097ed64b993203fd14e3939d094686834fa33ae6fa8ffc59f926fec74d8
BLAKE2b-256 checksum
How to use checksums
6ed1df4e86673378a466583daee88a0331b26923dc9e8a27612af3b4d6cace01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.2

Release files / shelly_restrict_login_page-0.0.6-py3-none-any.whl

Download URL shelly_restrict_login_page-0.0.6-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bae86f6e350ba07b1fabde7fe2255b4f51195fbd9d9668956acba0ecaf65c572
BLAKE2b-256 checksum
How to use checksums
681b37184c19648cb6631f3646aa22f109d9f484958bdbc705f7852d6b616425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.2

Security for shelly-restrict-login-page 0.0.6

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