Remote Control is a distributed application which allows external users to remotely control windows devices in the same network via the web.
The end user runs a c# application on his device, enabling another user (remote user) within the same network to find the end users device on the web client. The remote user can then execute any CMD command on the end users device with a few additional commands from the c# application. These commands include the following functionalities:
create <filename.ext>=> creates any filelock=> locks the devicewallpaper https://<url>=> sets a wallpaper on the devicewrite <file.ext> "<text>"=> writes to the specified file
You can implement more custom remote commands by creating a class and implementing the interface IReactCommand. Override the 'Command' string and the 'Execute' method.
Connected devices are automatically shown on the client home page. When a device disconnects, the web page needs to be refreshed and it takes a few seconds to register and remove any disconnected device. Unfortunately, the device only gets removed from the server when the client is active, because the way that it gets removed is to check whether the Websocket has a valid connection on that IP.
Go to /RemoteControl to find the files or just open the RemoteControl.sln solution. In Visual Studio 2022, press CTRL + B to build the app, then run it with CTRL + F5. You'll need to change the HOST variable in /RemoteControl/Services/WebSocketService.cs:20, to the host of your API server.
Navigate to /external/client/, to find the client application. In the terminal, enter:
npm i
npm run dev
Here, you'll also need to change the host in /external/client/src/components/IPReceiver.jsx:11, to your API server.
Navigate to /external/server, to find api.py. In the terminal, enter (if not installed already):
pip install flask
pip install flask_socketio
pip install flask_cors
Run with
python api.py
