Skip to content

Commit

Permalink
make markdown filename shorter (#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir authored Dec 12, 2024
1 parent be1f634 commit 53ff9c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/reporting/exporters/markdown/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path/filepath"
"strings"

"github.com/google/uuid"
"github.com/projectdiscovery/gologger"

"github.com/projectdiscovery/nuclei/v3/pkg/output"
Expand Down Expand Up @@ -115,7 +116,9 @@ func createFileName(event *output.ResultEvent) string {
filenameBuilder := &strings.Builder{}
filenameBuilder.WriteString(event.TemplateID)
filenameBuilder.WriteString("-")
filenameBuilder.WriteString(stringsutil.ReplaceAll(event.Matched, "_", "/", ":"))
filenameBuilder.WriteString(event.Host)
filenameBuilder.WriteString("-")
filenameBuilder.WriteString(uuid.NewString())

var suffix string
if event.MatcherName != "" {
Expand Down

0 comments on commit 53ff9c5

Please sign in to comment.