Skip to content

Commit

Permalink
change log format
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Aug 8, 2020
1 parent a0a4759 commit c8783d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/printing/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func DalLog(level, text string, optionsStr map[string]string) {
} else {
if level == "PRINT" {
ftext = "[POC] "+text
fmt.Println(aurora.BrightGreen("[POC] "+text))
fmt.Println(aurora.BrightGreen("[POC]"+text))
} else {
text = "\r" + text
fmt.Fprintln(os.Stderr, text)
Expand Down
16 changes: 8 additions & 8 deletions pkg/scanning/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func Scan(target string, optionsStr map[string]string, optionsBool map[string]bo
code := CodeView(resbody, v["payload"])
printing.DalLog("VULN", "Reflected Payload in JS: "+v["param"]+"="+v["payload"], optionsStr)
printing.DalLog("CODE", code, optionsStr)
printing.DalLog("PRINT", "[FOUND] "+k.URL.String(), optionsStr)
printing.DalLog("PRINT", "[R] "+k.URL.String(), optionsStr)
vStatus[v["param"]] = true
if optionsStr["foundAction"] != "" {
foundAction(optionsStr, target, k.URL.String(), "VULN")
Expand All @@ -355,7 +355,7 @@ func Scan(target string, optionsStr map[string]string, optionsBool map[string]bo
code := CodeView(resbody, v["payload"])
printing.DalLog("VULN", "Triggered XSS Payload (found DOM Object): "+v["param"]+"="+v["payload"], optionsStr)
printing.DalLog("CODE", code, optionsStr)
printing.DalLog("PRINT", k.URL.String(), optionsStr)
printing.DalLog("PRINT", "[V] "+k.URL.String(), optionsStr)
vStatus[v["param"]] = true
if optionsStr["foundAction"] != "" {
foundAction(optionsStr, target, k.URL.String(), "VULN")
Expand All @@ -368,7 +368,7 @@ func Scan(target string, optionsStr map[string]string, optionsBool map[string]bo
code := CodeView(resbody, v["payload"])
printing.DalLog("WEAK", "Reflected Payload in Attribute: "+v["param"]+"="+v["payload"], optionsStr)
printing.DalLog("CODE", code, optionsStr)
printing.DalLog("PRINT", k.URL.String(), optionsStr)
printing.DalLog("PRINT", "[R] "+k.URL.String(), optionsStr)
if optionsStr["foundAction"] != "" {
foundAction(optionsStr, target, k.URL.String(), "WEAK")
}
Expand All @@ -382,7 +382,7 @@ func Scan(target string, optionsStr map[string]string, optionsBool map[string]bo
code := CodeView(resbody, v["payload"])
printing.DalLog("VULN", "Triggered XSS Payload (found DOM Object): "+v["param"]+"="+v["payload"], optionsStr)
printing.DalLog("CODE", code, optionsStr)
printing.DalLog("PRINT", k.URL.String(), optionsStr)
printing.DalLog("PRINT", "[V] "+k.URL.String(), optionsStr)
vStatus[v["param"]] = true
if optionsStr["foundAction"] != "" {
foundAction(optionsStr, target, k.URL.String(), "VULN")
Expand All @@ -395,7 +395,7 @@ func Scan(target string, optionsStr map[string]string, optionsBool map[string]bo
code := CodeView(resbody, v["payload"])
printing.DalLog("WEAK", "Reflected Payload in HTML: "+v["param"]+"="+v["payload"], optionsStr)
printing.DalLog("CODE", code, optionsStr)
printing.DalLog("PRINT", k.URL.String(), optionsStr)
printing.DalLog("PRINT", "[R] "+k.URL.String(), optionsStr)
if optionsStr["foundAction"] != "" {
foundAction(optionsStr, target, k.URL.String(), "WEAK")
}
Expand Down Expand Up @@ -686,15 +686,15 @@ func SendReq(req *http.Request, payload string, optionsStr map[string]string) (s
for _, vv := range v {
printing.DalLog("CODE", vv, optionsStr)
}
printing.DalLog("PRINT", req.URL.String(), optionsStr)
printing.DalLog("PRINT", "[G] "+req.URL.String(), optionsStr)
}
} else {
// other case
printing.DalLog("GREP", "Found "+k+" via built-in grepping / payload: "+payload, optionsStr)
for _, vv := range v {
printing.DalLog("CODE", vv, optionsStr)
}
printing.DalLog("PRINT", req.URL.String(), optionsStr)
printing.DalLog("PRINT", "[G] "+req.URL.String(), optionsStr)
}
}

Expand All @@ -711,7 +711,7 @@ func SendReq(req *http.Request, payload string, optionsStr map[string]string) (s
for _, vv := range v {
printing.DalLog("CODE", vv, optionsStr)
}
printing.DalLog("PRINT", req.URL.String(), optionsStr)
printing.DalLog("PRINT", "[G] "+req.URL.String(), optionsStr)
}
}

Expand Down

0 comments on commit c8783d0

Please sign in to comment.