fx

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(p Plugin)

func AddLists

func AddLists(plist []Plugin)

func GenDefaultPlugin

func GenDefaultPlugin(pluginFile string) error

func GetTagCommit

func GetTagCommit(tag string) string

func StrContain

func StrContain(query, rawStr2 string) bool

StrContain string in strings

func StrEqual

func StrEqual(query, rawStr2 string) bool

StrEqual string in strings

func StrEqualInList

func StrEqualInList(query string, tags []string) bool

StrEqualInList string in strings

Types

type FoFaxQuery

type FoFaxQuery struct {
	Plugins []Plugin // query
	Query   map[string]bool
	Tags    map[string]bool
	Id      map[string]bool
}
var Info *FoFaxQuery

func NewFoFaxQuery

func NewFoFaxQuery(fxpath string) *FoFaxQuery

func (FoFaxQuery) ListTags

func (fx FoFaxQuery) ListTags()

func (FoFaxQuery) Search

func (fx FoFaxQuery) Search(id, query, ruleName, ruleEnglish, Author, tag string) (plugins []Plugin)

func (FoFaxQuery) SearchExpTab

func (fx FoFaxQuery) SearchExpTab(rawStrs string)

func (FoFaxQuery) SearchOr

func (fx FoFaxQuery) SearchOr(id, query, ruleName, ruleEnglish, Author, tag string) (plugins []Plugin)

func (FoFaxQuery) SearchOrTable

func (fx FoFaxQuery) SearchOrTable(id, query, ruleName, ruleEnglish, Author, tag string)

func (FoFaxQuery) SearchQueryExp

func (fx FoFaxQuery) SearchQueryExp(rawStrs string) (plugins []Plugin)

func (FoFaxQuery) SearchSingle

func (fx FoFaxQuery) SearchSingle(query string) (Plugin, error)

func (FoFaxQuery) SearchSingleTable

func (fx FoFaxQuery) SearchSingleTable(query string)

func (FoFaxQuery) SearchTable

func (fx FoFaxQuery) SearchTable(id, query, ruleName, ruleEnglish, Author, tag string)

type FxType

type FxType int
const (
	TypeInline FxType = iota
	TypeYaml
)

func (FxType) String

func (f FxType) String() string

type Plugin

type Plugin struct {
	Id          string   `table:"Id" yaml:"id"`
	Query       string   `table:"Query" yaml:"query"`              // 查询语法
	RuleName    string   `table:"RuleName" yaml:"rule_name"`       // 标题名
	RuleEnglish string   `table:"RuleEnglish" yaml:"rule_english"` // 规则英文名
	Description string   `table:"Description" yaml:"description"`  // 描述
	Author      string   `table:"Author" yaml:"author"`            // 作者
	FofaQuery   string   `table:"-" yaml:"fofa_query"`             // fofa查询
	Tag         []string `table:"Tag" yaml:"tag"`                  // 标签
	Type        FxType   `table:"Type" yaml:"-"`                   // 类别
	Source      string   `table:"Source" yaml:"source"`            // 来源
	FileDir     string   `table:"Source" yaml:"-"`                 // 来源
}

func LoadPlugin

func LoadPlugin(pathFile string) (*Plugin, error)

func (*Plugin) GenPlugin

func (base *Plugin) GenPlugin(pluginFile string)

func (Plugin) QueryString

func (f Plugin) QueryString() string

func (*Plugin) ShowInfoTable

func (q *Plugin) ShowInfoTable()

func (*Plugin) Valid added in v0.1.32

func (q *Plugin) Valid() error

type Tinfo

type Tinfo struct {
	Name  string `table:"Name"`
	Value string `table:"Value"`
}

Jump to

Keyboard shortcuts

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