pkg

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Md5Fingers     map[string]string = make(map[string]string)
	Mmh3Fingers    map[string]string = make(map[string]string)
	Rules          map[string]string = make(map[string]string)
	ActivePath     []string
	Fingers        fingers.Fingers
	ExtractRegexps = map[string][]*parsers.Extractor{}
	Extractors     = make(parsers.Extractors)

	BadExt = []string{".js", ".css", ".scss", ".,", ".jpeg", ".jpg", ".png", ".gif", ".svg", ".vue", ".ts", ".swf", ".pdf", ".mp4", ".zip", ".rar"}
	BadURL = []string{";", "}", "\\n", "webpack://", "{", "www.w3.org", ".src", ".url", ".att", ".href", "location.href", "javascript:", "location:", ".createObject", ":location", ".path"}

	ContentTypeMap = map[string]string{
		"application/javascript":   "js",
		"application/json":         "json",
		"application/xml":          "xml",
		"application/octet-stream": "bin",
		"application/atom+xml":     "atom",
		"application/msword":       "doc",
		"application/pdf":          "pdf",
		"image/gif":                "gif",
		"image/jpeg":               "jpg",
		"image/png":                "png",
		"image/svg+xml":            "svg",
		"text/css":                 "css",
		"text/plain":               "txt",
		"text/html":                "html",
		"audio/mpeg":               "mp3",
		"video/mp4":                "mp4",
		"video/ogg":                "ogg",
		"video/webm":               "webm",
		"video/x-ms-wmv":           "wmv",
		"video/avi":                "avi",
		"image/x-icon":             "ico",
	}
)
View Source
var Distance uint8 = 5 // 数字越小越相似, 数字为0则为完全一致.
View Source
var MbTable = []uint16{}/* 256 elements not displayed */
View Source
var ModMap = map[string]SprayMod{
	"path": PathSpray,
	"host": HostSpray,
}

Functions

func BakGenerator

func BakGenerator(domain string) []string

func CRC16Hash

func CRC16Hash(data []byte) uint16

func FingerDetect added in v0.1.0

func FingerDetect(content string) parsers.Frameworks

func HasStdin added in v0.1.0

func HasStdin() bool

func LoadConfig

func LoadConfig(typ string) []byte

func LoadTemplates

func LoadTemplates() error

func RandHost

func RandHost() string

func RandPath

func RandPath() string

func RemoveDuplication added in v0.7.3

func RemoveDuplication(arr []string) []string

func UniqueHash

func UniqueHash(bl *Baseline) uint16

Types

type Bar

type Bar struct {
	*uiprogress.Bar
	// contains filtered or unexported fields
}

func NewBar

func NewBar(u string, total int, progress *uiprogress.Progress) *Bar

func (*Bar) Close

func (bar *Bar) Close()

func (*Bar) Done

func (bar *Bar) Done()

type Baseline

type Baseline struct {
	*parsers.SprayResult
	Unique    uint16   `json:"-"`
	Url       *url.URL `json:"-"`
	Dir       bool     `json:"-"`
	Chunked   bool     `json:"-"`
	Body      []byte   `json:"-"`
	Header    []byte   `json:"-"`
	Raw       []byte   `json:"-"`
	Recu      bool     `json:"-"`
	RecuDepth int      `json:"-"`
	URLs      []string `json:"-"`
	Collected bool     `json:"-"`
}

func NewBaseline

func NewBaseline(u, host string, resp *ihttp.Response) *Baseline

func NewInvalidBaseline

func NewInvalidBaseline(u, host string, resp *ihttp.Response, reason string) *Baseline

func (*Baseline) Collect

func (bl *Baseline) Collect()

Collect 深度收集信息

func (*Baseline) CollectURL

func (bl *Baseline) CollectURL()

func (*Baseline) Compare

func (bl *Baseline) Compare(other *Baseline) int

Compare if totally equal return 1 if maybe equal return 0 not equal return -1

func (*Baseline) FuzzyCompare

func (bl *Baseline) FuzzyCompare(other *Baseline) bool

func (*Baseline) IsDir

func (bl *Baseline) IsDir() bool

type Config added in v0.1.0

type Config struct {
	BaseURL        string
	Thread         int
	Wordlist       []string
	Timeout        int
	RateLimit      int
	CheckPeriod    int
	ErrPeriod      int32
	BreakThreshold int32
	Method         string
	Mod            SprayMod
	Headers        map[string]string
	ClientType     int
	MatchExpr      *vm.Program
	FilterExpr     *vm.Program
	RecuExpr       *vm.Program
	AppendRule     *rule.Program
	OutputCh       chan *Baseline
	FuzzyCh        chan *Baseline
	Fuzzy          bool
	IgnoreWaf      bool
	Crawl          bool
	Active         bool
	Bak            bool
	Common         bool
}

type SprayMod added in v0.1.0

type SprayMod int
const (
	PathSpray SprayMod = iota + 1
	HostSpray
	ParamSpray
	CustomSpray
)

type Statistor

type Statistor struct {
	BaseUrl        string      `json:"url"`
	Error          string      `json:"error"`
	Counts         map[int]int `json:"counts"`
	Sources        map[int]int `json:"sources"`
	FailedNumber   int32       `json:"failed"`
	ReqTotal       int32       `json:"req_total"`
	CheckNumber    int         `json:"check"`
	FoundNumber    int         `json:"found"`
	FilteredNumber int         `json:"filtered"`
	FuzzyNumber    int         `json:"fuzzy"`
	WafedNumber    int         `json:"wafed"`
	End            int         `json:"end"`
	Offset         int         `json:"offset"`
	Total          int         `json:"total"`
	StartTime      int64       `json:"start_time"`
	EndTime        int64       `json:"end_time"`
	WordCount      int         `json:"word_count"`
	Word           string      `json:"word"`
	Dictionaries   []string    `json:"dictionaries"`
	RuleFiles      []string    `json:"rule_files"`
	RuleFilter     string      `json:"rule_filter"`
}
var DefaultStatistor Statistor

func NewStatistor

func NewStatistor(url string) *Statistor

func NewStatistorFromStat

func NewStatistorFromStat(origin *Statistor) *Statistor

func (*Statistor) ColorCountString

func (stat *Statistor) ColorCountString() string

func (*Statistor) ColorSourceString

func (stat *Statistor) ColorSourceString() string

func (*Statistor) ColorString

func (stat *Statistor) ColorString() string

func (*Statistor) CountString

func (stat *Statistor) CountString() string

func (*Statistor) Json

func (stat *Statistor) Json() string

func (*Statistor) SourceString

func (stat *Statistor) SourceString() string

func (*Statistor) String

func (stat *Statistor) String() string

type Statistors

type Statistors []*Statistor

func ReadStatistors

func ReadStatistors(filename string) (Statistors, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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