Table of Contents
- Introduction ๐
- Features ๐ง
- Requirements ๐
- Getting Started ๐
- Usage ๐
- Sending Messages ๐ฌ
- Controlling PC Actions ๐ฅ๏ธ
- Files ๐
- Security ๐
- Additional Notes ๐
- Disclaimer
โ ๏ธ
ะะปั ััััะบะพะน ะฒะตััะธะธ ะดะพะบัะผะตะฝัะฐัะธะธ, ะฟะพะถะฐะปัะนััะฐ, ะฟะพัะตัะธัะต readme_ru.md.
This project provides a way to control your PC remotely using HTTP requests. You can send messages to display on your PC or trigger actions like shutdown, restart, or opening a URL. This can be useful for a variety of purposes, such as:
- Remotely checking on your PC's status. ๐
- Sending yourself reminders or notes. ๐
- Shutting down or restarting your PC without being physically present. ๐
- Automating tasks or integrating with other services. ๐ค
- Send messages to your PC: Display toast notifications with custom messages from any device capable of sending HTTP POST requests. ๐ฌ
- Control PC actions: Trigger shutdown, restart, or hibernation remotely. โณ
- Customizable: Configure the password, server port, and enable/disable toast notifications. โ๏ธ
- Start on boot: Option to automatically start the server when your PC boots up. ๐
- Apple Shortcut integration: Obtain your local IP address for use with an Apple Shortcut to control your PC from your iPhone. ๐
- Python 3.x: Ensure you have Python 3 installed on your system. ๐
- Required libraries: Install the necessary libraries using the command "pip install -r requirements.txt". The required libraries are:
win11toast
: For displaying toast notifications. ๐ฅณhttp
: For creating the HTTP server. ๐socketserver
: For handling network connections. ๐json
: For working with JSON data. ๐webbrowser
: For opening URLs. ๐colorama
: For colored terminal output (optional, for first-time configuration). ๐จwinreg
: For adding the server to startup (optional). ๐requests
: For network communication (optional, for testing). ๐ก
- Clone the repository: Use the command
git clone https://github.com/Sppqq/PCControl
to download the project files to your PC. ๐ฅ - Install dependencies: Navigate to the project directory and run
pip install -r requirements.txt
to install the required libraries. ๐ฆ - Run the start tray script: Execute
start start_tray.py
to start the server and create a tray icon for control. ๐ฑ๏ธ - Configure settings (First Run):
- You'll be prompted to configure options like:
- Password: Change the default password for security. ๐
- Port: Choose the port on which the server will listen. ๐ก
- Toasts: Enable or disable toast notifications. ๐
- Startup: Add the server to startup for automatic launch on boot. ๐
- Apple Shortcut: Get your local IP address for use with an Apple Shortcut. ๐ฑ
- You'll be prompted to configure options like:
- Start the server: The server will start automatically after configuration or on subsequent runs. ๐
- Prepare the JSON data: Create a JSON object with the following structure:
{
"password": "YOUR_PASSWORD",
"text": "This is the message to display"
}
- Send an HTTP POST request: Use any tool or programming language capable of sending HTTP requests to send a POST request to your server's address (e.g.,
http://localhost:10000/
). ๐ฌ- Make sure to include the JSON data in the request body.
- Receive the message on your PC: If the password is correct, a toast notification will appear on your PC displaying the message. ๐
- Prepare the JSON data: Similar to sending messages, create a JSON object with your password and a specific keyword in the "text" field to trigger an action:
{
"password": "YOUR_PASSWORD",
"text": "shutdown"
}
- Send the HTTP POST request: Send the POST request with the JSON data as described in the previous section. ๐ฌ
- PC performs the action: Depending on the keyword used, your PC will:
shutdown
: Shut down the PC. ๐ฅrestart
: Restart the PC. ๐hb
: Hibernate the PC. ๐คbr
: Open a predefined URL in your web browser (configurable in "server.py"). ๐
- start_tray.py: Starts the server and creates a tray icon for control. ๐ฅ๏ธ
- tray.py: Manages the tray icon and its menu options (currently only "Exit"). โ
- server.py: Implements the core HTTP server functionality and handles incoming requests. โ๏ธ
- stop.py: Provides a way to stop the running server process. ๐
- config.json: Stores the server's configuration settings, including password, port, and toast preferences. ๐
- requirements.txt: Lists the required Python libraries for installation. ๐
- Change the default password! This is crucial to prevent unauthorized access to your PC. ๐
- Use a strong password: Choose a complex password that is difficult to guess. ๐
- Be cautious about exposing your server to the public internet: Only run the server on a trusted network or take additional security measures if exposing it publicly. ๐
- Apple Shortcut Integration: Requires downloading a specific shortcut from the GitHub repository for easy control from your iPhone. here ๐
- Custom URL for
br
command: You can modify the URL opened by the "br" command in the "server.py" file. ๐
Use this project at your own risk. The author is not responsible for any damage or security issues caused by using this software.