mirror of https://github.com/daffainfo/nuclei.git
Fixed some bugs introduced from merge
parent
2cc6b2283e
commit
99e8fe1601
|
@ -238,6 +238,7 @@ func (r *Runner) RunEnumeration() {
|
|||
Progress: r.progress,
|
||||
Catalogue: r.catalogue,
|
||||
RateLimiter: r.ratelimiter,
|
||||
IssuesClient: r.issuesClient,
|
||||
ProjectFile: r.projectFile,
|
||||
}
|
||||
clusterID := fmt.Sprintf("cluster-%s", xid.New().String())
|
||||
|
|
|
@ -48,6 +48,7 @@ func (r *Runner) parseTemplateFile(file string) (*templates.Template, error) {
|
|||
Options: r.options,
|
||||
Progress: r.progress,
|
||||
Catalogue: r.catalogue,
|
||||
IssuesClient: r.issuesClient,
|
||||
RateLimiter: r.ratelimiter,
|
||||
ProjectFile: r.projectFile,
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ func NewMockExecuterOptions(options *types.Options, info *TemplateInfo) *protoco
|
|||
Options: options,
|
||||
Progress: progress,
|
||||
ProjectFile: nil,
|
||||
IssuesClient: nil,
|
||||
Catalogue: catalogue.New(options.TemplatesDirectory),
|
||||
RateLimiter: ratelimit.New(options.RateLimit),
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ func TestHTTPRequestsCluster(t *testing.T) {
|
|||
Progress: nil,
|
||||
Catalogue: catalogue,
|
||||
RateLimiter: nil,
|
||||
IssuesClient: nil,
|
||||
ProjectFile: nil,
|
||||
}
|
||||
t, err := templates.Parse(template, executerOpts)
|
||||
|
|
|
@ -146,7 +146,7 @@ func (r *Request) makeResultEventItem(wrapped *output.InternalWrappedEvent) *out
|
|||
}
|
||||
if r.options.Options.JSONRequests {
|
||||
data.Request = types.ToString(wrapped.InternalEvent["request"])
|
||||
data.Response = types.ToString(wrapped.InternalEvent["raw"])
|
||||
data.Response = types.ToString(wrapped.InternalEvent["response"])
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ func Summary(output *output.ResultEvent) string {
|
|||
builder.WriteString("[")
|
||||
builder.WriteString(template)
|
||||
builder.WriteString("] [")
|
||||
builder.WriteString(output.Info["severity"])
|
||||
builder.WriteString(types.ToString(output.Info["severity"]))
|
||||
builder.WriteString("] ")
|
||||
builder.WriteString(output.Info["name"])
|
||||
builder.WriteString(types.ToString(output.Info["name"]))
|
||||
builder.WriteString(" found on ")
|
||||
builder.WriteString(output.Host)
|
||||
data := builder.String()
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/issues/github"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/issues/gitlab"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/reporting/issues/jira"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -50,7 +51,7 @@ func (f *Filter) Compile() {
|
|||
|
||||
// GetMatch returns true if a filter matches result event
|
||||
func (f *Filter) GetMatch(event *output.ResultEvent) bool {
|
||||
severity := event.Info["severity"]
|
||||
severity := types.ToString(event.Info["severity"])
|
||||
if len(f.severity) > 0 {
|
||||
if stringSliceContains(f.severity, severity) {
|
||||
return true
|
||||
|
@ -59,7 +60,7 @@ func (f *Filter) GetMatch(event *output.ResultEvent) bool {
|
|||
}
|
||||
|
||||
tags := event.Info["tags"]
|
||||
tagParts := strings.Split(tags, ",")
|
||||
tagParts := strings.Split(types.ToString(tags), ",")
|
||||
for i, tag := range tagParts {
|
||||
tagParts[i] = strings.TrimSpace(tag)
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ func (t *Template) parseWorkflowTemplate(workflow *workflows.WorkflowTemplate, o
|
|||
Progress: options.Progress,
|
||||
Catalogue: options.Catalogue,
|
||||
RateLimiter: options.RateLimiter,
|
||||
IssuesClient: options.IssuesClient,
|
||||
ProjectFile: options.ProjectFile,
|
||||
}
|
||||
template, err := Parse(path, opts)
|
||||
|
|
Loading…
Reference in New Issue