blechschmidt / massdns

A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)
GNU General Public License v3.0
3.13k stars 462 forks source link

TXT records are stripped of the first character when output is set to S, J or F #142

Closed HugoAreias closed 1 year ago

HugoAreias commented 1 year ago

Hi,

First off, thanks for the amazing work you have put on this magnificent tool. 🙂

While using the tool to lookup for TXT type records I've realised the output appears to be stripped of the initial character for each resulting record.

For instance, the simple text output for github.com is as follows.

$ massdns -q --resolvers resolvers --type TXT -o S github.txt
github.com. TXT "S=ms44452932"
github.com. TXT "S=ms58704441"
github.com. TXT "dx40j0v3l3cnnhd973dfvvrm6z1bjk5"
github.com. TXT "pple-domain-verification=RyQhdzTl6Z6x8ZP4"
github.com. TXT "S=6BF03E6AF5CB689E315FB6199603BABF2C88D805"
github.com. TXT "ocusign=087098e3-3d46-47b7-9b4e-8a23028154cd"
github.com. TXT "oom-site-verification=f3787154f1154b7880e720a511ea664d"
github.com. TXT "risp-domain-verification=ZlyiK7XLhnaoUQb2hpak1PLY7dFkl1WE"
github.com. TXT "acebook-domain-verification=39xu4jzl7roi7x0n93ldkxjiaarx50"

I've tried to tweak the options to no avail. Besides the simple text output, this also happens for the full text and ndjson output formats. Binary format appears to work as expected (screenshot below).

Screenshot 2023-07-24 at 17 45 47
blechschmidt commented 1 year ago

I can't reproduce this. Is this the latest massdns version? What platform are you on? How did you build/obtain massdns? A similar issue has been fixed in d77c68bf2ac37e520dbd08361d18218da2eb02b5.

HugoAreias commented 1 year ago

I'm running it under MacOS, the brew version. Using master and building it from source worked as expected. Sorry about the trouble.