Skip to content

๐Ÿ’ป A program for remote computers control in a local network. Sending messages, turning off, rebooting and other functions.

Notifications You must be signed in to change notification settings

Sppqq/PCControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PC Control Server - README

Table of Contents

ะ ัƒััะบะฐั ะฒะตั€ัะธั

ะ”ะปั ั€ัƒััะบะพะน ะฒะตั€ัะธะธ ะดะพะบัƒะผะตะฝั‚ะฐั†ะธะธ, ะฟะพะถะฐะปัƒะนัั‚ะฐ, ะฟะพัะตั‚ะธั‚ะต readme_ru.md.

Introduction

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. ๐Ÿค–

Features

  • 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. ๐Ÿ

Requirements

  • 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). ๐Ÿ“ก

Getting Started

  1. Clone the repository: Use the command git clone https://github.com/Sppqq/PCControl to download the project files to your PC. ๐Ÿ“ฅ
  2. Install dependencies: Navigate to the project directory and run pip install -r requirements.txt to install the required libraries. ๐Ÿ“ฆ
  3. Run the start tray script: Execute start start_tray.py to start the server and create a tray icon for control. ๐Ÿ–ฑ๏ธ
  4. 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. ๐Ÿ“ฑ
  5. Start the server: The server will start automatically after configuration or on subsequent runs. ๐Ÿ

Usage

Sending Messages

  1. Prepare the JSON data: Create a JSON object with the following structure:
{
    "password": "YOUR_PASSWORD",
    "text": "This is the message to display"
}
  1. 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.
  2. Receive the message on your PC: If the password is correct, a toast notification will appear on your PC displaying the message. ๐ŸŽ‰

Controlling PC Actions

  1. 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"
}
  1. Send the HTTP POST request: Send the POST request with the JSON data as described in the previous section. ๐Ÿ“ฌ
  2. 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"). ๐ŸŒ

Files

  • 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. ๐Ÿ“œ

Security

  • 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. ๐ŸŒ

Additional Notes

  • 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. ๐ŸŒ

Disclaimer

Use this project at your own risk. The author is not responsible for any damage or security issues caused by using this software. โš ๏ธ

About

๐Ÿ’ป A program for remote computers control in a local network. Sending messages, turning off, rebooting and other functions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages