aliyun_vuln

package
v0.0.0-...-056f41a Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Scheme = "https"
	Domain = "avd.aliyun.com"

	QueryKeyword = "q"
	CveType      = "cve"
	NonCveType   = "non-cve"
	AliyunType   = "aliyun"

	CvdVulnListPath    = "nvd/list"
	NonCvdVulnListPath = "nonvd/list"
	SearchPath         = "search"

	VulnDetailPath = "detail"
)
View Source
const (
	QueryType = "type"
	QueryPage = "page"
	QueryId   = "id"

	OS                = "操作系统"
	Database          = "数据库"
	Application       = "应用程序"
	WebApplication    = "WEB应用"
	HardwareEquipment = "硬件设备"
)

Variables

Functions

func GetVulnDetail

func GetVulnDetail(avdId string) (*model.VulnDetail, error)

func SearchForId

func SearchForId(vulnId string) (*model.VulnDetail, error)

SearchForId 通过cve id或者是avd id查询漏洞详情 TODO 写测试文件

func SearchVulnDetailByName

func SearchVulnDetailByName(vulnName string) ([]*model.VulnDetail, error)

SearchVulnDetailByName 通过 name 模糊查询漏洞详情

func SearchVulnListByName

func SearchVulnListByName(vulnName string) ([]*model.VulnList, error)

SearchVulnListByName 通过 name 模糊查询漏洞列表

Types

type AliyunVuln

type AliyunVuln interface {
	// GetPage 获取页码数据
	GetPage() (map[string]*Page, error)
	// GetMetadata 获取元数据
	GetMetadata() (*model.MetaData, error)
	// GetVulnList 获取漏洞列表数据
	GetVulnList(category string, page int) ([]*model.VulnList, error)
}

func NewAliyunVuln

func NewAliyunVuln(Type string) AliyunVuln

type CveCollector

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

func NewCveCollector

func NewCveCollector(scheme string, domain string, path string) *CveCollector

func (*CveCollector) GetMetadata

func (c *CveCollector) GetMetadata() (*model.MetaData, error)

func (*CveCollector) GetPage

func (c *CveCollector) GetPage() (map[string]*Page, error)

func (*CveCollector) GetVulnList

func (c *CveCollector) GetVulnList(category string, page int) ([]*model.VulnList, error)

type NonCveCollector

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

func NewNonCveCollector

func NewNonCveCollector(scheme string, domain string, path string) *NonCveCollector

func (*NonCveCollector) GetMetadata

func (c *NonCveCollector) GetMetadata() (*model.MetaData, error)

func (*NonCveCollector) GetPage

func (c *NonCveCollector) GetPage() (map[string]*Page, error)

func (*NonCveCollector) GetVulnList

func (c *NonCveCollector) GetVulnList(_ string, page int) ([]*model.VulnList, error)

type Page

type Page struct {
	Current int
	Total   int
	Record  int
}

func NewPage

func NewPage(text string) (*Page, error)

Jump to

Keyboard shortcuts

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