Documentation
¶
Index ¶
- Variables
- func BakGenerator(domain string) []string
- func BaseURL(u *url.URL) string
- func CRC16Hash(data []byte) uint16
- func CleanURL(u string) string
- func CompareWithExpr(exp *vm.Program, params map[string]interface{}) bool
- func Dir(u string) string
- func EngineDetect(content []byte) common.Frameworks
- func FilterJs(u string) bool
- func FilterUrl(u string) bool
- func FingersDetect(content []byte) common.Frameworks
- func FormatURL(base, u string) string
- func GetPresetWordList(key []string) []string
- func Load() error
- func LoadConfig(typ string) []byte
- func LoadExtractorConfig(filename string) ([]*parsers.Extractor, error)
- func LoadFileToSlice(filename string) ([]string, error)
- func LoadFingers() error
- func LoadPorts() error
- func LoadRuleAndCombine(filename []string) (string, error)
- func LoadRuleWithFiles(ruleFiles []string, filter string) ([]rule.Expression, error)
- func LoadTemplates() error
- func LoadWordlist(word string, dictNames []string) ([]string, error)
- func MatchWithGlobs(u string, globs []string) bool
- func ParseEXTPlaceholderFunc(exts []string) func(string) []string
- func ParseExtension(s string) string
- func ParseRawResponse(raw []byte) (*http.Response, error)
- func ParseStatus(preset []int, changed string) []int
- func RandHost() string
- func RandPath() string
- func RandomUA() string
- func RelaPath(base, u string) string
- func SafeFilename(filename string) string
- func SafePath(dir, u string) string
- func StatusContain(preset []int, status int) bool
- func UniqueInts(input []int) []int
- func WrapWordsFunc(f func(string) string) func(string) []string
- type BS
- type Bar
- type ErrorType
- 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 ( SkipChar = "%SKIP%" EXTChar = "%EXT%" )
View Source
var ( LogVerbose = logs.Warn - 2 LogFuzz = logs.Warn - 1 DefaultWhiteStatus = []int{200} // cmd input DefaultBlackStatus = []int{400, 410} // cmd input DefaultFuzzyStatus = []int{500, 501, 502, 503, 301, 302, 404} // cmd input DefaultUniqueStatus = []int{403, 200, 404} // 相同unique的403表示命中了同一条acl, 相同unique的200表示default页面 WhiteStatus = []int{} // cmd input, 200 BlackStatus = []int{} // cmd input, 400,410 FuzzyStatus = []int{} // cmd input, 500,501,502,503 WAFStatus = []int{493, 418, 1020, 406, 429, 406, 412} UniqueStatus = []int{} // 相同unique的403表示命中了同一条acl, 相同unique的200表示default页面 // plugins EnableAllFingerEngine = false )
View Source
var ( Rules map[string]string = make(map[string]string) Dicts map[string][]string = make(map[string][]string) 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"} ExtractRegexps = make(parsers.Extractors) Extractors = make(parsers.Extractors) FingerEngine *fingers.Engine ActivePath []string 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", } DefaultUserAgent = randomUserAgent[rand.Intn(uacount)] )
View Source
var ErrMap = map[ErrorType]string{ NoErr: "", ErrBadStatus: "blacklist status", ErrSameStatus: "same status with random baseline", ErrRequestFailed: "request failed", ErrWaf: "maybe banned by waf", ErrRedirect: "duplicate redirect url", ErrCompareFailed: "compare failed", ErrCustomCompareFailed: "custom compare failed", ErrCustomFilter: "custom filtered", ErrFuzzyCompareFailed: "fuzzy compare failed", ErrFuzzyRedirect: "fuzzy redirect", ErrFuzzyNotUnique: "not unique", ErrUrlError: "url parse error", ErrResponseError: "response parse error", }
View Source
var MbTable = []uint16{}/* 256 elements not displayed */
Functions ¶
func BakGenerator ¶
func EngineDetect ¶
func EngineDetect(content []byte) common.Frameworks
func GetPresetWordList ¶ added in v1.1.0
func LoadConfig ¶
func LoadFileToSlice ¶ added in v1.1.0
func LoadFingers ¶
func LoadFingers() error
func LoadRuleAndCombine ¶ added in v1.1.0
func LoadRuleWithFiles ¶ added in v1.1.0
func LoadRuleWithFiles(ruleFiles []string, filter string) ([]rule.Expression, error)
func LoadTemplates ¶
func LoadTemplates() error
func LoadWordlist ¶ added in v1.1.0
func MatchWithGlobs ¶
func ParseEXTPlaceholderFunc ¶ added in v1.1.2
func ParseExtension ¶ added in v1.1.0
func ParseStatus ¶ added in v1.1.0
ParseStatus parses the input string and updates the preset status filters.
func SafeFilename ¶ added in v1.1.0
func StatusContain ¶ added in v1.2.2
StatusContain checks if a status matches any of the preset filters. Preset values < 100 are treated as prefix filters (e.g. 5 = 5xx, 51 = 51x).
func UniqueInts ¶ added in v1.2.2
Types ¶
type Statistor ¶
type Statistor struct {
BaseUrl string `json:"url"`
Error string `json:"error"`
Counts map[int]int `json:"counts"`
Sources map[parsers.SpraySource]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"`
Skipped int `json:"skipped"`
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)
Click to show internal directories.
Click to hide internal directories.