Coalfire-Research / Slackor

A Golang implant that uses Slack as a command and control server
https://www.coalfire.com/The-Coalfire-Blog/June-2019/Introducing-Slackor
GNU General Public License v3.0
457 stars 108 forks source link

Use ldflags to inject compile time variables #5

Closed sporkmonger closed 5 years ago

sporkmonger commented 5 years ago

Go's compiler has a built-in capability to inject values into variables at compile time. This replaces the template.go file and just names it agent.go, injecting the tokens, keys, etc directly without making changes to the file.

n00py commented 5 years ago

Awesome, thanks. Will try to test this tomorrow.