Created
December 23, 2020 22:08
-
-
Save khyberspache/f1204e2c8746210d901ebfb233bfaac9 to your computer and use it in GitHub Desktop.
keyword usage example for Operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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