A cross-platform command execution application can execute system commands like network ping and getting system info.
- Clone the repo.
- Run
go build -o commander main.go
.
- POST /execute
curl -X POST http://localhost:8080/execute \
-H "Content-Type: application/json" \
-d '{"type": "ping", "payload": "google.com"}'
curl -X POST http://localhost:8080/execute \
-H "Content-Type: application/json" \
-d '{"type": "sysinfo", "payload": ""}'
For macOS:
- Run
installer.sh
to create the.pkg
installer. - Run the Command
./commander
Run the test suite using go test
.
Here’s a demo video showing the code execution: