fingers

package
v2.8.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Info int = iota + 1
	Medium
	High
	Critical
)

Variables

This section is empty.

Functions

func FingerMatcher

func FingerMatcher(finger *Finger, content string, level int, sender func([]byte) (string, bool)) (*Framework, *Vuln, bool)

func RuleMatcher

func RuleMatcher(rule *Rule, content string, ishttp bool) (bool, bool, string)

Types

type Favicons

type Favicons struct {
	Mmh3 []string `yaml:"mmh3,omitempty" json:"mmh3,omitempty"`
	Md5  []string `yaml:"md5,omitempty" json:"md5,omitempty"`
}

type Finger

type Finger struct {
	Name        string   `yaml:"name" json:"name"`
	Protocol    string   `yaml:"protocol,omitempty" json:"protocol"`
	DefaultPort []string `yaml:"default_port,omitempty" json:"default_port,omitempty"`
	Focus       bool     `yaml:"focus,omitempty" json:"focus,omitempty"`
	Rules       Rules    `yaml:"rule,omitempty" json:"rule,omitempty"`
}

func (*Finger) Compile

func (finger *Finger) Compile(portHandler func([]string) []string) error

func (*Finger) Match added in v2.8.5

func (finger *Finger) Match(content string, level int, sender func([]byte) (string, bool)) (*Framework, *Vuln, bool)

func (*Finger) ToResult

func (finger *Finger) ToResult(hasFrame, hasVuln bool, res string, index int) (frame *Framework, vuln *Vuln)

type FingerMapper

type FingerMapper map[string][]*Finger

func (FingerMapper) GetFingers

func (fm FingerMapper) GetFingers(port string) []*Finger

type Fingers

type Fingers []*Finger

func LoadFingers

func LoadFingers(content []byte) (fingers Fingers, err error)

func (Fingers) Contain

func (fs Fingers) Contain(f *Finger) bool

func (Fingers) GroupByPort

func (fs Fingers) GroupByPort() FingerMapper

type Framework

type Framework struct {
	Name    string `json:"ft"`
	Version string `json:"fv"`
	From    string `json:"ff"`
	IsGuess bool   `json:"fg"`
	IsFocus bool   `json:"ffc"`
	Data    string `json:"-"`
}

func (Framework) ToString

func (f Framework) ToString() string

type Regexps

type Regexps struct {
	Body                  []string         `yaml:"body,omitempty" json:"body,omitempty"`
	MD5                   []string         `yaml:"md5,omitempty" json:"md5,omitempty"`
	MMH3                  []string         `yaml:"mmh3,omitempty" json:"mmh3,omitempty"`
	Regexp                []string         `yaml:"regexp,omitempty" json:"regexp,omitempty"`
	Version               []string         `yaml:"version,omitempty" json:"version,omitempty"`
	CompliedRegexp        []*regexp.Regexp `yaml:"-" json:"-"`
	CompiledVulnRegexp    []*regexp.Regexp `yaml:"-" json:"-"`
	CompiledVersionRegexp []*regexp.Regexp `yaml:"-" json:"-"`
	Header                []string         `yaml:"header,omitempty" json:"header,omitempty"`
	Vuln                  []string         `yaml:"vuln,omitempty" json:"vuln,omitempty"`
}

func (*Regexps) RegexpCompile

func (r *Regexps) RegexpCompile() error

type Rule

type Rule struct {
	Version     string    `yaml:"version,omitempty" json:"version,omitempty"`
	Favicon     *Favicons `yaml:"favicon,omitempty" json:"favicon,omitempty"`
	Regexps     *Regexps  `yaml:"regexps,omitempty" json:"regexps,omitempty"`
	SendDataStr string    `yaml:"send_data,omitempty" json:"send_data,omitempty"`
	SendData    senddata  `yaml:"-,omitempty" json:"-,omitempty"`
	Info        string    `yaml:"info,omitempty" json:"info,omitempty"`
	Vuln        string    `yaml:"vuln,omitempty" json:"vuln,omitempty"`
	Level       int       `yaml:"level,omitempty" json:"level,omitempty"`
}

func (*Rule) Match added in v2.8.5

func (rule *Rule) Match(content string, ishttp bool) (bool, bool, string)

type Rules

type Rules []*Rule

func (Rules) Compile

func (rs Rules) Compile() error

type Vuln

type Vuln struct {
	Name     string                 `json:"vn"`
	Payload  map[string]interface{} `json:"vp"`
	Detail   map[string]interface{} `json:"vd"`
	Severity string                 `json:"vs"`
}

func (*Vuln) GetDetail

func (v *Vuln) GetDetail() string

func (*Vuln) GetPayload

func (v *Vuln) GetPayload() string

func (*Vuln) ToString

func (v *Vuln) ToString() string

Jump to

Keyboard shortcuts

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