Skip to content

This is a simple implementation for a command server. Don't use it for illegal actions.

License

Notifications You must be signed in to change notification settings

second-constantine/command-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple implementation for a command server. Don't use it for illegal actions.

Requirements

gradle 7.1, jdk 11, screen, bash, curl

Server

  1. Build gradle build
  2. Run ./build/libs/command-server-1.0-SNAPSHOT.jar
  3. Open swagger ui: http://localhost:8889

Get commands

curl -X 'GET' \
  'http://localhost:8889/api/get-commands/123token123' \
  -H 'accept: */*'

Send command

curl -X 'POST' \
  'http://localhost:8889/api/send-command/123token123' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d 'uname -a'

Important: run the get-commands method before the send-command method

Client

Run command agent in background

screen -dmS command-agent ./command-agent.sh

About

This is a simple implementation for a command server. Don't use it for illegal actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published