Skip to content

Commit d3dd1ad

Browse files
chore: methods can be seperated by a comma
1 parent 137d21d commit d3dd1ad

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

v2/pkg/scan/scan.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,16 @@ func (s *Scanner) Scan(url string, payload string, header string) {
8181
}
8282

8383
if s.Config.Method != "" {
84-
s.MakeRequest(s.Config.Method, payload, url, header, s.Config.AppendMode, s.Config.IsParameters)
84+
// Split the list of methods seperated with a comma if the comma exists
85+
// Otherwise just use the method passed
86+
if strings.Contains(s.Config.Method, ",") {
87+
methods := strings.Split(s.Config.Method, ",")
88+
for _, method := range methods {
89+
s.MakeRequest(method, payload, url, header, s.Config.AppendMode, s.Config.IsParameters)
90+
}
91+
} else {
92+
s.MakeRequest(s.Config.Method, payload, url, header, s.Config.AppendMode, s.Config.IsParameters)
93+
}
8594
} else {
8695
methods := []string{"GET", "POST", "OPTIONS", "PUT"}
8796
for _, method := range methods {

0 commit comments

Comments
 (0)