plugin

package
v0.0.0-...-207f44f Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package plugin 加载插件、执行插件、获取插件信息,支持JSON和Go插件

Index

Constants

This section is empty.

Variables

View Source
var GoPlugins map[string][]GoPlugin

GoPlugins GO插件集

View Source
var JSONPlugins map[string][]JSONPlugin

JSONPlugins JSON插件集

Functions

func GetPlugins

func GetPlugins() (plugins []map[string]interface{})

GetPlugins 获取插件信息

func Regist

func Regist(target string, plugin GoPlugin)

Regist 注册插件

func Scan

func Scan(task Task) (result []map[string]interface{})

Scan 开始插件扫描

Types

type GoPlugin

type GoPlugin interface {
	Init() Plugin
	Check(netloc string, meta TaskMeta) bool
	GetResult() []Plugin
}

GoPlugin 插件接口

type JSONPlugin

type JSONPlugin struct {
	Target  string `json:"target"`
	Meta    Plugin `json:"meta"`
	Request struct {
		Path     string `json:"path"`
		PostData string `json:"postdata"`
	} `json:"request"`
	Verify struct {
		Type  string `json:"type"`
		Match string `json:"match"`
	} `json:"verify"`
	Extra bool
}

JSONPlugin JSON插件

type Plugin

type Plugin struct {
	Name       string     `json:"name"`
	Remarks    string     `json:"remarks"`
	Level      int        `json:"level"`
	Type       string     `json:"type"`
	Author     string     `json:"author"`
	References References `json:"references"`
	Request    string
	Response   string
}

Plugin 漏洞插件信息

type References

type References struct {
	URL  string `json:"url"`
	CVE  string `json:"cve"`
	KPID string `json:"kpid"`
}

References 插件附加信息

type Task

type Task struct {
	Type   string   `json:"type"`
	Netloc string   `json:"netloc"`
	Target string   `json:"target"`
	Meta   TaskMeta `json:"meta"`
}

Task 任务结构

type TaskMeta

type TaskMeta struct {
	System   string   `json:"system"`
	PathList []string `json:"pathlist"`
	FileList []string `json:"filelist"`
	PassList []string `json:"passlist"`
}

TaskMeta 任务额外信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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