darkoperator/dnsrecon — pull request #20 by VSSRS (2014-10-10 10:39:26+00:00)
Title: Fixed bug that prevented JSON files from containing the DNS records

When "--json" was specified as the only output option, this output file would not contain the records that were found. This was due to a conditional statement that checked whether there was an output file was to be created (csv, xml), but JSON was not checked in those statements.

I've included the JSON output in this check, fixing the bug. Furthermore, I've created a variable output_needed, that can be re-used every time this kind of check is needed (instead of checking every output variable every time).