Closed oscarintherocks closed 5 months ago
can confirm this. I have one finding in the nuclei output but none in the json export file.
I could not reproduce with a relatively large set of hosts -tried different sizes. I'm sharing my last attempt:
$ wc -l hosts.txt
1500 hosts.txt
$ wc -l results-o.json
27901 results-o.json
$ awk -F 'template-id' '{s+=(NF-1)} END {print s}' results-je.json
27901
Closing this. Feel free to reopen if the issue persists.
Nuclei version:
v3.0.3
Current Behavior:
Saving results to json file with -je switch (-json-export) is not saving all the detected findings into the json file specified
Expected Behavior:
Save all the findings
Steps To Reproduce:
Create a yaml config file with this content:
Create a hosts.txt file with 500 hosts to be scanned, the format is with mixed hosts without protocol and some hosts with port some without:
NOTE: With 500 hosts I can replicate the problem always, with 3 to 30 hosts the problem sometimes happens sometimes not, so you'll need to try multiple times to be able to replicate if few hosts are included in the hosts file.
Execute nuclei using the config and the hosts list, and save results using -je and -o to be able to compare results.
nuclei -l hosts.txt -config config.yaml -o results-o.json -je results-je.json
Compare results-o vs results-je to see differences on the number of findings saved in the file.
As the formats are slightly different, you can easily count the number of findings using this script:
Anything else:
Using a hosts.txt file with:
The results obtained are: Findings found in JE file 1 Findings found in O file 38
Those results vary almost every time the scan is executed