Versions in this module Expand all Collapse all v0 v0.8.4 Jan 17, 2022 Changes in this version + const AUTH_MQ + const CFGA_DB_DUMP + const CONTROL_HEADER + const DBSYNC_MQ + const EXECD_HEADER + const EncryptionMethodAES + const EncryptionMethodBlowFish + const FILE_CLOSE_HEADER + const FILE_UPDATE_HEADER + const HC_ACK + const HC_FIM_DB_EFS + const HC_FIM_DB_ES + const HC_FIM_DB_SFS + const HC_FIM_DB_SS + const HC_FIM_FILE + const HC_FIM_REGISTRY + const HC_REQUEST + const HC_SK + const HC_SK_DB_COMPLETED + const HC_SK_RESTART + const HC_STARTUP + const HOSTINFO_MQ + const LOCALFILE_MQ + const MYSQL_MQ + const POSTGRESQL_MQ + const PingIntervall + const ROOTCHECK_MQ + const ReadImmediateTimeout + const ReadWaitTimeout + const SECURE_MQ + const SYSCHECK_MQ + const SYSCOLLECTOR_MQ + const SYSLOG_MQ + const SendRateLimit + const SysinfoIntervall + const TYPE_HARDWARE + const TYPE_OS + const TYPE_PROCESS + const TYPE_PROCESS_END + const WM_SYS_LOCATION + func PKCS7Padding(ciphertext []byte, blockSize int) []byte + func PKCS7UnPadding(origData []byte) []byte + type AgentKey struct + AgentAllowedIPs string + AgentHashedKey string + AgentID string + AgentIP string + AgentKey string + AgentName string + func ParseAgentKey(line string) (*AgentKey, error) + func RegisterAgent(cfg *EnrollmentConfig) (*AgentKey, error) + func (a *AgentKey) WriteAgentKey(filename string) error + type AgentKeyMap map[string]*AgentKey + func GetAgentKeyMap(filename string) (AgentKeyMap, error) + func LoadAgentKeyMap(filename string) (AgentKeyMap, error) + type AgentOption func(*Client) error + func WithAgentAllowedIPs(allowedIPs string) AgentOption + func WithAgentIP(agentIP string) AgentOption + func WithBasePath(basePath string) AgentOption + func WithClientName(clientName string) AgentOption + func WithClientVersion(clientVersion string) AgentOption + func WithContext(ctx context.Context) AgentOption + func WithEncryptionMethod(encryptionMethod EncryptionMethod) AgentOption + func WithPort(port uint16) AgentOption + func WithTCP(tcp bool) AgentOption + func WithUDP(udp bool) AgentOption + func WithZapLogger(logger *zap.Logger) AgentOption + type AgentShutDownEvent struct + type Client struct + ClientName string + ClientVersion string + CurrentRemoteFile *RemoteFileInfo + EncryptionMethod EncryptionMethod + Port uint16 + RemoteFiles map[string]RemoteFileInfo + Server string + UDP bool + func NewAgent(server string, agentID string, agentName string, agentKey string, ...) (*Client, error) + func (a *Client) AgentLoop(ctx context.Context, closeOnError bool) (chan *QueuePosting, chan interface{}, error) + func (a *Client) Close() error + func (a *Client) Connect(isStartup bool) error + func (a *Client) IsConencted() bool + func (a *Client) NewHardware() *Hardware + func (a *Client) NewOS() *OS + func (a *Client) NewProcess() *Process + func (a *Client) NewSysinfo(typ string, data interface{}) *Sysinfo + func (a *Client) PingServer() error + func (a *Client) PostSysinfo(input chan *QueuePosting) + func (a *Client) ReadServerResponse(timeout time.Duration) error + func (a *Client) ReportIntegrity() error + func (a *Client) SendMessage(msg string, readTimeout time.Duration) error + func (a *Client) WriteMessage(msg string) error + type ClientConfig struct + Address string + AutoRestart ConvertibleBoolean + ConfigProfile string + CryptoMethod string + LocalIP string + MaxRetries uint16 + NotifyTime uint16 + Port uint16 + Protocol string + RetryInterval uint16 + TimeReconnect uint16 + XMLName xml.Name + func LoadClientConfig(filename string) (*ClientConfig, error) + func NewClientConfig() *ClientConfig + type ConvertibleBoolean bool + func (bit *ConvertibleBoolean) UnmarshalText(data []byte) error + type CorruptMessage struct + func NewCorruptMessage(typ string) CorruptMessage + func (cme CorruptMessage) Error() string + type EncryptionMethod int + type EnrollmentConfig struct + AgentCert stringMap + AgentID string + AgentIP string + AgentKey string + AgentName string + AuthPass string + CACert string + Groups []string + ManagerName string + Port int + SenderIP string + UseSrcIP bool + func NewEnrollmentConfig() (*EnrollmentConfig, error) + func (c *EnrollmentConfig) SetLogger(logger *zap.Logger) + type Event struct + Event string + type FileUpdatedEvent struct + FileInfo *RemoteFileInfo + type FimData struct + Begin string + Checksum string + End string + ID int64 + type FimMessage struct + Component string + Data FimData + Type string + func NewFimMessage() (*FimMessage, error) + type Hardware struct + BoardSerial string + CPUCores int + CPUMhz float64 + CPUName string + RamFree uint64 + RamTotal uint64 + RamUsage float64 + type InitInfo struct + Date time.Time + Directory string + Name string + Revision uint + Type string + Version *semver.Version + var LocalInitInfo *InitInfo + func DefaultInintInfo() *InitInfo + func NewInitInfo() (*InitInfo, error) + func ReadInitInfo(file io.Reader) (*InitInfo, error) + func (i *InitInfo) Get(key string) (string, bool) + type IntegrationEvent struct + Integration string + Meta IntegrationMeta + type IntegrationMeta struct + Action string + DestinationGeoIP string + DestinationIP *net.IP + DestinationPort *uint + DestinationUser string + ExtraData interface{} + ID string + Protocol string + SourceIP *net.IP + SourcePort *uint + SourceUser string + Status string + SystemName string + URL string + User string + type LocalConfig struct + ClientConfig ClientConfig + XMLName xml.Name + type Network struct + type OS struct + Architecture string + Hostname string + OSBuild string + OSMajor string + OSMinor string + OSName string + OSRelease string + OSVersion string + ScanTime string + type Package struct + Architecture string + Group string + Hotfix string + Name string + OSPatch string + Priority string + Size string + Source string + Version string + type Port struct + type Process struct + EGroup string + EUser string + FGroup string + NLWP int + Name string + Nice int + PGrp int + PID int + PPID int + Priority int + Processor int + RGroup string + RUser string + Resident int + SGroup string + STime int + SUser string + Session int + Share int + Size int + State string + TGID int + TTY int + UTime int + VMSize int + type Queue struct + AgentName string + InitInfo *InitInfo + Logger *zap.Logger + QueuePath string + TargetQueue rune + Type string + func NewQueue(typ string, opts ...QueueOption) (*Queue, error) + func (w *Queue) AgentLoop(ctx context.Context, closeOnError bool) (chan *QueuePosting, chan interface{}, error) + func (w *Queue) DebugMessage(msg string) error + func (w *Queue) SendMessage(event interface{}, location string, programName string) error + type QueueError struct + InnerError error + Operation string + func NewQueueError(operation string, innerError error) QueueError + func (m QueueError) Error() string + type QueueOption func(*Queue) error + func WithInitInfo(initInfo *InitInfo) QueueOption + func WithQueueLogger(logger *zap.Logger) QueueOption + func WithQueuePath(path string) QueueOption + func WithTargetQueue(queue rune) QueueOption + type QueuePosting struct + Location string + ProgramName string + Raw interface{} + TargetQueue rune + Timestamp time.Time + type RemoteFileInfo struct + Content *bytes.Buffer + Filename string + Hash string + type Sysinfo struct + Checksum string + ID string + ScanTime string + Type string + type WithLoggin struct