Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConstProtocol = "protocol" ConstMd5 = "md5" ConstHeader = "header" ConstHeaders = "headers" ConstBody = "body" ConstTitle = "title" ConstServer = "server" ConstBanner = "banner" ConstPort = "port" ConstPath = "path" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPE ¶
type CPE struct { Part string `yaml:"part,omitempty" json:"part"` Vendor string `yaml:"vendor,omitempty" json:"vendor"` Product string `yaml:"product,omitempty" json:"product"` Version string `yaml:"version,omitempty" json:"version"` Update string `yaml:"update,omitempty" json:"update"` Edition string `yaml:"edition,omitempty" json:"edition"` Language string `yaml:"language,omitempty" json:"language"` }
func Execute ¶
func Execute(getter func(path string) (*MatchResource, error), rule *FingerPrintRule) (cpe *CPE, err error)
func ParseToCPE ¶
type FingerPrintRule ¶
type FingerPrintRule struct { Method string WebPath string MatchParam *MatchMethodParam // contains filtered or unexported fields }
func NewEmptyFingerPrintRule ¶
func NewEmptyFingerPrintRule() *FingerPrintRule
func (*FingerPrintRule) ToOpCodes ¶
func (f *FingerPrintRule) ToOpCodes() []*OpCode
type GeneralRule ¶
type GeneralRule struct { gorm.Model *CPE WebPath string ExtInfo string MatchExpression string `gorm:"uniqueIndex"` }
func DecompileFingerprintRuleOpCodes ¶
func DecompileFingerprintRuleOpCodes(codes []*OpCode) (*GeneralRule, error)
func NewEmptyGeneralRule ¶
func NewEmptyGeneralRule() *GeneralRule
func ParseGeneralRule ¶
func ParseGeneralRule(s string) (*GeneralRule, error)
func (*GeneralRule) String ¶
func (g *GeneralRule) String() string
type MatchMethodParam ¶
type MatchMethodParam struct { ExtParams map[string]any Info *CPE // regexp RegexpPattern string Keyword *webfingerprint.KeywordMatcher // complex Condition string SubRules []*FingerPrintRule // http header HeaderKey string HeaderMatchRule *FingerPrintRule //md5 Md5 string // exp Params []any Op string }
type MatchResource ¶
func NewHttpResource ¶
func NewHttpResource(data []byte) *MatchResource
Click to show internal directories.
Click to hide internal directories.