Updated examples

dev
Ice3man543 2021-08-03 20:40:00 +05:30
parent 8130a76ff1
commit c9ad9cdff4
2 changed files with 9 additions and 13 deletions

View File

@ -71,9 +71,16 @@ type Request struct {
// be provided as payload which will be read on run-time.
// examples:
// - name: A payload list for Tomcat Bruteforce
// value: exampleTomcatUserPassPayload
// value: >
// map[string]interface{}{
// "username": []string{"tomcat", "admin"},
// "password": []string{"tomcat", "admin", "password"},
// }
// - name: A payload example of reading from file
// value: exampleFileBasedPayload
// value: >
// map[string]interface{}{
// "data": "helpers/payloads/command-injection.txt",
// }
Payloads map[string]interface{} `yaml:"payloads"`
// description: |
// Headers contains HTTP Headers to send with the request.

View File

@ -10,17 +10,6 @@ import (
"github.com/projectdiscovery/nuclei/v2/pkg/workflows"
)
// nolint:deadcode // this is intentional
var (
exampleTomcatUserPassPayload = map[string]interface{}{
"username": []string{"tomcat", "admin"},
"password": []string{"tomcat", "admin", "password"},
}
exampleFileBasedPayload = map[string]interface{}{
"data": "helpers/payloads/command-injection.txt",
}
)
// Template is a YAML input file which defines the requests and
// others metadata for a scan template.
type Template struct {