Update README.md

This commit is contained in:
Deniz Şafak
2023-10-12 00:53:19 +03:00
committed by GitHub
parent 47db815aa9
commit 2a53bd901c
+15 -6
View File
@@ -11,7 +11,7 @@ HotspotAutoLogin is a script that designed to automate the login process for pub
The script will continuously monitor your network connection. When you connect to the specified SSID but there is no internet access, it will attempt to log in automatically. The script will continuously monitor your network connection. When you connect to the specified SSID but there is no internet access, it will attempt to log in automatically.
### Auto Login ### Auto Login
If you are connected to the correct SSID but lack internet access, the script attempts to log in by sending an HTTP POST request to the provided URL with the specified credentials. If the login is successful (HTTP status code 200), the script will continue monitoring. If you are connected to the correct SSID but lack internet access, the script attempts to log in by sending an POST request to the provided URL with the specified credentials. If the login is successful (status code 200), the script will continue monitoring.
### Logging ### Logging
Any important events or actions taken by the script are logged both in a log file (log.txt) and in the log window that can be accessed via the system tray icon. Any important events or actions taken by the script are logged both in a log file (log.txt) and in the log window that can be accessed via the system tray icon.
@@ -19,7 +19,16 @@ Any important events or actions taken by the script are logged both in a log fil
### Configuration ### Configuration
The script reads its configuration from a config.json file. This file contains the necessary information, such as your login credentials, the URL of the authentication portal, the SSID (network name) to which you want to connect, and the frequency of network checks in seconds. The script reads its configuration from a config.json file. This file contains the necessary information, such as your login credentials, the URL of the authentication portal, the SSID (network name) to which you want to connect, and the frequency of network checks in seconds.
## `Usage` ## `Usage`
> [!IMPORTANT]
> ### Python Requirements
> If you are running it **directly with Python**, you need to install this specific library:
> ```
> python -m pip install requests "urllib3<2"
> ```
### Configuration ### Configuration
Edit the config.json file with your specific information, including your login credentials, the portal URL, the SSID of the network you want to connect to, and the check interval in seconds. [Click to learn how to Configure the config.json](#how-to-configure-the-configjson) Edit the config.json file with your specific information, including your login credentials, the portal URL, the SSID of the network you want to connect to, and the check interval in seconds. [Click to learn how to Configure the config.json](#how-to-configure-the-configjson)
@@ -40,7 +49,7 @@ In the "Payload" tab, you can find your form data or request payload that displa
![Example Payload.](/examples/Payload.png) ![Example Payload.](/examples/Payload.png)
`"url":` **DO NOT USE HTTPS, USE HTTP.** This is **NOT** the base URL of the login page. You can find this URL from the same page that you find your payload. It is called "Request URL", in the "Headers" tab. For example: "**http**://site.com/auth" `"url":` This is **NOT** the base URL of the login page. You can find this URL from the same page that you find your payload. It is called "Request URL", in the "Headers" tab.
![Example Request.](/examples/Request.png) ![Example Request.](/examples/Request.png)
`"ssid":` This is your network's SSID. For example "MyHome_5G" `"ssid":` This is your network's SSID. For example "MyHome_5G"
@@ -49,13 +58,13 @@ In the "Payload" tab, you can find your form data or request payload that displa
> ## Example useage: > ## Example useage:
> >
> ![Example config.ini.](/examples/Config.png) > ![Example config.ini.](/examples/config.png)
## Dependencies ## Dependencies
The script uses various Python libraries, including requests for making HTTP requests, pystray for creating the system tray icon, and tkinter for the log window. Make sure you have all the required libraries. The script uses various Python libraries, including requests for making POST requests, pystray for creating the system tray icon, and tkinter for the log window. Make sure you have all the required libraries.
## Notes ## Notes
- The script relies on the assumption that the web portal uses basic HTTP authentication. If the portal uses a more complex login mechanism, additional adjustments may be necessary. - The script relies on the assumption that the web portal uses basic authentication. If the portal uses a more complex login mechanism, additional adjustments may be necessary.
- This script is primarily intended for Windows. Adaptations might be needed for other operating systems. - This script is primarily intended for Windows. Adaptations might be needed for other operating systems.
## Disclaimer ## Disclaimer