mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 18:15:28 +00:00
misc sniper cleanups
This commit is contained in:
parent
cefb4094d3
commit
a9cb83ff27
@ -823,14 +823,14 @@ in a combined manner allowing multirequest based matchers.
|
||||
|
||||
Attack is the type of payload combinations to perform.
|
||||
|
||||
Sniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
Batteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
permutations and combinations for all payloads.
|
||||
|
||||
|
||||
Valid values:
|
||||
|
||||
|
||||
- <code>sniper</code>
|
||||
- <code>batteringram</code>
|
||||
|
||||
- <code>pitchfork</code>
|
||||
|
||||
@ -2312,14 +2312,14 @@ host:
|
||||
|
||||
Attack is the type of payload combinations to perform.
|
||||
|
||||
Sniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
Batteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
permutations and combinations for all payloads.
|
||||
|
||||
|
||||
Valid values:
|
||||
|
||||
|
||||
- <code>sniper</code>
|
||||
- <code>batteringram</code>
|
||||
|
||||
- <code>pitchfork</code>
|
||||
|
||||
|
||||
@ -606,7 +606,7 @@
|
||||
},
|
||||
"attack": {
|
||||
"enum": [
|
||||
"sniper",
|
||||
"batteringram",
|
||||
"pitchfork",
|
||||
"clusterbomb"
|
||||
],
|
||||
@ -777,7 +777,7 @@
|
||||
},
|
||||
"attack": {
|
||||
"enum": [
|
||||
"sniper",
|
||||
"batteringram",
|
||||
"pitchfork",
|
||||
"clusterbomb"
|
||||
],
|
||||
|
||||
@ -14,7 +14,7 @@ type Generator struct {
|
||||
type Type int
|
||||
|
||||
const (
|
||||
// Sniper replaces one iteration of the payload with a value.
|
||||
// Batteringram replaces same payload into all of the defined payload positions at once.
|
||||
BatteringRam Type = iota + 1
|
||||
// PitchFork replaces variables with positional value from multiple wordlists
|
||||
PitchFork
|
||||
@ -43,10 +43,10 @@ func New(payloads map[string]interface{}, payloadType Type, templatePath string)
|
||||
generator.Type = payloadType
|
||||
generator.payloads = compiled
|
||||
|
||||
// Validate the sniper/batteringram payload set
|
||||
// Validate the batteringram payload set
|
||||
if payloadType == BatteringRam {
|
||||
if len(payloads) != 1 {
|
||||
return nil, errors.New("sniper/batteringram must have single payload set")
|
||||
return nil, errors.New("batteringram must have single payload set")
|
||||
}
|
||||
}
|
||||
return generator, nil
|
||||
|
||||
@ -46,13 +46,13 @@ type Request struct {
|
||||
// description: |
|
||||
// Attack is the type of payload combinations to perform.
|
||||
//
|
||||
// Sniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
// batteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
// permutations and combinations for all payloads.
|
||||
// values:
|
||||
// - "sniper"
|
||||
// - "batteringram"
|
||||
// - "pitchfork"
|
||||
// - "clusterbomb"
|
||||
AttackType string `yaml:"attack,omitempty" jsonschema:"title=attack is the payload combination,description=Attack is the type of payload combinations to perform,enum=sniper,enum=pitchfork,enum=clusterbomb"`
|
||||
AttackType string `yaml:"attack,omitempty" jsonschema:"title=attack is the payload combination,description=Attack is the type of payload combinations to perform,enum=batteringram,enum=pitchfork,enum=clusterbomb"`
|
||||
// description: |
|
||||
// Method is the HTTP Request Method.
|
||||
// values:
|
||||
|
||||
@ -35,13 +35,13 @@ type Request struct {
|
||||
// description: |
|
||||
// Attack is the type of payload combinations to perform.
|
||||
//
|
||||
// Sniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
// Batteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates
|
||||
// permutations and combinations for all payloads.
|
||||
// values:
|
||||
// - "sniper"
|
||||
// - "batteringram"
|
||||
// - "pitchfork"
|
||||
// - "clusterbomb"
|
||||
AttackType string `yaml:"attack,omitempty" jsonschema:"title=attack is the payload combination,description=Attack is the type of payload combinations to perform,enum=sniper,enum=pitchfork,enum=clusterbomb"`
|
||||
AttackType string `yaml:"attack,omitempty" jsonschema:"title=attack is the payload combination,description=Attack is the type of payload combinations to perform,enum=batteringram,enum=pitchfork,enum=clusterbomb"`
|
||||
// description: |
|
||||
// Payloads contains any payloads for the current request.
|
||||
//
|
||||
|
||||
@ -317,10 +317,10 @@ func init() {
|
||||
HTTPRequestDoc.Fields[7].Name = "attack"
|
||||
HTTPRequestDoc.Fields[7].Type = "string"
|
||||
HTTPRequestDoc.Fields[7].Note = ""
|
||||
HTTPRequestDoc.Fields[7].Description = "Attack is the type of payload combinations to perform.\n\nSniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
|
||||
HTTPRequestDoc.Fields[7].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
|
||||
HTTPRequestDoc.Fields[7].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
|
||||
HTTPRequestDoc.Fields[7].Values = []string{
|
||||
"sniper",
|
||||
"batteringram",
|
||||
"pitchfork",
|
||||
"clusterbomb",
|
||||
}
|
||||
@ -854,10 +854,10 @@ func init() {
|
||||
NETWORKRequestDoc.Fields[2].Name = "attack"
|
||||
NETWORKRequestDoc.Fields[2].Type = "string"
|
||||
NETWORKRequestDoc.Fields[2].Note = ""
|
||||
NETWORKRequestDoc.Fields[2].Description = "Attack is the type of payload combinations to perform.\n\nSniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
|
||||
NETWORKRequestDoc.Fields[2].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
|
||||
NETWORKRequestDoc.Fields[2].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
|
||||
NETWORKRequestDoc.Fields[2].Values = []string{
|
||||
"sniper",
|
||||
"batteringram",
|
||||
"pitchfork",
|
||||
"clusterbomb",
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user