Merge pull request #266 from vzamanillo/json-output-template-name

Add template name to JSON output
dev
bauthard 2020-08-31 01:18:01 +05:30 committed by GitHub
commit d7451a6c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ type jsonOutput struct {
Matched string `json:"matched"` Matched string `json:"matched"`
MatcherName string `json:"matcher_name,omitempty"` MatcherName string `json:"matcher_name,omitempty"`
ExtractedResults []string `json:"extracted_results,omitempty"` ExtractedResults []string `json:"extracted_results,omitempty"`
Name string `json:"name"`
Severity string `json:"severity"` Severity string `json:"severity"`
Author string `json:"author"` Author string `json:"author"`
Description string `json:"description"` Description string `json:"description"`

View File

@ -18,6 +18,7 @@ func (e *DNSExecuter) writeOutputDNS(domain string, req, resp *dns.Msg, matcher
Template: e.template.ID, Template: e.template.ID,
Type: "dns", Type: "dns",
Matched: domain, Matched: domain,
Name: e.template.Info.Name,
Severity: e.template.Info.Severity, Severity: e.template.Info.Severity,
Author: e.template.Info.Author, Author: e.template.Info.Author,
Description: e.template.Info.Description, Description: e.template.Info.Description,

View File

@ -20,6 +20,7 @@ func (e *HTTPExecuter) writeOutputHTTP(req *requests.HTTPRequest, resp *http.Res
Template: e.template.ID, Template: e.template.ID,
Type: "http", Type: "http",
Matched: URL, Matched: URL,
Name: e.template.Info.Name,
Severity: e.template.Info.Severity, Severity: e.template.Info.Severity,
Author: e.template.Info.Author, Author: e.template.Info.Author,
Description: e.template.Info.Description, Description: e.template.Info.Description,