├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── command.key ├── index.php ├── load.key ├── main.py ├── requirements.txt └── run.key /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | custom: https://paypal.me/soldeveloperm 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | *Error thats you get* 11 | [Insert here] 12 | *What Happend?* 13 | [Insert here] 14 | *Screenshots* 15 | [insert here] 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FE]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | *What Is the new feature* 11 | [insert here] 12 | *do you think its possible* 13 | [insert here] 14 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ main ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ main ] 20 | schedule: 21 | - cron: '36 22 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'python' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v2 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /github/ 2 | .gitignore 3 | README.md 4 | LICENSE.md 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | RPCC 2 | Copyright (C) 2021 SolDevelop 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # what is RPCC 2 | RPCC is a python&php program that allows you to control your pc using shortcuts 3 | # Updates 4 | BSD in Work 5 | - 6 | # Coming Soon 7 | RPCC Customizer Coming Soon 8 | - 9 | 10 | OS Support List: 11 | 12 | Windows Support (✅) 13 | 14 | Mac Support (✅) 15 | 16 | Linux Support (✅) 17 | 18 | BSD Support (❌) 19 | 20 | Jailbroken IDevices Support (❌) 21 | 22 | # New Features 23 | Screenshot Support for windows 24 | 25 | Linux Support 26 | 27 | RUN COMMANDS In WINDOWS Using ?command="the command that you want" 28 | 29 | Screenshot Shortcut: [Click here]("https://www.icloud.com/shortcuts/3f4992bcf485488cba010d4a0fd1f8a3") 30 | # How To Setup RPCC? 31 | First You Need to have php & python in Your PATH variable 32 | 33 | Next Clone RPCC next Unzip RPCC 34 | 35 | Next Open cmd then type this to install the requirements ( pip install -r requirements.txt ) 36 | 37 | Next type in the already opened cmd ( python main.py \-setup ) then wait 5 to 10 seconds 38 | 39 | Next Open The load.key file change or put things example: 40 | 41 | {"chrome": "C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe", "mems": "C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe"} 42 | 43 | you can put firefox or anything but we will be using firefox to teach you! now your load.key should look like this: 44 | 45 | {"Windows": [{"chrome": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "mems": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"}, "firefox": " C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe"],"Darwin": [{"safari": "//Applications//Safari.app"}]} 46 | 47 | Next Type in already opened cmd ( python main.py \-run ) it will ask you about the ip that the server will be running on You Can Choose from [127.1.1.0](https://127.1.1.0) or your local ip \[Recommended\] or your internet ip after that the server will be running! (the server will not be closed after you close cmd you need to open task manager then kill php.exe yourself) 48 | 49 | Here is a shortcut example: [https://www.icloud.com/shortcuts/7244c1caabb149b4aa07dc40264b8abf](https://www.icloud.com/shortcuts/7244c1caabb149b4aa07dc40264b8abf) 50 | 51 | And Its Done! 52 | 53 | Demo Video: 54 | 55 | [Click to watch](https://youtu.be/Cv01ASTEgQk) 56 | 57 | Screenshot Demo Video: 58 | 59 | [Click Here to Watch](https://youtu.be/x-SCCDVFTz8) 60 | 61 | ​ 62 | 63 | How does It Work (IMPORTANT): 64 | 65 | First after you setup it it will open the 80 port 66 | 67 | Next when you use -run it launches the php server that is built-in! 68 | 69 | Url Structure: 70 | 71 | http://\[the-ip-you-choosed-in-the-run\]/index.php?run=\[launching point\] 72 | 73 | the lanuching point will run the program/app you want in windows remotely ! 74 | 75 | the launching point refers to the program path thats stored in load.key, you can change it to whatever you want 76 | 77 | Default load.key File content: 78 | 79 | {"Windows": [{"chrome": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "mems": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"}],"Darwin": [{"safari": "//Applications//Safari.app"}]} 80 | change everything but make sure the json is working 81 | 82 | # Credits 83 | Sol aka Soldevelop & Soldeveloper 84 | 85 | 86 | # This Project Is Under GPLv3 License 87 | -------------------------------------------------------------------------------- /command.key: -------------------------------------------------------------------------------- 1 | {"Windows": ["ping"], "Darwin": ["ping"]} -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | "; 30 | }}else{ 31 | echo "Your OS Dont Support That Yet"; 32 | } 33 | } 34 | ?> -------------------------------------------------------------------------------- /load.key: -------------------------------------------------------------------------------- 1 | {"Windows": [{"SC": "true","chrome": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "mems": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"}],"Darwin": [{"safari": "//Applications//Safari.app"}], "Linux": [{"echo": "echo"}]} -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import platform 2 | import sys 3 | import sched 4 | import time 5 | import keyboard 6 | import ctypes 7 | import os 8 | import subprocess 9 | import PySimpleGUI as sg 10 | import threading 11 | import json 12 | oss = platform.system() 13 | import pathlib 14 | file = pathlib.Path("setup.key") 15 | import ctypes 16 | import webbrowser 17 | import signal 18 | import re 19 | import pyautogui 20 | 21 | def is_admin(): 22 | try: 23 | return ctypes.windll.shell32.IsUserAnAdmin() 24 | except: 25 | return False 26 | 27 | if oss == "Windows": 28 | if sys.argv[1] == "-setup": 29 | if not file.exists(): 30 | if is_admin(): 31 | os.system("netsh advfirewall firewall add rule name=\"SHORTCUT 80\" dir=in action=allow protocol=TCP localport=80") 32 | 33 | E = open("setup.key", "w+") 34 | E.write("" + oss) 35 | E.close() 36 | sys.exit() 37 | else: 38 | 39 | ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1) 40 | else: 41 | print("You Already Setup it") 42 | elif sys.argv[1] == "-run": 43 | 44 | 45 | layout = [[sg.Text('Please Enter The IP that the Server will be running on')], 46 | [sg.Text('IP Address:', size=(15, 1)), sg.InputText()], 47 | [sg.Submit(), sg.Cancel()],[sg.Text('')]] 48 | window = sg.Window(title="RPCC", layout=layout, margins=(100, 50)) 49 | 50 | 51 | while True: 52 | event, values = window.read() 53 | if event == "Cancel" or event == sg.WIN_CLOSED: 54 | window.close() 55 | exit() 56 | break 57 | elif event == "Submit": 58 | window.close() 59 | layouts = [[sg.Text("Server is running")], [sg.Button("Exit")]] 60 | windowd = sg.Window("RPCC", layouts) 61 | if __name__ == '__main__': 62 | t = "php -S " + values[0] + ":80" 63 | proc = subprocess.Popen(t, shell=False) 64 | os.remove("run.key") 65 | run = open("run.key", "w+") 66 | run.write("R") 67 | run.close() 68 | evente = windowd.read() 69 | windowd.close() 70 | if evente == "Exit" or evente == sg.WIN_CLOSED: 71 | os.remove("run.key") 72 | run = open("run.key", "w+") 73 | run.write("N") 74 | run.close() 75 | sys.exit() 76 | break 77 | elif sys.argv[1] == "-load": 78 | if sys.argv[2] == "sc": 79 | run = open("run.key", "r") 80 | if run.readline() == "R": 81 | with open("load.key", "rt") as load: 82 | for line in load: 83 | key = json.loads(line) 84 | LC = key[str(oss)][0] 85 | SV = LC['SC'] 86 | if SV == "true" or SV == "True": 87 | P = os.getcwd() 88 | FP = P + "\\screenshot.png" 89 | RFP = r'' + FP 90 | SC = pyautogui.screenshot() 91 | SC.save(RFP) 92 | print("./screenshot.png") 93 | else: 94 | print("SCNT") 95 | elif not sys.argv[2] == "command": 96 | with open('load.key', 'rt') as load: 97 | for line in load: 98 | key = json.loads(line) 99 | run = open("run.key", "r") 100 | if run.readline() == "R": 101 | WTO = sys.argv[2] 102 | CV = key[str(oss)][0] 103 | if WTO in CV: 104 | Run = CV[str(WTO)] 105 | subprocess.call([Run]) 106 | print("Done! " + WTO + " Is Running!") 107 | else: 108 | print("The Server Isnt Running!") 109 | 110 | else: 111 | run = open("run.key", "r") 112 | if run.readline() == "R": 113 | with open("command.key", "rt") as CK: 114 | for line in CK: 115 | CO = json.loads(line) 116 | commandencode = sys.argv[3:] 117 | CP = sys.argv[3] 118 | CCP = CO[str(oss)][0] 119 | if CP in CCP: 120 | unlist = ' ' 121 | command = unlist.join(commandencode) 122 | subprocess.Popen(str(command)) 123 | print("Done") 124 | else: 125 | print("Sorry But You Are Trying To Use Unallowed Command") 126 | else: 127 | print("The Server Isnt Running!") 128 | 129 | 130 | 131 | 132 | elif oss == "Darwin": 133 | if sys.argv[1] == "-setup": 134 | if not file.exists(): 135 | os.system("sudo nc -l 80") 136 | 137 | E = open("setup.key", "w+") 138 | E.write("Setup Completed\n OS: " + oss) 139 | E.close() 140 | sys.exit 141 | else: 142 | print("You Already Setup it") 143 | elif sys.argv[1] == "-run": 144 | 145 | layout = [[sg.Text('Please Enter The IP that the Server will be running on')], 146 | [sg.Text('IP Address:', size=(15, 1)), sg.InputText()], 147 | [sg.Submit(), sg.Cancel()], 148 | [sg.Text('')]] 149 | window = sg.Window(title="RPCC", layout=layout, margins=(100, 50)) 150 | while True: 151 | event, values = window.read() 152 | if event == "Cancel" or event == sg.WIN_CLOSED: 153 | window.close() 154 | exit() 155 | break 156 | elif event == "Submit": 157 | window.close() 158 | layouts = [[sg.Text("Server is running")], [sg.Button("Exit")]] 159 | windowd = sg.Window("RPCC", layouts) 160 | if __name__ == '__main__': 161 | t = "sudo php -S " + values[0] + ":80" 162 | proc = subprocess.Popen(t, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 163 | os.remove("run.key") 164 | run = open("run.key", "w+") 165 | run.write("R") 166 | run.close() 167 | evente = windowd.read() 168 | windowd.close() 169 | if evente == "Exit" or evente == sg.WIN_CLOSED: 170 | os.remove("run.key") 171 | run = open("run.key", "w+") 172 | run.write("N") 173 | run.close() 174 | os.system("kill " + proc.pid) 175 | sys.exit() 176 | break 177 | elif sys.argv[1] == "-load": 178 | if not sys.argv[2] == "command": 179 | with open('load.key', 'rt') as load: 180 | for line in load: 181 | key = json.loads(line) 182 | run = open("run.key", "r") 183 | if run.readline() == "R": 184 | WTO = sys.argv[2] 185 | CV = key[str(oss)][0] 186 | if WTO in CV: 187 | Run = CV[str(WTO)] 188 | os.system("open " + Run) 189 | print("Done! " + WTO + " Is Running!") 190 | else: 191 | print("The Server Isnt Running!") 192 | else: 193 | run = open("run.key", "r") 194 | if run.readline() == "R": 195 | with open("command.key", "rt") as CK: 196 | for line in CK: 197 | CO = json.loads(line) 198 | commandencode = sys.argv[3:] 199 | CP = sys.argv[3] 200 | CCP = CO[str(oss)][0] 201 | if CP in CCP: 202 | unlist = ' ' 203 | command = unlist.join(commandencode) 204 | subprocess.Popen(str(command)) 205 | print("Done") 206 | else: 207 | print("Sorry But You Are Trying To Use Unallowed Command") 208 | else: 209 | print("The Server Isnt Running!") 210 | elif oss == "Linux": 211 | if sys.argv[1] == "-setup": 212 | if not file.exists(): 213 | print("") 214 | os.system("sudo firewall-cmd --add-port=80/tcp") 215 | 216 | E = open("setup.key", "w+") 217 | E.write("Setup Completed\n For OS: " + oss) 218 | E.close() 219 | sys.exit 220 | else: 221 | print("You Already Setup it") 222 | elif sys.argv[1] == "-run": 223 | 224 | layout = [[sg.Text('Please Enter The IP that the Server will be running on')], 225 | [sg.Text('IP Address:', size=(15, 1)), sg.InputText()], 226 | [sg.Submit(), sg.Cancel()], 227 | [sg.Text('')]] 228 | window = sg.Window(title="RPCC", layout=layout, margins=(100, 50)) 229 | 230 | while True: 231 | event, values = window.read() 232 | if event == "Cancel" or event == sg.WIN_CLOSED: 233 | window.close() 234 | exit() 235 | break 236 | elif event == "Submit": 237 | window.close() 238 | layouts = [[sg.Text("Server is running")], [sg.Button("Exit")]] 239 | windowd = sg.Window("RPCC", layouts) 240 | if __name__ == '__main__': 241 | t = "sudo php -S " + values[0] + ":80" 242 | proc = subprocess.Popen(t, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 243 | os.remove("run.key") 244 | run = open("run.key", "w+") 245 | run.write("R") 246 | run.close() 247 | evente = windowd.read() 248 | windowd.close() 249 | if evente == "Exit" or evente == sg.WIN_CLOSED: 250 | os.remove("run.key") 251 | run = open("run.key", "w+") 252 | run.write("N") 253 | run.close() 254 | proc.terminate() 255 | sys.exit() 256 | break 257 | elif sys.argv[1] == "-load": 258 | with open('load.key', 'rt') as load: 259 | for line in load: 260 | key = json.loads(line) 261 | run = open("run.key", "r") 262 | if run.readline() == "R": 263 | WTO = sys.argv[2] 264 | CV = key[str(oss)][0] 265 | if WTO in CV: 266 | Run = CV[str(WTO)] 267 | os.system(Run) 268 | print("Done! " + WTO + " Is Running!") 269 | else: 270 | print("The Server Isnt Running!") 271 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | keyboard==0.13.5 2 | PySimpleGUI==4.38.0 3 | pyautogui -------------------------------------------------------------------------------- /run.key: -------------------------------------------------------------------------------- 1 | R --------------------------------------------------------------------------------