Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlacklistedCfg ¶
type BroCfg ¶
type BroCfg struct {
LogPath string `yaml:"LogPath"`
DBPrefix string `yaml:"DBPrefix"`
MetaDB string `yaml:"MetaDB"`
BufferSize int `yaml:"BufferSize"`
WriteThreads int `yaml:"WriteThreads"`
DirectoryMap map[string]string `yaml:"DirectoryMap"`
FilesTable string `yaml:"FilesTable"`
UseDates bool `yaml:"UseDates"`
}
type DurationCfg ¶
type DurationCfg struct {
DurationTimeScale string `yaml:"DurationTimeScale"`
}
type Resources ¶
type Resources struct {
System SystemConfig
Session *mgo.Session
Log *log.Logger
}
Resources provides a data structure for passing system Resources
func InitConfig ¶
InitCofnig grabs the configuration file and intitializes the configuration data returnign a *Resources object which has all of the necessary configuration information
func (*Resources) CopySession ¶
CopySession allows systems to copy the resources session. Necessary for threading.
type ScanningCfg ¶
type StructureCfg ¶
type SystemConfig ¶
type SystemConfig struct {
LogType string `yaml:"LogType"`
GNUNetcatPath string `yaml:"GNUNetcatPath"`
BaseInstallDirectory string `yaml:"BaseInstallDirectory"`
BatchSize int `yaml:"BatchSize"`
DB string `yaml:"Database"`
HostIntelDB string `yaml:"HostIntelDB"`
ExternalHostsCollection string `yaml:"ExternalHostsCollection"`
DatabaseHost string `yaml:"DatabaseHost"`
LogLevel int `yaml:"LogLevel"`
Prefetch float64 `yaml:"Prefetch"`
Whitelist []string `yaml:"WhiteList"`
BlacklistedConfig BlacklistedCfg `yaml:"BlackListed"`
DnsConfig DnsCfg `yaml:"Dns"`
DurationConfig DurationCfg `yaml:"Duration"`
ScanningConfig ScanningCfg `yaml:"Scanning"`
StructureConfig StructureCfg `yaml:"Structure"`
TBDConfig TBDCfg `yaml:"TBD"`
UrlsConfig UrlsCfg `yaml:"Urls"`
UserAgentConfig UserAgentCfg `yaml:"UserAgent"`
BroConfig BroCfg `yaml:"Bro"`
}
func GetConfig ¶
func GetConfig(cfgPath string) (SystemConfig, bool)
GetConfig retrieves a configuration in order of precedence
func LoadSystemConfig ¶
func LoadSystemConfig(cfgPath string) (SystemConfig, bool)
LoadSystemConfig attempts to parse a config file
type UserAgentCfg ¶
type UserAgentCfg struct {
UserAgentTable string `yaml:"UserAgentTable"`
}
Click to show internal directories.
Click to hide internal directories.