Documentation
¶
Index ¶
- Variables
- func BakGenerator(domain string) []string
- func GetSourceName(s int) string
- func HasStdin() bool
- func LoadConfig(typ string) []byte
- func LoadTemplates() error
- func RandHost() string
- func RandPath() string
- func RemoveDuplication(arr []string) []string
- type Bar
- type Baseline
- func (bl *Baseline) Additional(key string) string
- func (bl *Baseline) Collect()
- func (bl *Baseline) CollectURL()
- func (bl *Baseline) ColorString() string
- func (bl *Baseline) Compare(other *Baseline) int
- func (bl *Baseline) Format(probes []string) string
- func (bl *Baseline) FuzzyCompare(other *Baseline) bool
- func (bl *Baseline) Get(key string) string
- func (bl *Baseline) IsDir() bool
- func (bl *Baseline) Jsonify() string
- func (bl *Baseline) String() string
- type Config
- type Frameworks
- type SprayMod
- type Statistor
- func (stat *Statistor) ColorCountString() string
- func (stat *Statistor) ColorSourceString() string
- func (stat *Statistor) ColorString() string
- func (stat *Statistor) CountString() string
- func (stat *Statistor) Json() string
- func (stat *Statistor) SourceString() string
- func (stat *Statistor) String() string
- type Statistors
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 //JSRegexps []*regexp.Regexp = []*regexp.Regexp{ // regexp.MustCompile(`.(https{0,1}:[^\s'’"”><()|*\[]{2,250}?[^=*\s'’><:;|()[]{3}\[]\.js)`), // regexp.MustCompile(`["']([^\s',’"”><;()|*:\[]{2,250}?[^=*\s'’|"”><^:;()\[]{3}\.js)`), // regexp.MustCompile(`=\s{0,6}["']{0,1}\s{0,6}([^\s^'’,+><;()|*\[]{2,250}?[^=,\s'’"”>|<:;*()\[]{3}\.js)`), //} //URLRegexps []*regexp.Regexp = []*regexp.Regexp{ // regexp.MustCompile(`=\s{0,6}(https{0,1}:[^\s'"><()|*\[]{2,250})`), // regexp.MustCompile(`["']([^\s',’"”><.@$;:()|*\[]{2,250}\.[a-zA-Z]\w{1,4})["']`), // regexp.MustCompile(`["'](https?:[^\s'"><()@|*\[]{2,250}?\.[^\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})`), //} ExtractRegexps map[string][]*regexp.Regexp = map[string][]*regexp.Regexp{} Extractors = make(parsers.Extractors) BadExt = []string{".js", ".css", ".scss", ".,", ".jpeg", ".jpg", ".png", ".gif", ".svg", ".vue", ".ts", ".swf", ".pdf", ".mp4"} 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 ModMap = map[string]SprayMod{ "path": PathSpray, "host": HostSpray, }
Functions ¶
func BakGenerator ¶
func GetSourceName ¶ added in v0.6.1
func LoadConfig ¶
func LoadTemplates ¶
func LoadTemplates() error
func RemoveDuplication ¶ added in v0.7.3
Types ¶
type Bar ¶
type Bar struct {
*uiprogress.Bar
// contains filtered or unexported fields
}
type Baseline ¶
type Baseline struct {
Number int `json:"number"`
Url *url.URL `json:"-"`
IsValid bool `json:"valid"`
IsFuzzy bool `json:"fuzzy"`
UrlString string `json:"url"`
Path string `json:"path"`
Dir bool `json:"-"`
Chunked bool `json:"-"`
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"` // 耗时, 毫秒
ContentType string `json:"content_type"`
Title string `json:"title"`
Frameworks Frameworks `json:"frameworks"`
Extracteds parsers.Extracteds `json:"extracts"`
ErrString string `json:"error"`
Reason string `json:"reason"`
Source int `json:"source"`
ReqDepth int `json:"depth"`
Distance uint8 `json:"distance"`
Recu bool `json:"-"`
RecuDepth int `json:"-"`
URLs []string `json:"-"`
*parsers.Hashes `json:"hashes"`
}
func NewInvalidBaseline ¶
func (*Baseline) Additional ¶ added in v0.1.1
func (*Baseline) CollectURL ¶
func (bl *Baseline) CollectURL()
func (*Baseline) ColorString ¶ added in v0.5.1
func (*Baseline) Compare ¶
Compare if totally equal return 1 if maybe equal return 0 not equal return -1
func (*Baseline) FuzzyCompare ¶
type Config ¶ added in v0.1.0
type Config struct {
BaseURL string
Thread int
Wordlist []string
Timeout int
RateLimit 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
AppendRule *rule.Program
OutputCh chan *Baseline
FuzzyCh chan *Baseline
Fuzzy bool
IgnoreWaf bool
Crawl bool
Active bool
Bak bool
Common bool
}
type Frameworks ¶ added in v0.1.0
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 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 NewStatistorFromStat ¶
func (*Statistor) ColorCountString ¶
func (*Statistor) ColorSourceString ¶
func (*Statistor) ColorString ¶
func (*Statistor) CountString ¶
func (*Statistor) SourceString ¶
type Statistors ¶
type Statistors []*Statistor
func ReadStatistors ¶
func ReadStatistors(filename string) (Statistors, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.