semvec/pypi-packages huggingface dataset:
shelly-restrict-login-page 0.0.6
A Python package to restrict the login page of shelly-devices.
License: MIT
Keywords: shelly login shelly-login shelly-restrict-login http http-requests

# 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](Scripts/secure.py)
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](https://github.com/Floplosion05/Shelly/blob/main/README.md#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](https://github.com/Floplosion05/Shelly/blob/main/README.md#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"}]}
```
miniutils 1.0.3
Small Python utilities for adding concise functionality and usability to your code
License: MIT
Requires Python: >=3
Keywords: miniutils,utilities,decorators,minimal

.. image:: https://coveralls.io/repos/github/scnerd/miniutils/badge.svg?branch=master
    :target: https://coveralls.io/github/scnerd/miniutils?branch=master

.. image:: https://travis-ci.org/scnerd/miniutils.svg?branch=master
    :target: https://travis-ci.org/scnerd/miniutils

.. image:: https://readthedocs.org/projects/miniutils/badge/?version=latest
    :target: http://miniutils.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

Overview
--------

Full documentation for this module is available over at `ReadTheDocs <http://miniutils.readthedocs.io/>`_.

This module provides numerous helper utilities for Python3.X code to add functionality with minimal code footprint. It has tools for the following tasks:

- Progress bars on serial loops and parallel mappings (leveraging the excellent ``tqdm`` library)
- Simple lazy-compute and caching of class properties, including dependency chaining
- Executing Python2 code from within a Python3 program
- More intuitive contract decorator (leveraging ``pycontracts``)

Installation
------------

As usual, you can install the latest code version directly from Github::

    pip install git+https://github.com/scnerd/miniutils

Or you can ``pip`` install the latest release from PyPi::

   pip install miniutils

Examples
--------

To get started, you can import your desired utilities directly from ``miniutils``. For example, to use the ``CachedProperty`` decorator::

   from miniutils import CachedProperty

   class MyClass:
      @CachedProperty
      def attribute(self):
         return some_slow_computation(self)

Or to use the progress bar utilities::

   from miniutils import progbar, parallel_progbar

   def mapper(x):
      return x**2

   assert [mapper(i) for i in progbar(100)] == parallel_progbar(mapper, range(100))

To see documentation for each feature, look through this documentation or the table of contents above.