Misc linter related changes

dev
Ice3man543 2021-11-04 02:44:47 +05:30
parent a60b10afca
commit 53164c3f3e
4 changed files with 7 additions and 7 deletions

View File

@ -63,8 +63,8 @@ type AttackTypeHolder struct {
func (holder AttackTypeHolder) JSONSchemaType() *jsonschema.Type { func (holder AttackTypeHolder) JSONSchemaType() *jsonschema.Type {
gotType := &jsonschema.Type{ gotType := &jsonschema.Type{
Type: "string", Type: "string",
Title: "type of the protocol", Title: "type of the attack",
Description: "Type of the protocol", Description: "Type of the attack",
} }
for _, types := range GetSupportedAttackTypes() { for _, types := range GetSupportedAttackTypes() {
gotType.Enum = append(gotType.Enum, types.String()) gotType.Enum = append(gotType.Enum, types.String())

View File

@ -134,7 +134,7 @@ func TestMakeRequestFromRawWithPayloads(t *testing.T) {
"username": []string{"admin"}, "username": []string{"admin"},
"password": []string{"admin", "guest", "password", "test", "12345", "123456"}, "password": []string{"admin", "guest", "password", "test", "12345", "123456"},
}, },
AttackType: generators.AttackTypeHolder{generators.ClusterbombAttack}, AttackType: generators.AttackTypeHolder{Value: generators.ClusterbombAttack},
Raw: []string{`GET /manager/html HTTP/1.1 Raw: []string{`GET /manager/html HTTP/1.1
Host: {{Hostname}} Host: {{Hostname}}
User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei) User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei)
@ -173,7 +173,7 @@ func TestMakeRequestFromRawPayloadExpressions(t *testing.T) {
"username": []string{"admin"}, "username": []string{"admin"},
"password": []string{"admin", "guest", "password", "test", "12345", "123456"}, "password": []string{"admin", "guest", "password", "test", "12345", "123456"},
}, },
AttackType: generators.AttackTypeHolder{generators.ClusterbombAttack}, AttackType: generators.AttackTypeHolder{Value: generators.ClusterbombAttack},
Raw: []string{`GET /manager/html HTTP/1.1 Raw: []string{`GET /manager/html HTTP/1.1
Host: {{Hostname}} Host: {{Hostname}}
User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei) User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei)

View File

@ -23,7 +23,7 @@ func TestHTTPCompile(t *testing.T) {
"username": []string{"admin"}, "username": []string{"admin"},
"password": []string{"admin", "guest", "password", "test", "12345", "123456"}, "password": []string{"admin", "guest", "password", "test", "12345", "123456"},
}, },
AttackType: generators.AttackTypeHolder{generators.ClusterbombAttack}, AttackType: generators.AttackTypeHolder{Value: generators.ClusterbombAttack},
Raw: []string{`GET /manager/html HTTP/1.1 Raw: []string{`GET /manager/html HTTP/1.1
Host: {{Hostname}} Host: {{Hostname}}
User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei) User-Agent: Nuclei - Open-source project (github.com/projectdiscovery/nuclei)

View File

@ -29,7 +29,7 @@ func TestRequestGeneratorClusterBombSingle(t *testing.T) {
req := &Request{ req := &Request{
Payloads: map[string]interface{}{"username": []string{"admin", "tomcat", "manager"}, "password": []string{"password", "test", "secret"}}, Payloads: map[string]interface{}{"username": []string{"admin", "tomcat", "manager"}, "password": []string{"password", "test", "secret"}},
AttackType: generators.AttackTypeHolder{generators.ClusterbombAttack}, AttackType: generators.AttackTypeHolder{Value: generators.ClusterbombAttack},
Raw: []string{`GET /{{username}}:{{password}} HTTP/1.1`}, Raw: []string{`GET /{{username}}:{{password}} HTTP/1.1`},
} }
catalogInstance := catalog.New("") catalogInstance := catalog.New("")
@ -53,7 +53,7 @@ func TestRequestGeneratorClusterBombMultipleRaw(t *testing.T) {
req := &Request{ req := &Request{
Payloads: map[string]interface{}{"username": []string{"admin", "tomcat", "manager"}, "password": []string{"password", "test", "secret"}}, Payloads: map[string]interface{}{"username": []string{"admin", "tomcat", "manager"}, "password": []string{"password", "test", "secret"}},
AttackType: generators.AttackTypeHolder{generators.ClusterbombAttack}, AttackType: generators.AttackTypeHolder{Value: generators.ClusterbombAttack},
Raw: []string{`GET /{{username}}:{{password}} HTTP/1.1`, `GET /{{username}}@{{password}} HTTP/1.1`}, Raw: []string{`GET /{{username}}:{{password}} HTTP/1.1`, `GET /{{username}}@{{password}} HTTP/1.1`},
} }
catalogInstance := catalog.New("") catalogInstance := catalog.New("")