Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(ciphertext, key []byte) ([]byte, error)
- func Encrypt(plaintext, key []byte) ([]byte, error)
- func FormatBytes(n int) string
- func GenerateSessionKey(length int) string
- func NewClientNotification(rawAddr string) error
- func ServerStartedNotification(port string) error
- func WriteTextToClipboard(text string) bool
- type ClientBuildConfig
- type Logs
Constants ¶
const ( LANG_GO = 0x01 LANG_CPP = 0x02 )
Client language types.
const ( OS_WIN = 0x01 OS_NIX = 0x02 )
Client operating system types.
const (
APP_NAME = "Pout C2"
)
Toast notification variables.
const CONFIG_PATH = "./client/config.go"
Path to replace the contents of with the CONFIG_TEMPLATE. This is the file that the client uses to get the server host and port to connect to.
const CONFIG_TEMPLATE = `` /* 168-byte string literal not displayed */
Config template to replace the host and port of, and write to the CONFIG_PATH.
Variables ¶
var CHARS = "ABCDEF123456789"
Selection of characters to use in the key generation process.
Functions ¶
func FormatBytes ¶
`FormatBytes` formats the passed number of bytes into a string with a byte size suffix.
func GenerateSessionKey ¶
`GenerateSessionKey` generates a random string from numbers and letters.
func NewClientNotification ¶
`NewClientNotification` pushes a Windows toast notification for each new client.
func ServerStartedNotification ¶
`ServerStartedNotification` pushes a Windows toast notification for the server starting.
func WriteTextToClipboard ¶
Types ¶
type ClientBuildConfig ¶
type ClientBuildConfig struct { // Type of client to build. OS byte Lang byte // Basic client build configuration settings. File string Host string Port int32 CompressUPX bool NoConsoleUI bool // Persistence options StartupPersistence bool SchedulerPersistence bool // Folder and file to store the persistent executable. AppDataFolderName string AppDataFileName string // Updating build status. Status string }
`ClientBuildConfig` represents the configuration settings needed to build the client.
func NewBuilderConfig ¶
func NewBuilderConfig() *ClientBuildConfig
`NewBuilderConfig` returns a new ClientBuildConfig with its default configuration settings.
func (*ClientBuildConfig) BuildClient ¶
func (build *ClientBuildConfig) BuildClient() error
`ClientBuildConfig.BuildClient` executes the commands to build the client directory and compress it using UPX if it's set in the build config, along with additional flags.
func (*ClientBuildConfig) UpdateStatus ¶
func (build *ClientBuildConfig) UpdateStatus(status string)
`ClientBuildConfig.UpdateStatus` sets the current build status to the formatted passed text. This function is currently only implemented so that it will be easier to modify all status updates, instead of having to modify the formatting scheme at a later date.
func (*ClientBuildConfig) WriteConfig ¶
func (build *ClientBuildConfig) WriteConfig() error
`ClientBuildConfig.WriteConfig` resets the clients config file and replaces its contents with the formatted CONFIG_TEMPLATE, which includes the passed host and port.