config

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 7 Imported by: 7

Documentation

Index

Constants

View Source
const Version = "1.3.9"

Variables

This section is empty.

Functions

func WriteConfiguration

func WriteConfiguration(config *Config) error

WriteConfiguration writes the updated afrog configuration to disk

Types

type ApiCallBack added in v1.1.0

type ApiCallBack func(any)

type Ceye

type Ceye struct {
	ApiKey string `yaml:"api-key"`
	Domain string `yaml:"domain`
}

type Config

type Config struct {
	PocSizeWaitGroup         int32      `yaml:"poc_sizewaitgroup"`
	TargetSizeWaitGroup      int32      `yaml:"target_sizewaitgroup"`
	FingerprintSizeWaitGroup int32      `yaml:"fingerprint_sizewaitgroup"`
	ConfigHttp               ConfigHttp `yaml:"http"`
	Reverse                  Reverse    `yaml:"reverse"`
}

Config is a afrog-config.yaml catalog helper implementation

func New

func New() (*Config, error)

Create and initialize afrog-config.yaml configuration info

func ReadConfiguration

func ReadConfiguration() (*Config, error)

ReadConfiguration reads the afrog configuration file from disk.

func (*Config) GetConfigPath

func (c *Config) GetConfigPath() string

type ConfigHttp

type ConfigHttp struct {
	Proxy               string `yaml:"proxy"`
	DialTimeout         int32  `yaml:"dial_timeout"`
	ReadTimeout         string `yaml:"read_timeout"`
	WriteTimeout        string `yaml:"write_timeout"`
	MaxRedirect         int32  `yaml:"max_redirect"`
	MaxIdle             string `yaml:"max_idle"`
	Concurrency         int    `yaml:"concurrency"`
	MaxConnsPerHost     int    `yaml:"max_conns_per_host"`
	MaxResponseBodySize int    `yaml:"max_responsebody_sizse"`
	UserAgent           string `yaml:"user_agent"`
}

type Options

type Options struct {
	// afrog-config.yaml configuration file
	Config *Config

	// Pocs Directory
	PocsDirectory utils.StringSlice

	// Target URLs/Domains to scan
	Targets utils.StringSlice

	// Target URLs/Domains to scan
	Target string

	// TargetsFilePath specifies the targets from a file to scan.
	TargetsFilePath string

	// PocsFilePath specifies the directory of pocs to scan.
	PocsFilePath string

	// output file to write found issues/vulnerabilities
	Output string

	// search PoC by keyword , eg: -s tomcat
	Search string

	SearchKeywords []string

	// no progress if silent is true
	Silent bool

	// pocs to run based on severity. Possible values: info, low, medium, high, critical
	Severity string

	SeverityKeywords []string

	// Scan Stable  eg: 1(generally)(default), 2(normal), 3(stablize)
	ScanStable string

	// disable output fingerprint in the console
	NoFinger bool

	// ports to scan eg: 80,443,8000-9000
	Port string

	// web port scan
	WebPort bool

	// disable show tips
	NoTips bool

	// update afrog-pocs
	UpdatePocs bool

	// show pocs list
	PrintPocs bool

	// Scan count num(targets * allpocs)
	Count int

	// Current Scan count num
	CurrentCount int

	// Thread lock
	OptLock sync.Mutex

	// Callback scan result
	ApiCallBack ApiCallBack

	// CheckLive
	CheckLiveMap sync.Map
}

func (*Options) CheckLiveByCount added in v1.3.6

func (o *Options) CheckLiveByCount(url string) bool

check live by count, alive if result is true else not alive.

func (*Options) CheckPocKeywords added in v1.3.3

func (o *Options) CheckPocKeywords(id, name string) bool

func (*Options) CheckPocSeverityKeywords added in v1.3.4

func (o *Options) CheckPocSeverityKeywords(severity string) bool

func (*Options) GetCheckLiveValue added in v1.3.6

func (o *Options) GetCheckLiveValue(key string) (int, bool)

func (*Options) SetCheckLiveValue added in v1.3.6

func (o *Options) SetCheckLiveValue(key string)

func (*Options) SetSearchKeyword added in v1.3.3

func (o *Options) SetSearchKeyword() bool

func (*Options) SetSeverityKeyword added in v1.3.4

func (o *Options) SetSeverityKeyword() bool

type Reverse

type Reverse struct {
	Ceye Ceye `yaml:"ceye"`
}

Jump to

Keyboard shortcuts

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