config

package
v0.0.0-...-ff8f6dd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "2.5.2"

Variables

View Source
var (
	ReverseCeyeApiKey string
	ReverseCeyeDomain string
	ReverseJndi       string
	ReverseLdapPort   string
	ReverseApiPort    string
)

Functions

func EngineV

func EngineV(u *upgrade.Upgrade) string

func PocV

func PocV(u *upgrade.Upgrade) string

func ShowBanner

func ShowBanner(u *upgrade.Upgrade)

func ShowUpgradeBanner

func ShowUpgradeBanner(upgrade *upgrade.Upgrade)

func WriteConfiguration

func WriteConfiguration(config *Config) error

WriteConfiguration writes the updated afrog configuration to disk

Types

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 NewConfig

func NewConfig() (*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 Jndi

type Jndi struct {
	JndiAddress string `yaml:"jndi_address"`
	LdapPort    string `yaml:"ldap_port"`
	ApiPort     string `yaml:"api_port"`
}

type Options

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

	// Pocs Directory
	PocsDirectory utils.StringSlice

	Targets sliceutil.SafeSlice

	// target URLs/hosts to scan
	Target goflags.StringSlice

	// list of target URLs/hosts to scan (one per line)
	TargetsFile string

	// PoC file or directory to scan
	PocFile string

	// show afrog-pocs list
	PocList bool

	// show a afrog-pocs detail
	PocDetail string

	// file to write output to (optional), support format: html
	Output string

	// file to write output to (optional), support format: json
	Json string

	// file to write output to (optional), support format: json
	JsonAll 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

	// update afrog-pocs
	UpdatePocs bool

	// update afrog version
	Update bool

	// Disable update check
	DisableUpdateCheck bool

	//
	MonitorTargets bool

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

	// Current Scan count num
	CurrentCount uint32

	// Thread lock
	OptLock sync.Mutex

	// maximum number of requests to send per second (default 150)
	RateLimit int

	// maximum number of afrog-pocs to be executed in parallel (default 25)
	Concurrency int

	// number of times to retry a failed request (default 1)
	Retries int

	//
	MaxHostError int

	// time to wait in seconds before timeout (default 10)
	Timeout int

	// http/socks5 proxy to use
	Proxy string

	MaxRespBodySize int

	// afrog process count (target total × pocs total)
	ProcessTotal uint32

	DisableOutputHtml bool

	OJ *output.OutputJson
}

func NewOptions

func NewOptions() (*Options, error)

func (*Options) CheckPocKeywords

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

func (*Options) CheckPocSeverityKeywords

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

func (*Options) PrintPocList

func (o *Options) PrintPocList() error

func (*Options) SetSearchKeyword

func (o *Options) SetSearchKeyword() bool

func (*Options) SetSeverityKeyword

func (o *Options) SetSeverityKeyword() bool

func (*Options) ShowPocDetail

func (o *Options) ShowPocDetail(pocname string) error

type Reverse

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

Jump to

Keyboard shortcuts

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