DNS 玩具 (2022)
DNS Toys (2022)

原始链接: https://www.dns.toys/

隆重推出 dns.toys,这是一款独特的域名系统 (DNS) 服务器,旨在通过命令行方便、轻松地访问各种实用程序和服务。 通过使用 dns.toys 而不是典型的 Web URL,您可以简化任务,例如检查当前世界时间、转换货币、确定可用的 CIDR 范围、生成随机数等等! 甚至还设置了一个名为“dy”的别名以方便使用。 该资源仅为娱乐目的而创建,为用户提供有用且简单的可访问性。 但请注意,dns.toys 提供的任何服务均不保证其准确性、及时性、可靠性或适合特定需求。 尽管如此,凯拉什·纳德提供这些资源完全由他承担费用和责任。 如果有帮助就使用它; 我们希望如此!

如前所述,“nslookup”默认包含在 Windows 中。 这是使用“nslookup”的示例。 要对域名执行反向 DNS 查找(即获取与 IP 地址关联的主机名),请输入以下命令,然后按 Enter: ````` nslookup 172.26.212.1 ````` 根据您的需要替换最后一行(指定域名/主机名/IP 地址)。 另一个 DNS 客户端也是“host”,如果需要,可以单独找到并下载。 不过,如前所述,`nslookup` 和 `host` 在 Windows 上已经存在,因此不一定需要单独获取。 对于 Windows,其他 DNS 实用程序包括用于检查 DNS 设置的“powershell Get-DnsServer”以及 PowerShell 模块“DnsClient”。 然而,这些是单独的实用程序。 关于帖子作者提供的 DNS 玩具,使用 DNS 本身而不是特定的库或语言绑定执行 DNS 查询的好处包括: 1. DNS 提供跨平台兼容性,因为 DNS 由于网络而几乎无处不在。 因此,通过 DNS 本地运行此类 DNS 查询并不依赖于其他方式检索相同信息通常需要的第三方软件或库。 相反,使用 DNS 提供了更精简的设计模式,因为它消除了管理多层通信的要求。 2. 鉴于其可扩展性,DNS 允许有关 DNS 解析行为的高度灵活性。 此外,在 DNS 中本地实现 DNS 功能可以解决在采用其他机制时常见的兼容性问题(典型的是围绕标准化 DNS 功能,从而增加通信通道的开销)。
相关文章

原文

dns.toys is a DNS server that takes creative liberties with the DNS protocol to offer handy utilities and services that are easily accessible via the command line.

Copy and run the below commands to try it out.

World time

dig mumbai.time @dns.toys

dig newyork.time @dns.toys

dig paris/fr.time @dns.toys

Pass city names without spaces suffixed with .time. Pass two letter country codes separated by slash optionally.


Timezone conversion

Pass YYYY-MM-DDTHH:MM-$fromCity-$toCity (two letter country codes separated by slash optionally).

dig 2023-05-28T14:00-mumbai-paris/fr.time @dns.toys

Weather

dig mumbai.weather @dns.toys

dig newyork.weather @dns.toys

dig amsterdam/nl.weather @dns.toys

Pass city names without spaces suffixed with .weather. Pass two letter country codes optionally. This service is powered by yr.no

Unit conversion

dig 42km-mi.unit @dns.toys

dig 32GB-MB.unit @dns.toys

$Value$FromUnit-$ToUnit. To see all 70 available units, dig unit @dns.toys

Currency conversion (forex)

dig 100USD-INR.fx @dns.toys

dig 50CAD-AUD.fx @dns.toys

$Value$FromCurrency-$ToCurrency. Daily rates are from exchangerate.host.

IP echo

dig -4 ip @dns.toys

Echo your IPv4 address.

dig -6 ip @dns.toys

Echo your IPv6 address.

Number to words

dig 987654321.words @dns.toys

Convert numbers to English words.

Usable CIDR Range

dig 10.0.0.0/24.cidr @dns.toys

dig 2001:db8::/108.cidr @dns.toys

Parse CIDR notation to find out first and last usable IP address in the subnet.

Number base conversion

dig 100dec-hex.base @dns.toys

dig 755oct-bin.base @dns.toys

Converts a number from one base to another. Supported bases are hex, dec, oct and bin.

Pi

dig pi @dns.toys

dig pi -t txt @dns.toys

dig pi -t aaaa @dns.toys

Print digits of Pi. Yep.

English dictionary

dig fun.dict @dns.toys

dig big-time.dict @dns.toys

Get dictionary definitions for English words. Powered by WordNet®. Replace spaces with dashes.

Rolling dice

dig 1d6.dice @dns.toys

dig 3d20/2.dice @dns.toys

The number of dice to roll, followed by d, followed by the number of sides for each dice, like in tabletop RPG games.

Optionally suffix by /$number to add it to the total. For example, a DnD roll like 2d20+3 is written as 2d20/3.

Tossing coin

dig coin @dns.toys

dig 2.coin @dns.toys

Number of coins to toss.

Random number generation

dig 1-100.rand @dns.toys

dig 30-200.rand @dns.toys

Generate a random number in a specified range (inclusive of the range values).

Epoch/Unix timestamp conversion

dig 784783800.epoch @dns.toys

Convert an epoch/unix timestamp into a human readable date. Supports Unix timestamps in s, ms, µs and ns.

Calculate aerial distance

dig A12.9352,77.6245/12.9698,77.7500.aerial @dns.toys

Calculate aerial distance between a lat-long pair

Generate UUIDs

dig 5.uuid @dns.toys

Generate N UUIDs (v4).

Help

dig help @dns.toys

Lists available services.

Bash

Add this bash alias to your ~/.bashrc file. The + args show cleaner output from dig.

alias dy="dig +short @dns.toys"

Fish

Add this to your fish config file.

alias dy="dig +noall +answer +additional $argv @dns.toys"

Zsh

Add this zsh alias to your ~/.zshrc file. The + args show cleaner output from dig.

alias dy="dig +short @dns.toys"

Then, use the dy command as a shortcut.

dy berlin.time

dy mumbai.weather

dy 100USD-INR.fx

Why not? For fun. I spend a lot of time on the terminal and doing quick unit conversions, weather checks etc. without having to open a clunky search page is useful.
联系我们 contact @ memedata.com