{"id":24838265,"url":"https://github.com/duckymomo20012/email-remote-access","last_synced_at":"2026-05-10T03:37:03.818Z","repository":{"id":152656811,"uuid":"602384849","full_name":"DuckyMomo20012/email-remote-access","owner":"DuckyMomo20012","description":"Control remote computers using email","archived":false,"fork":false,"pushed_at":"2024-07-09T01:56:53.000Z","size":2152,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:09:56.634Z","etag":null,"topics":["dearpygui","fastapi","gmail-api","google-auth-oauthlib","python-socketio","socket-io","uvicorn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DuckyMomo20012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-16T04:57:51.000Z","updated_at":"2024-09-07T02:40:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ae4d95a-6317-494f-b313-a5060509ecba","html_url":"https://github.com/DuckyMomo20012/email-remote-access","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"DuckyMomo20012/python-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Femail-remote-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Femail-remote-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Femail-remote-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Femail-remote-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DuckyMomo20012","download_url":"https://codeload.github.com/DuckyMomo20012/email-remote-access/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585810,"owners_count":20639671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dearpygui","fastapi","gmail-api","google-auth-oauthlib","python-socketio","socket-io","uvicorn"],"created_at":"2025-01-31T06:10:03.551Z","updated_at":"2026-05-10T03:36:58.779Z","avatar_url":"https://github.com/DuckyMomo20012.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"https://user-images.githubusercontent.com/64480713/235120521-91065016-94a6-4d76-9514-7be3bf5f877c.svg\" alt=\"logo\" width=\"200\" height=\"auto\" /\u003e\n  \u003ch1\u003eEmail Remote Access\u003c/h1\u003e\n\n  \u003cp\u003e\n    Control remote computer using email\n  \u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/graphs/contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/DuckyMomo20012/email-remote-access\" alt=\"contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/DuckyMomo20012/email-remote-access\" alt=\"last update\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/network/members\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/DuckyMomo20012/email-remote-access\" alt=\"forks\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/DuckyMomo20012/email-remote-access\" alt=\"stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/issues/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/DuckyMomo20012/email-remote-access\" alt=\"open issues\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/DuckyMomo20012/email-remote-access.svg\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/\"\u003eView Demo\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access\"\u003eDocumentation\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/issues/\"\u003eReport Bug\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/email-remote-access/issues/\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/h4\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003c!-- Table of Contents --\u003e\n\n# :notebook_with_decorative_cover: Table of Contents\n\n- [About the Project](#star2-about-the-project)\n  - [Screenshots](#camera-screenshots)\n  - [Tech Stack](#space_invader-tech-stack)\n  - [Features](#dart-features)\n  - [Environment Variables](#key-environment-variables)\n- [Getting Started](#toolbox-getting-started)\n  - [Prerequisites](#bangbang-prerequisites)\n  - [Run Locally](#running-run-locally)\n- [Usage](#eyes-usage)\n  - [Server](#server)\n  - [Server App](#server-app)\n  - [Client App](#client-app)\n  - [Mail App](#mail-app)\n    - [Authorize the app](#authorize-the-app)\n    - [Connect to the server](#connect-to-the-server)\n    - [Send mail](#send-mail)\n    - [Instruction format](#instruction-format)\n    - [Supported instructions](#supported-instructions)\n    - [Fetch mail](#fetch-mail)\n    - [Execute instructions](#execute-instructions)\n  - [Mail Server](#mail-server)\n    - [Authorization](#authorization)\n    - [Connect to the server](#connect-to-the-server-1)\n    - [Fetch mail](#fetch-mail-1)\n    - [Execute instructions](#execute-instructions-1)\n  - [Dear PyGui Demo](#dear-pygui-demo)\n  - [CLI](#cli)\n- [Roadmap](#compass-roadmap)\n- [Contributing](#wave-contributing)\n  - [Code of Conduct](#scroll-code-of-conduct)\n- [FAQ](#grey_question-faq)\n- [License](#warning-license)\n- [Contact](#handshake-contact)\n- [Acknowledgements](#gem-acknowledgements)\n\n\u003c!-- About the Project --\u003e\n\n## :star2: About the Project\n\n\u003c!-- Screenshots --\u003e\n\n### :camera: Screenshots\n\n- Server App:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/64480713/234619906-c093e3a7-d396-4e17-93ab-75bc9fe4e52c.png\" alt=\"server_app_screenshot\" /\u003e\n\u003c/div\u003e\n\n- Client App:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/DuckyMomo20012/email-remote-access/assets/64480713/1dd8b44c-5d75-47d6-a951-dab379617463\" alt=\"client_app_live_screenshot\" /\u003e\n  \u003cimg src=\"https://github.com/DuckyMomo20012/email-remote-access/assets/64480713/f54f7cc5-95d7-4160-b204-e86bbb609e14\" alt=\"client_app_reg_screenshot\" /\u003e\n  \u003cimg src=\"https://github.com/DuckyMomo20012/email-remote-access/assets/64480713/3cb42753-f410-4c1f-81c7-f22dfdfb7089\" alt=\"client_app_list_dir_screenshot\" /\u003e\n  \u003cimg src=\"https://github.com/DuckyMomo20012/email-remote-access/assets/64480713/7b4577d9-0ac9-437c-a04a-a2a34d0b8217\" alt=\"client_app_list_proc_screenshot\" /\u003e\n\u003c/div\u003e\n\n- Mail App:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/64480713/235119738-5e3ebee9-9335-48b9-8e0c-16338f281477.png\" alt=\"mail_app_screenshot\" /\u003e\n\u003c/div\u003e\n\n\u003c!-- TechStack --\u003e\n\n### :space_invader: Tech Stack\n\n\u003cdetails\u003e\n  \u003csummary\u003eClient\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://www.python.org/\"\u003ePython\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://python-socketio.readthedocs.io/en/latest/index.html\"\u003eSocketIO\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://docs.python.org/3/library/tkinter.html\"\u003eTkinter\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://dearpygui.readthedocs.io/en/latest/\"\u003eDear PyGui\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eServer\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://www.python.org/\"\u003ePython\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://python-socketio.readthedocs.io/en/latest/index.html\"\u003eSocketIO\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://fastapi.tiangolo.com/\"\u003eFastAPI\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://www.uvicorn.org/\"\u003euvicorn\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/details\u003e\n\n\u003c!-- Features --\u003e\n\n### :dart: Features\n\n- **Client App:** A simple GUI app to control a remote computer\n\n  - Linux support.\n  - Shutdown/logout:\n    - [x] Shutdown computer.\n    - [x] Logout computer.\n  - MAC address:\n    - [x] Get the computer's MAC address.\n  - Live screen:\n    - [x] Live stream computer's screen.\n    - [x] Save the screenshot.\n  - Directory:\n    - [x] List all files in a directory.\n    - [x] Copy files to the client computer.\n    - [x] Copy files to the server computer.\n    - [x] Delete files.\n  - App process:\n    - [x] List all processes.\n    - [x] List applications.\n    - [x] Kill processes.\n  - Registry:\n    - [x] Create a registry key.\n    - [x] Delete registry key.\n    - [x] Get registry value.\n    - [x] Set registry value.\n\n- **Mail App:** A simple GUI app to control a remote computer using email\n\n  - Shutdown/logout:\n    - [x] Shutdown computer.\n    - [x] Logout computer.\n  - MAC address:\n    - [x] Get the computer's MAC address.\n  - Live screen:\n    - [ ] Live stream computer's screen. (Won't do)\n    - [x] Save the screenshot.\n  - Directory:\n    - [x] List all files in a directory.\n    - [x] Copy files to the client computer.\n    - [x] Copy files to the server computer.\n    - [x] Delete files.\n  - App process:\n    - [x] List all processes.\n    - [x] List applications.\n    - [x] Kill processes.\n  - Registry:\n    - [x] Create a registry key.\n    - [x] Delete registry key.\n    - [x] Get registry value.\n    - [x] Set registry value.\n\n\u003c!-- Env Variables --\u003e\n\n### :key: Environment Variables\n\nTo run this project, you will need to add the following environment variables to\nyour `.env` file:\n\n- **App configs:**\n\n  `TEST_VAR`: Description of this environment variable.\n\nE.g:\n\n```\n# .env\nTEST_VAR=\"my secret key\"\n```\n\nYou can also check out the file `.env.example` to see all required environment\nvariables.\n\n\u003c!-- Getting Started --\u003e\n\n## :toolbox: Getting Started\n\n\u003c!-- Prerequisites --\u003e\n\n### :bangbang: Prerequisites\n\n- Python: `\u003e= 3.12`.\n\n- This project uses [Poetry](https://python-poetry.org/) as package manager:\n\n  Linux, macOS, Windows (WSL)\n\n  ```bash\n  curl -sSL https://install.python-poetry.org | python3 -\n  ```\n\n  Read more about installation on\n  [Poetry documentation](https://python-poetry.org/docs/master/#installation).\n\n\u003c!-- Run Locally --\u003e\n\n### :running: Run Locally\n\nClone the project:\n\n```bash\ngit clone https://github.com/DuckyMomo20012/email-remote-access.git\n```\n\nGo to the project directory:\n\n```bash\ncd email-remote-access\n```\n\nInstall dependencies:\n\n```bash\npoetry install\n\npre-commit install\n```\n\nOR:\n\nInstall dependencies with `pip`:\n\n```bash\npip install -r requirements.txt\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eExport dependencies from \u003c/code\u003epyproject.toml\u003c/code\u003e\u003c/summary\u003e\n\nExport Poetry dependencies to file `requirements.txt`:\n\n```bash\npoetry export -f requirements.txt --output requirements.txt\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e You can add option: `--dev` to include development dependencies.\n\n\u003c/details\u003e\n\n---\n\nActivate the virtual environment:\n\n```bash\npoetry shell\n```\n\nStart the program:\n\n- **Server App:**\n\n  ```bash\n  poe dev\n  ```\n\n  OR\n\n  ```bash\n  poe dev server\n  ```\n\n- **Client App:**\n\n  ```bash\n  poe dev client\n  ```\n\n- **Mail App:**\n\n  ```bash\n  poe dev mail\n  ```\n\n- **Mail Server:**\n\n  ```bash\n  poe dev server:mail\n  ```\n\n- **Dear PyGui Demo:**\n\n  ```bash\n  poe demo\n  ```\n\n\u003c!-- Usage --\u003e\n\n## :eyes: Usage\n\n### Server:\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\nYou will have to start the server manually by running the\n`src/server/server.py`:\n\n```bash\npython src/server/server.py\n```\n\nThis will start an `uvicorn` server with port `5656` and with host `0.0.0.0`,\nwhich is **the IP address of your local machine**.\n\n### Server App\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\nThis app allows you to start and stop the [Server](#server) manually.\n\nRun the server:\n\n```bash\npoe dev\n```\n\nOR\n\n```bash\npoe dev server\n```\n\nAfter the app starts, you will have to start the server manually by clicking the\n`Start server` button.\n\nThe app will start the server from [Server](#server). The server still runs with\nport `5656` and with host `0.0.0.0`, which is the IP address of your local\nmachine.\n\nTo stop the server, click the `Stop server` button.\n\n\u003cdetails\u003e\n\u003csummary\u003eBehind the scene\u003c/summary\u003e\n\nWhen you click the `Start server` button, the app will start an `uvicorn` server\nin **different process**, and store the process ID for later use.\n\nWhen you click the `Stop server` button, the app will find child processes from\nthe parent process the ID stored before and kill it, then terminate the parent\nprocess.\n\n\u003c/details\u003e\n\n### Client App\n\nThis app will connect to the server and allow you to control the server machine\nwith supported commands.\n\nRun the client app:\n\n```bash\npoe dev client\n```\n\nConnect to the server by entering the server's IP address and port:\n\n- **IP address:** The IP address of your server machine.\n- **Port:** `5656`.\n\n### Mail App\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\nThis app will connect to the server and allow you to control the server machine\nby running commands sent from email.\n\n\u003e [!NOTE]\n\u003e\n\u003e To use this app, you need to provide the `credentials.json` file in the root\n\u003e directory. Please follow the instructions on the page:\n\u003e [**Python quickstart**](https://developers.google.com/gmail/api/quickstart/python)\n\u003e to create your own App and download the `credentials.json` file.\n\nRun the mail app:\n\n```bash\npoe dev mail\n```\n\n#### Authorize the app\n\nIf this is the first time you run the app, you will be asked to authorize the\napp. The app will open a browser window and ask you to log in to your Google\naccount.\n\nAfter you log in, you will be asked to give the app permissions:\n\n- **Read all resources and their metadata—no write operations.**\n- **Send messages only. No read or modify privileges on mailbox.**\n\nThe token will be saved in the file `token.json` in the root directory of the\nproject.\n\n\u003e [!WARNING]\n\u003e\n\u003e The file `credentials.json` and `token.json` are **sensitive files**, **DO\n\u003e NOT** share them with anyone.\n\n#### Connect to the server\n\nConnect to the server by entering the server's IP address and port:\n\n- **IP address:** The IP address of your server machine.\n- **Port:** `5656`.\n\nThe `Server` or `Server App` should be running before you run the `Mail App` to\naccept the connection.\n\n#### Send mail\n\nYou can send an email to the address you logged in to the app. The instruction\nin the email MUST follow the [instruction format](#instruction-format).\n\n**Kitchen sink example**\n\n```\n(shutdown:)(logout)\n(sys_info)\n(screenshot)\n(list_directory:C:\\Users\\VINH\\Desktop)\n(list_process:)\n(list_application)\n(kill_process:1234)\n(copy_file_to_server:C:\\Users\\VINH\\Desktop\\cli.py;C:\\Users\\VINH\\Desktop\\foo\\)\n(copy_file_to_client:C:\\Users\\VINH\\Desktop\\cli.py;C:\\Users\\VINH\\Desktop\\bar\\)\n(delete_file:C:\\Users\\VINH\\Desktop\\tmp.txt)\n(create_registry_key:HKEY_CURRENT_USER\\Software\\MyKey)\n(set_registry_value:HKEY_CURRENT_USER\\Software\\MyKey;foo;bar;REG_SZ)\n(set_registry_value:HKEY_CURRENT_USER\\Software\\MyKey;foo;foo\\nbar\\nbaz;REG_MULTI_SZ)\n(get_registry_value:HKEY_CURRENT_USER\\Software\\MyKey;foo)\n(delete_registry_key:HKEY_CURRENT_USER\\Software\\MyKey)\n```\n\n#### Instruction format\n\nThe instruction in the email MUST follow the format:\n\n\u003e [!NOTE]\n\u003e\n\u003e Each `instruction` doesn't have to be on a separate line.\n\n```\n\u003cautoRun\u003e(\u003ctype\u003e:\u003coptions\u003e)\n```\n\n- `autoRun`: Whether to run the command automatically after receiving the email.\n  The allowed values are `#`.\n\n  - If the value is `#`, the command will be executed automatically.\n  - If the value is `!`, the command will **NOT** be executed automatically on\n    the **Mail server**.\n  - If the value is empty, the command will be executed when you click the `Run`\n    button.\n\n  \u003e **Note**: The `#` character must be exactly before the `(` character.\n\n- `type`: The type of command to execute. The type is **case-sensitive**. For\n  the list of supported commands, see\n  [Supported instructions](#supported-instructions).\n\n- `options`: The options of the command. The options are separated by `;`. The\n  allowed characters are alphanumeric characters, `\\`, `:`, `;`, and `.`.\n  Currently, **not support multiline options**.\n\n  \u003e **Note**: The `options` is optional and can be omitted.\n\nE.g.:\n\n```\n#(command) # run automatically\n# (command) # not a valid instruction\n!(command) # not run automatically\n! (command) # not a valid instruction\n\n(command) # without options\n(command:option1;option2) # with multiple options\n(command1:) # with an empty option\n(command1:)(command2) # multiple instructions on the same line\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eRegex pattern\u003c/summary\u003e\n\nThe regex pattern is defined in the file `src/shared/mail_processing/utils.py`:\n\n```python\ncmdPattern = \"|\".join(DEFAULT_COMMANDS)\npattern = (\n    rf\"(?P\u003cautoRun\u003e#)?\\((?P\u003ctype\u003e{cmdPattern})(?:\\:(?P\u003coptions\u003e[\\w\\\\:;\\.]*))?\\)\"\n)\n```\n\n\u003c/details\u003e\n\n#### Supported instructions\n\n- `shutdown`: Shut down the server machine.\n\n  - **Instruction**:\n\n    ```\n    (shutdown)\n    ```\n\n  - Example:\n\n    ```\n    (shutdown)\n    ```\n\n- `logout`: Log out the current user.\n\n  - **Instruction**:\n\n    ```\n    (logout)\n    ```\n\n  - Example:\n\n    ```\n    (logout)\n    ```\n\n- `sys_info`: Get information of the server machine (MAC address, CPU, RAM).\n\n  - **Instruction**:\n\n    ```\n    (sys_info)\n    ```\n\n  - Example:\n\n    ```\n    (sys_info)\n    ```\n\n- `screenshot`: Take a screenshot of the server machine.\n\n  - **Instruction**:\n\n    ```\n    (screenshot)\n    ```\n\n  - Example:\n\n    ```\n    (screenshot)\n    ```\n\n- `list_directory`: List directories and files in the given path.\n\n  - **Instruction**:\n\n    ```\n    (list_directory:\u003cpath\u003e)\n    ```\n\n    - `path`: The path to the list.\n\n  - Example:\n\n    ```\n    (list_directory:C:\\Users\\Alice\\Desktop)\n    ```\n\n- `copy_file_to_server`: Copy a file from the client machine to the server\n  machine.\n\n  - **Instruction**:\n\n    ```\n    (copy_file_to_server:\u003csrcPath\u003e;\u003cdestPath\u003e)\n    ```\n\n    - `srcPath`: The path to the file on the client machine.\n    - `destPath`: The **directory** path to the file on the server machine.\n\n      \u003e **Note**: The file name from `srcPath` will be appended to the\n      \u003e `destPath`.\n\n  - Example:\n\n    ```\n    (copy_file_to_server:C:\\Users\\Alice\\Desktop\\test.txt;C:\\Users\\Alice\\Desktop\\)\n    ```\n\n    This will copy the file `test.txt` from the client machine to the directory\n    `C:\\Users\\Alice\\Desktop\\` on the server machine. The final path of the file\n    is: `C:\\Users\\Alice\\Desktop\\test.txt`.\n\n\u003e [!WARNING]\n\u003e\n\u003e The file size **MUST** be **less than 1MB**.\n\n- `copy_file_to_client`: Copy a file from the server machine to the client\n  machine.\n\n  - **Instruction**:\n\n    ```\n    (copy_file_to_client:\u003csrcPath\u003e;\u003cdestPath\u003e)\n    ```\n\n    - `srcPath`: The path to the file on the server machine.\n    - `destPath`: The **directory** path to the file on the client machine.\n\n      \u003e **Note**: The file name from `srcPath` will be appended to the\n      \u003e `destPath`.\n\n  - Example:\n\n    ```\n    (copy_file_to_client:C:\\Users\\Alice\\Desktop\\test.txt;C:\\Users\\Alice\\Desktop\\)\n    ```\n\n    This will copy the file `test.txt` from the server machine to the directory\n    `C:\\Users\\Alice\\Desktop\\` on the client machine. The final path of the file\n    is: `C:\\Users\\Alice\\Desktop\\test.txt`.\n\n\u003e [!WARNING]\n\u003e\n\u003e The file size **MUST** be **less than 1MB**.\n\n- `delete_file`: Delete a file on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (delete_file:\u003cpath\u003e)\n    ```\n\n    - `path`: The path to the file on the server machine.\n\n  - Example:\n\n    ```\n    (delete_file:C:\\Users\\Alice\\Desktop\\test.txt)\n    ```\n\n- `list_process`: List all the processes on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (list_process)\n    ```\n\n  - Example:\n\n    ```\n    (list_process)\n    ```\n\n- `list_application`: List all the applications on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (list_application)\n    ```\n\n  - Example:\n\n    ```\n    (list_application)\n    ```\n\n- `kill_process`: Kill a process on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (kill_process:\u003cpid\u003e)\n    ```\n\n    - `pid`: The process ID of the process to kill.\n\n  - Example:\n\n    ```\n    (kill_process:1234)\n    ```\n\n- `create_registry_key`: Create a registry key on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (create_registry_key:\u003ckeyPath\u003e)\n    ```\n\n    - `keyPath`: The key path to create.\n\n  - Example:\n\n    ```\n    (create_registry_key:HKEY_CURRENT_USER\\Software\\MyKey)\n    ```\n\n- `delete_registry_key`: Delete a registry key on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (delete_registry_key:\u003ckeyPath\u003e)\n    ```\n\n    - `keyPath`: The key path to delete.\n\n  - Example:\n\n    ```\n    (delete_registry_key:HKEY_CURRENT_USER\\Software\\MyKey)\n    ```\n\n- `set_registry_value`: Set a registry value on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (set_registry_value:\u003ckeyPath\u003e;\u003cvalueName\u003e;\u003cvalueData\u003e;\u003cvalueType\u003e)\n    ```\n\n    - `keyPath`: The key path to set the value.\n    - `valueName`: The name of the value to set.\n    - `valueData`: The data of the value to set.\n    - `valueType`: The type of the value to set. The value type is\n      **case-sensitive**.\n\n      - The supported value types are:\n\n        - `REG_SZ`.\n        - `REG_BINARY`.\n        - `REG_DWORD`.\n        - `REG_QWORD`.\n        - `REG_EXPAND_SZ`.\n\n          \u003e **Note**: `server` does support expand variables but the client app\n          \u003e and mail app don't.\n\n        - `REG_MULTI_SZ`. Use `\\n` to separate the values. E.g. `foo\\nbar`.\n\n  - Example:\n\n    ```\n    (set_registry_value:HKEY_CURRENT_USER\\Software\\MyKey;MyValue;Hello;REG_SZ)\n    ```\n\n- `get_registry_value`: Get a registry value on the server machine.\n\n  - **Instruction**:\n\n    ```\n    (get_registry_value:\u003ckeyPath\u003e;\u003cvalueName\u003e)\n    ```\n\n    - `keyPath`: The key path to get the value.\n    - `valueName`: The name of the value to get.\n\n  - Example:\n\n    ```\n    (set_registry_value:HKEY_CURRENT_USER\\Software\\MyKey;MyValue)\n    ```\n\n#### Fetch mail:\n\nBy default, the app will fetch `5` latest emails from the `INBOX` label of the\nemail account.\n\n- You can change the number of emails to change the `Last mails` dropdown.\n\n- You can change the label to fetch emails from the `Label` dropdown. User's\n  labels are not supported.\n\nIf you want to refresh the email list, you can click the `Refresh` button in the\n`Actions` tab.\n\nWhen parsing the email, the app will try to get as much text from the email body\nas possible. The text will be parsed as instructions.\n\n- When parsing the instruction, the app will remove duplicate instructions.\n\n#### Execute instructions\n\nYou can execute instructions by clicking the `Run` button on the right side of\nthe parsed instructions from received messages.\n\nThe result will be sent back to the email sender. By default, the message will\nbe **sent as a reply** to the received message. The reply message may have\nattachments.\n\nTo change the email reply type to a separate email, you can uncheck the setting:\n`Settings \u003e Send response as reply`.\n\n\u003e [!NOTE]\n\u003e\n\u003e There is a known issue when executing multiple instructions at the same time,\n\u003e it will cause the SSL error. So please execute one instruction after a short\n\u003e time (about ~2 seconds).\n\n### Mail Server\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\nThis is the server that will do everything that the [Mail App](#mail-app) can\ndo, but it will not have the GUI, and it will **automatically execute the email\ninstructions**.\n\nRun the mail server:\n\n```bash\npoe dev server:mail\n```\n\n#### Authorization\n\nLike the [Mail App](#mail-app), the mail server will need to be authorized to be\nable to access the email account. Please follow the\n[Authorize the app](#authorize-the-app) section to authorize the app.\n\n#### Connect to the server\n\nThe mail server will automatically connect to the server when it starts. The\nhost will be `localhost` and the port will be `5656`. So **the server and the\nmail server MUST be run on the same machine**.\n\n#### Fetch mail\n\nBy default, the mail server will **ONLY** fetch the `5` latest emails from the\n`INBOX` label. You will have to change the code to change the number of emails\nto fetch and the label to fetch.\n\n#### Execute instructions\n\nThe mail server will **automatically execute the instructions** from the\nreceived emails.\n\nAs the known issue mentioned in the [Mail App](#mail-app) section, the\ninstruction shouldn't be executed at the same time. So the mail server will\ndelay about `2` seconds before executing the next instructions.\n\nEach executed instruction will be logged to the file `tmp/log.txt` to prevent it\nfrom being executed again by **checking the email's sent date**.\n\n### Dear PyGui Demo\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\nThe demo will demonstrate all the features of the Dear PyGui library. This was\nfor development purposes only.\n\nRun the demo:\n\n```bash\npoe dev demo\n```\n\n### CLI\n\n[⬆️ Back to top](#notebook_with_decorative_cover-table-of-contents)\n\n```bash\nUsage: cli.py [OPTIONS]\n              [SERVICE]:[server|server:mail|server:legacy|client|mail]\n\nArguments:\n  [SERVICE]:[server|server:mail|server:legacy|client|mail]\n                                  Service to run  [default: server]\n\nOptions:\n  --help  Show this message and exit.\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e This is an entry point for all the services. Each service should be run from\n\u003e this entry point to make the absolute import work.\n\n\u003c!-- Roadmap --\u003e\n\n## :compass: Roadmap\n\n- [x] Rebuild the server with `Dear PyGui`.\n- [x] Rebuild the client app with `Dear PyGui`.\n- [x] Support more features for Mail App.\n  - [x] Copy files to the client computer.\n  - [x] Copy files to the server computer.\n  - [x] Delete files.\n- [x] Linux support.\n\n\u003c!-- Contributing --\u003e\n\n## :wave: Contributing\n\nContributions are always welcome!\n\n\u003c!-- Code of Conduct --\u003e\n\n### :scroll: Code of Conduct\n\nPlease read the\n[Code of Conduct](https://github.com/DuckyMomo20012/email-remote-access/blob/main/CODE_OF_CONDUCT.md).\n\n\u003c!-- FAQ --\u003e\n\n## :grey_question: FAQ\n\n- Why do you migrate to `SocketIO`?\n\n  - The server and client app are built with normal `socket`, the dataflow is\n    somewhat harder to track, debug and maintain. So I decided to migrate to\n    `SocketIO` for better dataflow management.\n\n- Why do you migrate to `Dear PyGui`?\n\n  - The server and client app is built with `tkinter`, which is a bit hard to\n    use and maintain. The `tkinter`'s `mainloop` is quite hard to close\n    manually, and it's not shut down properly when the program is closed. So I\n    decided to migrate to `Dear PyGui` for better UI and better dataflow\n    management.\n\n- `Mail App` or `Mail Server` got an `HttpError: 403 Insufficient Permission`\n  error when trying to send the email.\n\n  - Make sure the file `token.json` is in the root directory of the project.\n\n  - Make sure the `token.json` file is created with these scopes:\n\n    ```\n    https://www.googleapis.com/auth/gmail.send\n    https://www.googleapis.com/auth/gmail.readonly\n    ```\n\n  - Make sure the `expiry` field in the `token.json` file is not expired. If it\n    is, you can restart the app to **refresh** the token.\n\n- Execute multiple instructions at the same time will cause the SSL error.\n\n  - There is a known issue when executing multiple instructions at the same\n    time, it will cause the SSL error. So please execute one instruction after a\n    short time (about ~2 seconds).\n\n- File size must be less than 1MB.\n\n  - The file size must be less than 1MB when copying files from client to server\n    or from server to client. This is the default `max_http_buffer_size` of the\n    [`AsyncServer`](https://python-socketio.readthedocs.io/en/latest/api.html#socketio.AsyncServer)\n    the\n    [`python-socketio`](https://python-socketio.readthedocs.io/en/latest/index.html)\n    library.\n\n\u003c!-- License --\u003e\n\n## :warning: License\n\nDistributed under MIT license. See\n[LICENSE](https://github.com/DuckyMomo20012/email-remote-access/blob/main/LICENSE)\nfor more information.\n\n\u003c!-- Contact --\u003e\n\n## :handshake: Contact\n\nDuong Vinh - [@duckymomo20012](https://twitter.com/duckymomo20012) -\ntienvinh.duong4@gmail.com\n\nProject Link:\n[https://github.com/DuckyMomo20012/email-remote-access](https://github.com/DuckyMomo20012/email-remote-access).\n\n\u003c!-- Acknowledgments --\u003e\n\n## :gem: Acknowledgements\n\nHere are useful resources and libraries that we have used in our projects:\n\n- [Awesome Readme Template](https://github.com/Louis3797/awesome-readme-template):\n  A detailed template to bootstrap your README file quickly.\n- [Dear PyGui](https://dearpygui.readthedocs.io/en/latest/): Dear PyGui is an\n  easy-to-use, dynamic, GPU-Accelerated, cross-platform graphical user interface\n  toolkit(GUI) for Python. It is “built with”\n  [Dear ImGui](https://github.com/ocornut/imgui).\n- [SocketIO](https://python-socketio.readthedocs.io/en/latest/): Python client\n  and server for Socket.IO.\n- [FastAPI](https://fastapi.tiangolo.com/): FastAPI framework, high performance,\n  easy to learn, fast to code, ready for production.\n- [uvicorn](https://www.uvicorn.org/): An ASGI web server, for Python.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Femail-remote-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckymomo20012%2Femail-remote-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Femail-remote-access/lists"}