Saber BoukHriss
Saber BoukHriss

Reputation: 29

Unable to Use -json Flag with Nuclei for JSONL Output

I'm currently utilizing Nuclei and attempting to use the -json flag to get the output in JSONL format. However, I receive an error stating flag provided but not defined: -json.

The command I'm using is:

nuclei -u <target_url> -t <templates_path> -json

i've also used that i found on ProjectDiscovery nuclei video

nuclei -tags tech -u <target_url> -json

and even some workaround but of course it didn't work as well

nuclei -tags tech -u <target_url> -json -o output.json

Nuclei's documentation states that it supports a variety of output options, including -json for JSONL format output, but it seems like the flag is not recognized in the version v2.9.15 that I'm using with templates version v9.6.4.

Here’s a brief overview of the output options stated in the documentation:

-json                         write output in JSONL(ines) format

Has anyone encountered this issue, and if so, is there a workaround or solution available? Is the -json flag available in a different version, or is there an alternative approach to get the output in a structured format like JSON?

Thanks for any assistance or insights!

Upvotes: 0

Views: 1183

Answers (1)

Alex Lauerman
Alex Lauerman

Reputation: 2200

Nuclei now uses -j for standard json output. Here's the current usage:

-j, -jsonl                    write output in JSONL(ines) format
-je, -json-export string      file to export results in JSON format
-jle, -jsonl-export string    file to export results in JSONL(ine) format

Upvotes: 1

Related Questions