config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MODULE_EXTRACT uint = 0x00000001
)

Functions

This section is empty.

Types

type CFG

type CFG struct {
	// 运行的模块 0b111
	// 提取 bin文件: 0000 0001
	RunModule uint
	// 预分析的bin文件路径
	BinFile string
	// 与分析的bin展开目录
	BinExtractedDir string
	// 数据库配置
	DB DBCFG
	// 日志对象配置
	Logs LogSet
	// 扫描策略
	ScanPolicy ScanPolicyCFG
	// 常见的压缩文件后缀名
	CompressSuffix []string
	// 校验出不同类型的elf
	AddRatingCheckElf int
	// 未知elf文件加分
	AddRatingUnknownElf int
}

func GetConfigInstance

func GetConfigInstance() *CFG

新建一个配置实例

type DBCFG

type DBCFG struct {
	// 数据库厂家,目前仅支持“postgres”和“mysql”
	Platform string
	// 数据库服务器的IP地址
	Host string
	// 数据库服务器的用户名
	User string
	// 数据库服务器的用户名对应的密码
	Password string
	// 数据库名
	Name string
}

type LogSet

type LogSet struct {
	// Fg:Green
	// Tag:[ OK ]
	OK golog.SimpleLog
	// Tag: [   OK    ] FgHiBlue Underline
	OK2 golog.SimpleLog
	// Fg:Green
	// Tag:[PASS]
	Pass golog.SimpleLog
	// Fg:Green
	// Tag:[IGNORED]
	// Underline
	Ignored golog.SimpleLog
	// Fg:Blue
	// Tag:[SKIP]
	// Underline
	Skip golog.SimpleLog
	// Tag: [UNKNOWN] Fg
	Unknwon   golog.SimpleLog
	CommonLog golog.CommonLog
}

日志对象集

type ScanPolicyCFG

type ScanPolicyCFG struct {
	// 是否忽略别名文件
	IsIgnoreAlias bool
	// 需要跳过分析的目录
	IsSkipCustomDir bool
	SkipCustomDirs  []string
	// 是否跳过 extracted 目录
	IsSkipExtractedDir bool
	// 是否只扫描squashfs-root目录
	IsOnlySquashfsRoot bool
	// 是否需要分析目录,默认不分析目录
	IsAnalysisDir bool
}

Jump to

Keyboard shortcuts

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