TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Storing ASCII art in the DNS

39 点作者 fcambus超过 11 年前

4 条评论

colmmacc超过 11 年前
TXT records are bizarre things. Each TXT record is actually a variably sized list of variably sized character strings. There can safely up to 127 characters per string (there&#x27;s ambiguity about whether the 8-bit length field is signed or not) and the total size of the whole record is up to 64k. That should be plenty for ascii art.<p>Order is guaranteed for these character strings; at the wire level they are a contiguous blob. With the increasing adoption of SPF though, it&#x27;s also increasingly common for implementations to preserve the order of the TXT records in a multi-record record set; so that the records can be concatenated in order to make a meaningful SPF string.<p>On the wire the records look like this;<p><pre><code> name type=TXT class=IN TTL=NN RDLENGTH=MM [length]some text[length]more text name type=TXT class=IN TTL=NN RDLENGTH=MM [length]even more text </code></pre> which should be concatenated by readers (e.g. SPF implementations) to form a logical string like &quot;some textmore texteven more text&quot;.<p>so if you use multiple records, you&#x27;re really just putting arrays on top of arrays. It&#x27;s usually best to stuff things into one record though, so that you don&#x27;t have to risk an intermediate resolver re-ordering things.<p>Here&#x27;s one of the earliest records ever created in Route 53, to test things out;<p><pre><code> dig +short TXT bradm.com @ns-323.awsdns-40.com | sed $&#x27;s&#x2F;\&quot; \&quot;&#x2F;\\\n&#x2F;g&#x27;</code></pre>
评论 #7185728 未加载
jffry超过 11 年前
Step 1: Encrypt your data<p>Step 2: base64encode it and store it in DNS records<p>Step 3: Data is propagated and cached globally<p>Step 4: ???<p>Step 5: Profit!
评论 #7185473 未加载
jonny_eh超过 11 年前
I just tried the command but it looks like the lines came back out of order.<p>The order seems random each time, I suppose I could keep trying until it works.
评论 #7185389 未加载
评论 #7185402 未加载
dblock超过 11 年前
Brilliant.<p>dig @8.8.8.8 naptr ascii.artsy.net +short | sort