A simple Go application that executes system commands, for user and device enumeration, and sends the output to a target Discord server via webhooks.
Disclaimer: This repository exists solely for educational purposes.
- Executes Linux command-line commands (by defautlt,
whoami
,hostname
,ifconfig
, andcurl
to an ipify.com geolocation API) - Sends command output to Discord using webhooks
- Supports JSON-formatted message content
- Error handling for both command execution and Discord communication
- Go installed on your system
- A Discord webhook URL
- Linux operating system (for current implementation) for the target host
- Clone the repository.
- Navigate to the project directory.
- Replace
<ENTERWEBHOOKURL>
with your actual Discord webhook's URL. (First lines of func main.) - Replace
<insert_your_api_key_here>
with your ipify.com API key. (First lines of func main.) - Run
go build -ldflags "-s -w" main.go
to compile.
The application provides two main functions:
runCommand(cmd string)
: Executes a Windows command and returns its outputsendToDiscord(webhookURL string, message string)
: Sends a message to a Discord channel via webhook
Note: If you want to make this run on a Windows host, change command := exec.Command("bash", "-c", cmd)
to command := exec.Command("cmd", "/C", cmd)
in the runCommand
function of of main.go.