Live data from Hacker News

Show HN: Use DNS TXT to share information

news.ycombinator.com

1–10 of 95 posts

Re: Show HN: Use DNS TXT to share information

#5
There are a bunch of awkward limitations, tho:

The order of records associated with a name is undefined, so if you spread your data across multiple records, you need to add ordering metadata.

The total size of the records must be less than 64 KiB - they have to fit within a DNS message, which has a limited size.

You can put all your 64K ish data into one TXT record, but it has to be split into strings of up to 255 bytes.

You can invent your own record type to contain raw binary data without the sequence-of-strings requirement.

You can use multiple names (eg, numbers) to get past the size limit and to be explicit about the correct order.

Re: Show HN: Use DNS TXT to share information

#6
post #3

Thanks for teaching me about `fold`. I've been a GNU/Linux user for 10 years and most days I can still learn something new.

Heh, I have been using `fmt` to do this job since the 1990s, I didn’t know POSIX specifies a different program for the same purpose

https://man.freebsd.org/cgi/man.cgi?query=fmt

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/f...

Re: Show HN: Use DNS TXT to share information

#7
This reminds me of a very curious way in the past of distributing small programs/scripts using finger, attaching it base64 encoded in the .plan

  % finger xabi
  Login: xabi              Name:
  Directory: /home/xabi                Shell: /usr/bin/zsh
  On since Mon Jul 17 11:20 (CEST) on pts/0 from xxx.xxx.xxx.xxx
   1 second idle
  No mail.
  Plan:
  Latest version of my code (base64 encoded):

  -------- 8

Re: Show HN: Use DNS TXT to share information

#10
I have a vague memory about a security talk where they used TXT records to deliver a payload to a machine and they had to write such code that the rows returned in the TXT records could be run in any order because the order the TXT records are returned is not deterministic.

I couldn't find the talk, but I found this nice article: https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-ca...

Post reply on HN