Documentation ¶
Index ¶
- Constants
- func ExtractCharset(htmlContent string) string
- func ExtractContentTypeCharset(contentType string) (charset string)
- func InsertInto(s string, interval int, sep rune) string
- func MatchWpPlugin(banner *Banner) map[string]map[string]string
- func NewClient(options ...ClientOption) (*http.Client, error)
- func NewTransport(uri string) (*http.Transport, error)
- func ResponseDecoding(body []byte, label string) string
- type AppFinger
- func (f *AppFinger) AddFinger(content string) error
- func (f *AppFinger) ExecuteWithPlugin(banner *Banner, plugin *RulePlugin) ([]*Banner, error)
- func (f *AppFinger) LoadAppFinger(directory string)
- func (f *AppFinger) Match(banner *Banner, rules []*Rule) RuleResult
- func (f *AppFinger) MatchPlugin(banner *Banner) []*RulePlugin
- func (f *AppFinger) MatchRule(banner *Banner) RuleResult
- func (f *AppFinger) MatchURI(uri string) (banner *Banner, fingerprints map[string]map[string]string, err error)
- type Banner
- type ClientOption
- type Options
- type Rule
- type RulePlugin
- type RuleResult
Constants ¶
View Source
const JSExecuteTemplate = `` /* 813-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ExtractCharset ¶ added in v1.1.6
func ExtractContentTypeCharset ¶ added in v1.1.6
func MatchWpPlugin ¶ added in v1.0.34
func NewTransport ¶ added in v1.0.29
NewTransport 创建一个带有 SOCKS5 代理的 http.Transport
func ResponseDecoding ¶
Types ¶
type AppFinger ¶
type AppFinger struct { Rules []*Rule Plugins []*Rule Proxy string // contains filtered or unexported fields }
func (*AppFinger) ExecuteWithPlugin ¶ added in v1.2.11
func (f *AppFinger) ExecuteWithPlugin(banner *Banner, plugin *RulePlugin) ([]*Banner, error)
func (*AppFinger) LoadAppFinger ¶
func (*AppFinger) MatchPlugin ¶ added in v1.2.11
func (f *AppFinger) MatchPlugin(banner *Banner) []*RulePlugin
func (*AppFinger) MatchRule ¶ added in v1.2.11
func (f *AppFinger) MatchRule(banner *Banner) RuleResult
type Banner ¶
type Banner struct { Uri string `json:"uri"` BodyHash int32 `json:"body_hash"` Body string `json:"body"` Header string `json:"header"` Headers map[string]string `json:"-"` Title string `json:"title"` StatusCode int `json:"status_code"` Response string `json:"_"` SSL bool `json:"ssl"` Certificate string `json:"certificate"` IconHash int32 `json:"icon_hash"` IconType string `json:"icon_type"` Charset string `json:"-"` Cert *tls.ConnectionState `json:"-"` IconURI string `json:"icon_uri"` IconBytes []byte `json:"-"` }
type ClientOption ¶ added in v1.2.12
func WithRedirectPolicy ¶ added in v1.2.12
WithRedirectPolicy 自定义重定向策略
func WithTimeout ¶ added in v1.2.12
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout 配置超时时间
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"` Plugins []*RulePlugin `yaml:"plugins"` }
type RulePlugin ¶ added in v1.2.11
type RulePlugin struct {
Path string `yaml:"path" json:"path,omitempty"`
}
type RuleResult ¶ added in v1.2.11
type RuleResult struct { Extract map[string]map[string]string Plugins []*RulePlugin }
Click to show internal directories.
Click to hide internal directories.