finger

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertInto added in v1.0.17

func InsertInto(s string, interval int, sep rune) string

func MatchWpPlugin added in v1.0.34

func MatchWpPlugin(banner *Banner) map[string]map[string]string

func NewClient added in v1.0.29

func NewClient(proxy string, timeout time.Duration) (*http.Client, error)

func NewTransport added in v1.0.29

func NewTransport(proxyURL string) (*http.Transport, error)

func ResponseDecoding

func ResponseDecoding(body []byte, label string) string

Types

type AppFinger

type AppFinger struct {
	Rules []*Rule

	Proxy string
	// contains filtered or unexported fields
}

func New

func New(options *Options) *AppFinger

func (*AppFinger) AddFinger

func (f *AppFinger) AddFinger(content string) error

func (*AppFinger) LoadAppFinger

func (f *AppFinger) LoadAppFinger(directory string)

func (*AppFinger) Match

func (f *AppFinger) Match(banner *Banner) map[string]map[string]string

func (*AppFinger) MatchURI

func (f *AppFinger) MatchURI(uri string) (*Banner, map[string]map[string]string)
type Banner struct {
	BodyHash    int32             `json:"body_hash"`
	Body        string            `json:"body"`
	Header      string            `json:"header"`
	Headers     map[string]string `json:"headers"`
	Title       string            `json:"title"`
	StatusCode  int               `json:"status_code"`
	Response    string            `json:"response"`
	SSL         bool              `json:"ssl"`
	Certificate string            `json:"certificate"`
	IconHash    int32             `json:"icon_hash"`
}

func Request

func Request(uri string, timeout time.Duration, proxyURL string, disableIcon bool) ([]*Banner, error)

type Options

type Options struct {
	Timeout           time.Duration
	Home              string
	Proxy             string
	DisableJavaScript bool
	DisableIcon       bool
}

type Rule

type Rule struct {
	Name              string `json:"name,omitempty"`
	MatchersCondition string `yaml:"matchers-condition" json:"matchers_condition,omitempty"`
	// 组件太多  采用层级匹配 优化匹配速度
	Require  []string            `json:"require,omitempty"`
	Matchers []*matchers.Matcher `json:"matchers,omitempty"`
}

func (*Rule) Match

func (r *Rule) Match(banner *Banner) (bool, map[string]string)

Jump to

Keyboard shortcuts

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