initialize

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HEC_url string
)

Functions

func CheckIfSudo

func CheckIfSudo()

checkIfSudo checks if the program is executed with superuser privileges. It warns the user to run the program as sudo if not already.

func ChecknCreateHostFile

func ChecknCreateHostFile()

Checks for host.file and creates it if not found

func Detect

func Detect() (localIp string, destIp string)

func GenerateNewMachineID

func GenerateNewMachineID() string

GenerateNewMachineID generates a new machine ID in the format of 32 hexadecimal characters.

func IptablesInit

func IptablesInit()

IPtables initialization part:

func IptablesRemove

func IptablesRemove()

func ProcessHostFile

func ProcessHostFile() ([]string, []string, string, string)

func ReadMachineID

func ReadMachineID() string

ReadMachineID reads the machine ID from /etc/machine-id.

func SetNewConfig

func SetNewConfig()

func ViewCurrentConfig

func ViewCurrentConfig()

Types

type HostFileConfig

type HostFileConfig struct {
	SplunkIP string            `yaml:"splunk-url"`
	Token    string            `yaml:"token"`
	Host     map[string]string `yaml:"host"`
	IP       map[string]string `yaml:"ip"`
}

type Traffic

type Traffic struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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