https://github.com/phukon/os-interaction
Interact with your os over http
https://github.com/phukon/os-interaction
Last synced: 7 months ago
JSON representation
Interact with your os over http
- Host: GitHub
- URL: https://github.com/phukon/os-interaction
- Owner: phukon
- License: mit
- Created: 2024-01-13T22:50:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-14T11:49:47.000Z (over 1 year ago)
- Last Synced: 2025-01-27T21:26:10.789Z (9 months ago)
- Language: Go
- Homepage: https://os-interaction.vercel.app
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Command Execution Server
This Go program sets up a simple HTTP server that allows remote execution of commands on the host machine. It provides a basic interface to run shell commands via HTTP requests.
## Usage
1. Build the executable:
bashCopy code
`go build`
2. Run the executable:
bashCopy code
`./`
3. The server will start listening on port `8080`.
## API Endpoint
### Execute Command
- **URL**: `/machine`
- **Method**: `POST`
- **Parameters**:
- `cmd`: The shell command to be executed.#### Example:
`curl -X POST http://localhost:8080/machine -d "cmd=ls -l"`
This will execute the `ls -l` command on the host machine and return the command's output as the response.