https://github.com/pranavpurwar/rce-server
A simple SSH-like terminal server accessible via https://localhost:8888
https://github.com/pranavpurwar/rce-server
Last synced: about 2 months ago
JSON representation
A simple SSH-like terminal server accessible via https://localhost:8888
- Host: GitHub
- URL: https://github.com/pranavpurwar/rce-server
- Owner: PranavPurwar
- Created: 2023-09-18T16:52:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-20T07:58:40.000Z (over 1 year ago)
- Last Synced: 2025-02-16T00:44:36.819Z (4 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Running
Install the dependencies first.
```py
pip3 install -r requirements.txt
```Now for running the server
```py
python3 main.py
```Set a custom server password by editing the .env file
```
password=new-password
```## Note
If you decide to modify the password, edit the 'pswd' parameter to the new value while sending request.
To disable password protection, set `password_protected` environment variable to FalseYou can test the connection on the computer like this
```sh
curl -X POST -H "Content-Type: application/json" -d '{"command":"ls", "pswd":"sshIsAwesome"}' http://localhost:8888/
```At the start of the session, you might need to send the request twice before getting response back. This is a bug which I wasn't able to come up with a solution for.
This should list all files in the folder where main.py is situated.
It uses a single terminal session for running all the commands at `/`.For single-use, for example if you just need to delete a file, just do
```sh
curl -X POST -H "Content-Type: application/json" -d '{"command":"ls", "pswd":"sshIsAwesome"}' http://localhost:8888/execute
```To kill the shell, run
```sh
curl http://localhost:8888/kill
```To restart the shell, run
```sh
curl http://localhost:8888/restart
```