massdns
massdns copied to clipboard
Different results in output -o S and -o J (simple and json)
Hello,
After 2 hours of testing I found out that i am getting different results from simple output that json output and it is getting me crazy.
So i am trying to get NOERROR responses like:
...-o J 2> /dev/null | jq -r 'select(.status=="NOERROR") .name'
and I get like 50 results. with only 6 being valid (only 6 of the total are valid).
Running the same command but like -o S 2> /dev/null | awk '{print $1}' | anew
and I get only the 6 valid, and the command is working as expected.
Then I analyzed the json output and noticed that I am getting a looot of noerror responses that are incorrect, but for some reason that isn't happening with simple output.
I made the tests against same hosts and with the same resolvers countless of times and getting really different responses.
So I am running it against 200 hosts, with only 1.1.1.1 and 8.8.8.8 resolvers. I am only changing the output flag to json, and automatically get multiple false positives that I was no getting them with simple output.
If changing the 200 hosts to a bigger list, the false positives increase a lot making massdns unusable for me
Look if answers as a list are present inside the data for the given domain within the JSON output to filter false positives.
Use this instead: https://github.com/blechschmidt/massdns/blob/master/scripts/massdnsA.jq
EDIT: If I'm misunderstanding your issue, please attach your list of hosts and resolvers, I'm happy to try quickly to reproduce the issue