utils

package
v0.0.0-...-7978c3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNotLoopback

func FindNotLoopback(ips []string) string

because of how weird interfaces get named, it's a lot easier to get all of the IPs, and then find the first one that isn't loopback or IPv6 might ruin the graph display though

func JsonEscape

func JsonEscape(i string) string

https://stackoverflow.com/questions/51691901/how-do-you-escape-characters-within-a-string-json-format

Escapes characters that would otherwise break JSON parsing
Input: i string - input string to be escaped
Output: escaped string

func Strip

func Strip(dirtyString string) string

Removes null bytes at end of string, then whitespace, and casts to string

Types

type Config

type Config struct {
	Url              string
	IsSecure         bool
	UserAgent        string
	SleepTime        int
	JitterRange      int
	TimeoutThreshold int
}

func GetConfig

func GetConfig() Config

Returns config to agent. Make modifications here. We're defining the config here so it's more "malleable", although this isn't a one-to-one

type Message

type Message struct {
	Command string `c2:"cb701b6f0a2f55e3c269f5dde3f4ba25f55be6e65add1657b6843430bf1a4940"`
}

Message - Fake message for embedding canaries

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL