Skip to content

Instantly share code, notes, and snippets.

@khyberspache
Created December 23, 2020 22:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
keyword usage example for Operator
func RunCommand(message string, executor string, payloadPath string) (string, int, int) {
if executor == "keyword" {
switch message {
case "stop agent":
os.Exit(0)
case "module":
// do module stuff
default:
// do other stuff
}
} else {
// run command using exec.Command("powershell.exe", ...)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment