pkg

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: GPL-3.0 Imports: 23 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)
	ActivePath  []string
	Fingers     fingers.Fingers
	JSRegexps   []*regexp.Regexp = []*regexp.Regexp{
		regexp.MustCompile(".(https{0,1}:[^\\s,^',^’,^\",^”,^>,^<,^;,^(,^),^|,^*,^\\[]{2,250}?[^=,^*,^\\s,^',^’,^\",^”,^>,^<,^:,^;,^*,^|,^(,^),^\\[]{3}[.]js)"),
		regexp.MustCompile("[\",',‘,“]\\s{0,6}(/{0,1}[^\\s,^',^’,^\",^”,^|,^>,^<,^:,^;,^*,^(,^\\),^\\[]{2,250}?[^=,^*,^\\s,^',^’,^|,^\",^”,^>,^<,^:,^;,^*,^(,^),^\\[]{3}[.]js)"),
		regexp.MustCompile("=\\s{0,6}[\",',’,”]{0,1}\\s{0,6}(/{0,1}[^\\s,^',^’,^\",^”,^|,^>,^<,^;,^*,^(,^),^\\[]{2,250}?[^=,^*,^\\s,^',^’,^\",^”,^>,^|,^<,^:,^;,^*,^(,^),^\\[]{3}[.]js)"),
	}
	URLRegexps []*regexp.Regexp = []*regexp.Regexp{
		regexp.MustCompile("[\",',‘,“]\\s{0,6}(https{0,1}:[^\\s,^',^’,^\",^”,^>,^<,^),^(]{2,250}?)\\s{0,6}[\",',‘,“]"),
		regexp.MustCompile("=\\s{0,6}(https{0,1}:[^\\s,^',^’,^\",^”,^>,^<,^),^(]{2,250})"),
		regexp.MustCompile("[\",',‘,“]\\s{0,6}([#,.]{0,2}/[^\\s,^',^’,^\",^”,^>,^<,^:,^),^(]{2,250}?)\\s{0,6}[\",',‘,“]"),
		regexp.MustCompile("href\\s{0,6}=\\s{0,6}[\",',‘,“]{0,1}\\s{0,6}([^\\s,^',^’,^\",^“,^>,^<,^,^+),^(]{2,250})|action\\s{0,6}=\\s{0,6}[\",',‘,“]{0,1}\\s{0,6}([^\\s,^',^’,^\",^“,^>,^<,^,^+),^(]{2,250})"),
	}
)
View Source
var (
	BadExt = []string{".js", ".css", ".scss", ",", ".jpeg", ".jpg", ".png", ".gif", ".ico", ".svg", ".vue", ".ts"}
	//BadURL   = []string{".js?", ".css?", ".jpeg?", ".jpg?", ".png?", ".gif?", "github.com", "www.w3.org", "example.com", "<", ">", "{", "}", "[", "]", "|", "^", ";", "/js/", ".src", ".url", ".att", ".href", "location.href", "javascript:", "location:", ".createObject", ":location", ".path", "*#__PURE__*", "\\n"}
	BadScoop = []string{"www.w3.org", "example.com"}
)
View Source
var Distance uint8 = 5
View Source
var Extractors = make(fingers.Extractors)
View Source
var ModMap = map[string]SprayMod{
	"path": PathSpray,
	"host": HostSpray,
}

Functions

func GetSourceName added in v0.6.1

func GetSourceName(s int) string

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 URLJoin added in v0.6.0

func URLJoin(base, uri string) string

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 {
	Number          int        `json:"number"`
	Url             *url.URL   `json:"-"`
	UrlString       string     `json:"url"`
	Path            string     `json:"path"`
	Host            string     `json:"host"`
	Body            []byte     `json:"-"`
	BodyLength      int        `json:"body_length"`
	ExceedLength    bool       `json:"-"`
	Header          []byte     `json:"-"`
	Raw             []byte     `json:"-"`
	HeaderLength    int        `json:"header_length"`
	RedirectURL     string     `json:"redirect_url,omitempty"`
	FrontURL        string     `json:"front_url,omitempty"`
	Status          int        `json:"status"`
	Spended         int64      `json:"spend"` // 耗时, 毫秒
	Title           string     `json:"title"`
	Frameworks      Frameworks `json:"frameworks"`
	Extracteds      Extracteds `json:"extracts"`
	ErrString       string     `json:"error"`
	Reason          string     `json:"reason"`
	IsValid         bool       `json:"valid"`
	IsFuzzy         bool       `json:"fuzzy"`
	Source          int        `json:"source"`
	ReqDepth        int        `json:"depth"`
	Recu            bool       `json:"-"`
	RecuDepth       int        `json:"-"`
	URLs            []string   `json:"-"`
	*parsers.Hashes `json:"hashes"`
}

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) Additional added in v0.1.1

func (bl *Baseline) Additional(key string) string

func (*Baseline) Collect

func (bl *Baseline) Collect()

Collect 深度收集信息

func (*Baseline) CollectURL

func (bl *Baseline) CollectURL()

func (*Baseline) ColorString added in v0.5.1

func (bl *Baseline) ColorString() string

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) Format added in v0.1.1

func (bl *Baseline) Format(probes []string) string

func (*Baseline) FuzzyCompare

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

func (*Baseline) Get added in v0.1.1

func (bl *Baseline) Get(key string) string

func (*Baseline) IsDir

func (bl *Baseline) IsDir() bool

func (*Baseline) Jsonify added in v0.1.1

func (bl *Baseline) Jsonify() string

func (*Baseline) String added in v0.1.1

func (bl *Baseline) String() string

type Config added in v0.1.0

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

type Extracteds added in v0.1.0

type Extracteds []*fingers.Extracted

func (Extracteds) String added in v0.4.0

func (es Extracteds) String() string

type Frameworks added in v0.1.0

type Frameworks []*parsers.Framework

func FingerDetect added in v0.1.0

func FingerDetect(content string) Frameworks

func (Frameworks) String added in v0.4.0

func (fs Frameworks) String() string

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"`
	Counts         map[int]int `json:"counts"`
	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) ColorDetail added in v0.5.1

func (stat *Statistor) ColorDetail() string

func (*Statistor) ColorString

func (stat *Statistor) ColorString() string

func (*Statistor) Detail added in v0.3.0

func (stat *Statistor) Detail() string

func (*Statistor) Json

func (stat *Statistor) Json() 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