mirror of
https://github.com/chainreactors/spray.git
synced 2025-05-06 18:51:22 +00:00
probe中添加source.
This commit is contained in:
parent
30a82a7657
commit
45f325e02b
@ -13,6 +13,29 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func GetSourceName(s int) string {
|
||||||
|
switch s {
|
||||||
|
case 1:
|
||||||
|
return "check"
|
||||||
|
case 2:
|
||||||
|
return "index"
|
||||||
|
case 3:
|
||||||
|
return "random"
|
||||||
|
case 4:
|
||||||
|
return "redirect"
|
||||||
|
case 5:
|
||||||
|
return "crawl"
|
||||||
|
case 6:
|
||||||
|
return "active"
|
||||||
|
case 7:
|
||||||
|
return "word"
|
||||||
|
case 8:
|
||||||
|
return "waf"
|
||||||
|
default:
|
||||||
|
return "unknown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
|
func NewBaseline(u, host string, resp *ihttp.Response) *Baseline {
|
||||||
bl := &Baseline{
|
bl := &Baseline{
|
||||||
UrlString: u,
|
UrlString: u,
|
||||||
@ -216,6 +239,8 @@ func (bl *Baseline) Get(key string) string {
|
|||||||
return strconv.Itoa(bl.Status)
|
return strconv.Itoa(bl.Status)
|
||||||
case "spend":
|
case "spend":
|
||||||
return strconv.Itoa(int(bl.Spended))
|
return strconv.Itoa(int(bl.Spended))
|
||||||
|
case "source":
|
||||||
|
return GetSourceName(bl.Source)
|
||||||
case "extract":
|
case "extract":
|
||||||
return bl.Extracteds.String()
|
return bl.Extracteds.String()
|
||||||
case "frame", "framework":
|
case "frame", "framework":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user