A Python package to restrict the login page of shelly-devices.
Project description
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:
- The Script requires the ips as fourth parameter, each seperated by a comma eg ip1,ip2,...
- When a login page is already restricted you will be prompted to provide the old password
- The Script doesnt work with mdns names, just ip addresses
- 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"}]}
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
Built Distribution
Close
Hashes for shelly-restrict-login-page-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1af65123c3f2d7e8bd861450d8dcefd93ce4ac0ec920c339f3d7e65aa5fcce9d |
|
MD5 | f99ad9d4fafd8fb3e5525c53af0a3e9a |
|
BLAKE2b-256 | fea2910a54666938c7771d07bc8b32abca4121e653494f1167d4b02616c91e88 |
Close
Hashes for shelly_restrict_login_page-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e3beeb0ebfb9b09e2db27c2fa7d30b7e81c8ce96f7bc0a9b2429158529d3b14 |
|
MD5 | a7a22a5dd6b24bf51d9bf8a38687826f |
|
BLAKE2b-256 | acdbd80403bf4908421c56f5eed1513ccc262fa2b6b82d0668b9b2990cade5ed |