grab

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonNewCreated      = "漏洞创建"
	ReasonTagUpdated      = "标签更新"
	ReasonSeverityUpdated = "等级更新"
)

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient() *req.Client

Types

type AVDCrawler

type AVDCrawler struct {
	// contains filtered or unexported fields
}

func (*AVDCrawler) GetPageCount

func (a *AVDCrawler) GetPageCount(ctx context.Context, _ int) (int, error)

func (*AVDCrawler) IsValuable

func (a *AVDCrawler) IsValuable(info *VulnInfo) bool

func (*AVDCrawler) ParsePage

func (a *AVDCrawler) ParsePage(ctx context.Context, page, _ int) (chan *VulnInfo, error)

func (*AVDCrawler) ProviderInfo added in v0.2.0

func (a *AVDCrawler) ProviderInfo() *Provider

type Grabber

type Grabber interface {
	ProviderInfo() *Provider
	GetPageCount(ctx context.Context, size int) (int, error)
	ParsePage(ctx context.Context, page int, size int) (chan *VulnInfo, error)
	IsValuable(info *VulnInfo) bool
}

func NewAVDCrawler

func NewAVDCrawler() Grabber

func NewOSCSCrawler

func NewOSCSCrawler() Grabber

func NewTiCrawler

func NewTiCrawler() Grabber

type OSCSCrawler

type OSCSCrawler struct {
	// contains filtered or unexported fields
}

func (*OSCSCrawler) GetPageCount

func (t *OSCSCrawler) GetPageCount(ctx context.Context, size int) (int, error)

func (*OSCSCrawler) IsValuable

func (t *OSCSCrawler) IsValuable(info *VulnInfo) bool

func (*OSCSCrawler) ParsePage

func (t *OSCSCrawler) ParsePage(ctx context.Context, page, size int) (chan *VulnInfo, error)

func (*OSCSCrawler) ProviderInfo added in v0.2.0

func (t *OSCSCrawler) ProviderInfo() *Provider

type Provider added in v0.2.0

type Provider struct {
	Name        string
	DisplayName string
	Link        string
}

type ReasonType added in v0.3.0

type ReasonType string

type SeverityLevel

type SeverityLevel string
const (
	Low      SeverityLevel = "低危"
	Medium   SeverityLevel = "中危"
	High     SeverityLevel = "高危"
	Critical SeverityLevel = "严重"
)

type TiCrawler

type TiCrawler struct {
	// contains filtered or unexported fields
}

func (*TiCrawler) GetPageCount

func (t *TiCrawler) GetPageCount(ctx context.Context, size int) (int, error)

func (*TiCrawler) IsValuable

func (t *TiCrawler) IsValuable(info *VulnInfo) bool

func (*TiCrawler) ParsePage

func (t *TiCrawler) ParsePage(ctx context.Context, page, size int) (chan *VulnInfo, error)

func (*TiCrawler) ProviderInfo added in v0.2.0

func (t *TiCrawler) ProviderInfo() *Provider

type VulnInfo

type VulnInfo struct {
	UniqueKey   string        `json:"unique_key"`
	Title       string        `json:"title"`
	Description string        `json:"description"`
	Severity    SeverityLevel `json:"severity"`
	CVE         string        `json:"cve"`
	Disclosure  string        `json:"disclosure"`
	Solutions   string        `json:"solutions"`
	References  []string      `json:"references"`
	Tags        []string      `json:"tags"`
	From        string        `json:"from"`
	Reason      []string      `json:"reason"`

	Creator Grabber `json:"-"`
}

func (*VulnInfo) String

func (v *VulnInfo) String() string

Jump to

Keyboard shortcuts

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