vicyan1611 / Gmail-Remote-Control

This is application, which using Gmail to control other PC - with Big Sur theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icon
Remote PC control by email

Program to control remote computer by email.

Table of contents

About the project

Introduction

Program to control remote computer by email, in which:

  • The user (client) sends an email (containing requests to be made by the server) to the server's email (server).
  • The server reads the incoming email, performs the tasks the client sends and sends the results back to the client by replying to the client's email.

Demo

Check out the demo video to see the application in action.

Screenshots

Login

Login page

Login page User have 2 choice to using the program:
  • Without google account, in this option, user can use program in anonymous mode (In this feature, the user has to send and view the response manually, the program only helps the user to write valid commands to the server)
  • Within google account, in this option, user must provide read and send email permission (In this feature, the program will help you to send and view reply email)

Control

Control page

Control page Allow user selects the command to be executed by the server, the program will auto generate email and send to server.

Review

Review page

Review page The application will wait for the server to reply then display the result in the window. User can: See the content of the reply mail See the details of the attached file Download the attached file to the Download folder

Detail information

about us page

About us Show information about the project and the members.

User manual page

User manual Show user manual.

Ribbon bar

Ribbon bar

Ribbon bar The application will wait for the server to reply then display the result in the window. User can:
  • See the content of the reply mail
  • See the details of the attached file
  • Download the attached file to the
  • Download folder

Technology

  • Framework: Flask
  • Backend: Python
  • Frontend: HTML, CSS, JavaScript, Bootstrap 5

Features

Client application: A web GUI app to control remote computer, in which:

  • Login with google account.
  • Send email to server.
  • Get and show reply email from server.
  • View detail and download attached files.

Server application:

  • Key logger: Get keystrokes from keyboard.
  • Shutdown/logout:
    • Shutdown computer.
    • Logout computer.
  • MAC address: Get computer's MAC address.
  • Save screenshot.
  • Capture webcam image.
  • Directory tree:
    • List all files in a directory.
    • Copy files to client computer.
    • Copy files to server computer.
    • Delete files.
  • App process:
    • List processes.
    • List applications.
    • Kill processes.
    • Start applications.
  • Registry:
    • Get registry value.
    • Set registry value.
    • Create registry key.
    • Delete registry key.

Getting start

Prerequisites

  • Python >= 3.10.7

  • Enable IMAP in your server email, see Turn POP & IMAP on or off for users

  • Client environment variables:

    • Environment: add file .env in /Client, .env config:

      • SECRET_KEY: a key used by Flask to encrypt and sign session data.
      • PORT: specify which port the Flask application should listen on.
      • SERVER_EMAIL_ADDRESS: the email address of the server, which is received email from client
      • SERVER_EMAIL_PASSWORD: the password of the server's email

      Example:

      # .env
      SECRET_KEY = "RemoteControlByEmail-HCMUS"
      PORT = 3000
      SERVER_EMAIL_ADDRESS = "server@example.com"
      SERVER_EMAIL_PASSWORD = "server_password"

      Note: If you want to use this example environment, you need to rename it to .env.

    • Credentials: get Gmail API credentials file by Gmail API instruction then add file credentials.json in /Client

      Example:

      // credentials.json
      {
      	"installed": {
      		"client_id": "client_id.apps.googleusercontent.com",
      		"project_id": "gmail-remote-control",
      		"auth_uri": "https://accounts.google.com/o/oauth2/auth",
      		"token_uri": "https://oauth2.googleapis.com/token",
      		"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      		"client_secret": "client_secret",
      		"redirect_uris": ["http://localhost"]
      	}
      }

      Note: If you want to use this example environment, you need to rename it to credentials.json.

Note: The credentials.json file is only used for the first time the user logs in, after that the program will automatically generate a token.json file to store the user's credentials.

Run locally

Clone the project:

git clone https://github.com/HCMUS-Project/Gmail-Remote-Control.git

Go to the project directory:

cd Gmail-Remote-Control

Install dependencies:

pip install -r requirements.txt

Start the server:

python Server/server.py

The server will run on port 5656 and with host 0.0.0.0

Start the client:

python Client/client

The client will run on PORT which define in .env file and with host:

Member

References

Python 3.11 Document Flask document
Youtube - MacOS big sur theme
Gmail API Document
PIL Documentation
Pynput Documentation
Psutil Documentation

About

This is application, which using Gmail to control other PC - with Big Sur theme


Languages

Language:HTML 47.6%Language:Python 46.0%Language:CSS 6.3%