client_utils

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNextCallbackTime added in v1.3.1

func CalculateNextCallbackTime(callbackFrequency string, callbackJitter string) time.Time

func CalculateSleepInterval

func CalculateSleepInterval(CallbackFrequency string, CallbackJitter string) float64

func CreateConfigurationRequest added in v1.3.1

func CreateConfigurationRequest(agentID, hostname, osType, osArch, osVersion, cpus, memory, username, ip, ServerIP, ServerPort, CallbackFrequency, CallbackJitter string, nextCallback time.Time) types.ConfigurationRequest

func EstablishConnection

func EstablishConnection(config *tls.Config, ServerIP string, ServerPort string) (*tls.Conn, *gob.Encoder, *gob.Decoder, error)

func GenerateAgentMetadata

func GenerateAgentMetadata() (string, string, string)

func GetLocalIP

func GetLocalIP(beacon *tls.Conn) string

func GetOSInfo

func GetOSInfo() (string, string, string, string, string)

func HandleConfigurationRequest added in v1.3.1

func HandleConfigurationRequest(beacon *tls.Conn, encoder *gob.Encoder, decoder *gob.Decoder, agentID, hostname, username, ip, osType, osArch, osVersion, cpus, memory, ServerIP, ServerPort, CallbackFrequency, CallbackJitter string, nextCallback time.Time) error

func HandleError

func HandleError(beacon *tls.Conn, reqType string, err error)

func HandleFileRequest

func HandleFileRequest(beacon *tls.Conn, encoder *gob.Encoder, decoder *gob.Decoder, agentID string) error

func HandleSocksCommand

func HandleSocksCommand(beacon *tls.Conn, encoder *gob.Encoder, commandResponse types.CommandResponse, activeProxy **ProxyServer) error

func Initialize

func Initialize(logging_enabled string)

func LoadCertificate

func LoadCertificate(RootCert string) (*tls.Config, error)

func RunShellCommand

func RunShellCommand(command string) string

func SendRequest

func SendRequest(encoder *gob.Encoder, reqType types.RequestType, payload interface{}) error

func UpdateClientConfig added in v1.3.1

func UpdateClientConfig(config types.ConfigurationResponse, ServerIP, ServerPort, CallbackFrequency, CallbackJitter string)

func UpdateConfigField added in v1.3.1

func UpdateConfigField(current *string, new, fieldName string)

Types

type ProxyServer

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

func (*ProxyServer) StopProxy

func (p *ProxyServer) StopProxy()

Directories

Path Synopsis
linux
windows

Jump to

Keyboard shortcuts

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