Skip to content

Commit c943367

Browse files
committed
fix: update nuclei command flags from -json to -jsonl for correct output formatting
1 parent a68da18 commit c943367

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/modules/dns/dns.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ func runNucleiTakeover(domainDir, findingsDir, subsFile string) error {
438438
if publicDir != "" {
439439
out := filepath.Join(findingsDir, "nuclei-takeover-public.json")
440440
log.Printf("[INFO] Running Nuclei public takeover templates from %s", publicDir)
441-
cmd := exec.Command("nuclei", "-l", subsFile, "-t", filepath.Join(publicDir, "http", "takeovers"), "-json", "-silent", "-o", out)
441+
cmd := exec.Command("nuclei", "-l", subsFile, "-t", filepath.Join(publicDir, "http", "takeovers"), "-jsonl", "-silent", "-o", out)
442442
cmd.Stdout = os.Stdout
443443
cmd.Stderr = os.Stderr
444444
if err := cmd.Run(); err != nil {
@@ -483,7 +483,7 @@ func runNucleiTakeover(domainDir, findingsDir, subsFile string) error {
483483
if customDir != "" {
484484
out := filepath.Join(findingsDir, "nuclei-takeover-custom.json")
485485
log.Printf("[INFO] Running Nuclei custom takeover templates from %s", customDir)
486-
cmd := exec.Command("nuclei", "-l", subsFile, "-t", filepath.Join(customDir, "http", "takeovers"), "-json", "-silent", "-o", out)
486+
cmd := exec.Command("nuclei", "-l", subsFile, "-t", filepath.Join(customDir, "http", "takeovers"), "-jsonl", "-silent", "-o", out)
487487
cmd.Stdout = os.Stdout
488488
cmd.Stderr = os.Stderr
489489
if err := cmd.Run(); err != nil {

internal/modules/nuclei/nuclei.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ func runNucleiCommand(targetFile, templateDir string, threads int, outputFile st
515515
"-c", fmt.Sprintf("%d", threads),
516516
"-silent",
517517
"-duc",
518-
"-json", // JSONL output: one JSON object per finding
518+
"-jsonl", // JSONL output: one JSON object per finding
519519
"-o", outputFile,
520520
)
521521
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)