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 or mdns names and restricts the http login with a given username and password
Installation
To install the Script(s) run:
pip install shelly-restrict-login-page
Usage
To use the script run:
- The Script requires the ips as the 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 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f3b155cf028264b9fa17393afbebff8ab52232e38c84a211462f0a7d0e58f75 |
|
MD5 | 999d47def37fd1f307146fe8a13ea816 |
|
BLAKE2b-256 | 7ed10240084e77e8e43bede3dd4605a352299cec00cdd880f1e43be2ab084ec3 |
Close
Hashes for shelly_restrict_login_page-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91f3ea8f4f075873cfd2a220fc27ee1b9dd38aa2064187b4eb4636a277d794b |
|
MD5 | 0b06777da146dc2b74b7a0c22bb5daf6 |
|
BLAKE2b-256 | 8b5bc6a201b6d29e378e6358007b8cdb63700b5488cf2264c376313268db168c |