vuln

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_COMMON byte = iota
	TYPE_CPE
	TYPE_NUCLEI
)

Variables

View Source
var (
	TEMPLATES_OUTER_FOLDER = "templates"
	TEMPLATE_INNER_FOLDER  = "inner"
	TEMPLATE_CUSTOM_FOLDER = "custom"
	NUCLEI_BINARY          = "nuclei"
	TEMPLATES_URL          = "https://github.com/dusbot/templates"

	PingProgressRate       = 10
	CommonTaskProgressRate = 25
	CPETaskProgressRate    = 25
	NucleiProgressRate     = 40
)

Functions

This section is empty.

Types

type CPEResult added in v0.1.10

type CPEResult struct {
	Url  string
	CVEs []string
}

type CommonResult added in v0.1.10

type CommonResult struct {
	Name    string
	Url     string
	Method  string
	Payload string
	Proof   string
}

type Engine added in v0.1.6

type Engine struct {
	TemplatePath       string
	TemplateInnerPath  string
	TemplateCustomPath string
	Templates          []*templates.Template
}

func NewEngine

func NewEngine() (*Engine, error)

func (*Engine) AddTemplate added in v0.1.6

func (e *Engine) AddTemplate(fileName string, buf []byte) (err error)

func (*Engine) CheckTemplatesUpdate added in v0.1.9

func (e *Engine) CheckTemplatesUpdate() (needUpdate bool)

func (*Engine) ExecuteCPE added in v0.1.10

func (e *Engine) ExecuteCPE(items []TargetItem, resultPipe chan VulnResult, progressRate *atomic.Int32)

func (*Engine) ExecuteCommon added in v0.1.10

func (e *Engine) ExecuteCommon(urls []string) (results []*CommonResult)

func (*Engine) ExecuteNuclei added in v0.1.10

func (e *Engine) ExecuteNuclei(
	targetItems []TargetItem,
	templateIDs, proxies []string,
	resultPipe chan VulnResult,
	nucleiProgressRate *atomic.Int32,
)

func (*Engine) Init added in v0.1.6

func (e *Engine) Init() error

func (*Engine) ListTemplates added in v0.1.6

func (e *Engine) ListTemplates() []*templates.Template

func (*Engine) Scan added in v0.1.6

func (e *Engine) Scan(t VulnTask)

func (*Engine) UpdateTemplates added in v0.1.9

func (e *Engine) UpdateTemplates() error

type TargetItem added in v0.1.10

type TargetItem struct {
	Url  string
	Tags []string
	CPEs []string
}

type TaskStat added in v0.1.10

type TaskStat struct {
	ProgressPipe           chan int
	ResultPipe             chan VulnResult
	ProgressPipeClosed     atomic.Bool
	ResultPipeClosed       atomic.Bool
	PingTaskProgress       *atomic.Int32
	NucleiTaskProgress     *atomic.Int32
	CPETaskRateProgress    *atomic.Int32
	CommonTaskRateProgress *atomic.Int32
}

func InitTaskStat added in v0.1.10

func InitTaskStat() *TaskStat

type VulnResult added in v0.1.10

type VulnResult struct {
	Type          byte
	CommonResults []*CommonResult
	NucleiResults []*output.ResultEvent
	CPEResults    []*CPEResult
}

type VulnTask added in v0.1.10

type VulnTask struct {
	TargetItems []TargetItem

	Proxies []string

	TemplateIDs []string

	Stat *TaskStat
}

Jump to

Keyboard shortcuts

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