Skip to content

Commit

Permalink
add debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Mar 24, 2022
1 parent 2e4ad1b commit 24cf7b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/server/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
dalfox "github.com/hahwul/dalfox/v2/lib"
"github.com/hahwul/dalfox/v2/pkg/model"
scan "github.com/hahwul/dalfox/v2/pkg/scanning"
vlogger "github.com/hahwul/volt/logger"
)

// ScanFromAPI is scanning dalfox with REST API
Expand All @@ -15,6 +16,7 @@ import (
// @Success 200 {object} Res
// @Router /scan [post]
func ScanFromAPI(url string, rqOptions model.Options, options model.Options, sid string) {
vLog := vlogger.GetLogger(options.Debug)
target := dalfox.Target{
URL: url,
Method: rqOptions.Method,
Expand All @@ -27,6 +29,8 @@ func ScanFromAPI(url string, rqOptions model.Options, options model.Options, sid
} else {
newOptions.Method = "GET"
}
vLog.WithField("data1", sid).Debug(url)
vLog.WithField("data1", sid).Debug(newOptions)
_, _ = scan.Scan(url, newOptions, sid)
}

Expand Down

0 comments on commit 24cf7b5

Please sign in to comment.