common

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config 配置信息
	Config ClientConfig
	// LocalIP 本机活跃IP
	LocalIP string
	// ServerInfo 主机相关信息
	ServerInfo ComputerInfo
	// ServerIPList 服务端列表
	ServerIPList []string
)

Functions

func Cmdexec

func Cmdexec(cmd string) string

Cmdexec 执行系统命令

func InArray

func InArray(list []string, value string, regex bool) bool

InArray 判断是否存在列表中,如果regex为true,则进行正则匹配

Types

type ClientConfig

type ClientConfig struct {
	Cycle  int    // 信息传输频率,单位:分钟
	UDP    bool   // 是否记录UDP请求
	LAN    bool   // 是否本地网络请求
	Mode   string // 模式,考虑中
	Filter struct {
		File    []string // 文件hash、文件名
		IP      []string // IP地址
		Process []string // 进程名、参数
	} // 直接过滤不回传的规则
	MonitorPath []string // 监控目录列表
	Lasttime    string   // 最后一条登录日志时间
}

ClientConfig agent配置

type ComputerInfo

type ComputerInfo struct {
	IP       string   // IP地址
	System   string   // 操作系统
	Hostname string   // 计算机名
	Type     string   // 服务器类型
	Path     []string // WEB目录
}

ComputerInfo 计算机信息结构

Jump to

Keyboard shortcuts

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