A small project that I’ve been dealing lately is a web interface for the dig command. The dig Unix command allows performing DNS lookups for the various hostnames. It is a powerful little command that has been around for decades, but it requires typing in the shell interface, and I’m lazy.
So, I patched a web interface for the most common uses of this command. It allows to quickly perform lookups for A, MX, TXT, NS, and a few more records. The page is located at http://slimdig.com and looks as follows:
The above screenshot represents the output of the DNS lookup query for the A record of Yahoo. I have modified the script to perform a secondary query for the PTR record of the extracted IP addresses, because I need this very often in my work.
The dig command has a broad selection of options that I rarely use, and the interface is limited to the bare minimum. There are much more advanced tools, such as the digwebinterface.com, but I just don’t need that.
Actually, Google has a very similar tool at toolbox.googleapps.com/apps/dig/, and I was a frequent user until they decided to update it in the past and removed a feature that I needed. Their tool used to allow performing DNS queries against particular name servers, but this option disappeared after the mentioned upgrade. I guess, it is still possible in some way, but there is no designated field for the queried name server anymore. In my line of work, I work very often with domain names that are switching hosting services and changing their name servers in the process. Sometimes, it is important to be able to check the DNS records in their previous name servers and I don’t want to leave my browser while doing it. That’s why I prefer web forms.
The script accepts GET requests and using an address, such as https://slimdig.com/A/yahoo.com/, will return the A records of Yahoo.com. I combine this with a browser extension that allows creating custom search engines. The extension that I use is Context Menu Search. I have created custom context menu search engines for A, MX, CNAME, PTR, and TXT. Now all I have to do is select the hostname or IP, right-click it, and choose the particular custom search engine from the context menu. This redirects me to the page with the results. It’s all about productivity.
There is a similar plugin for my email client of choice (Thunderbird). The plugin is URL Link and does pretty much the same, but in Mozilla Thunderbird. I’ve never really used Outlook and can’t advise if it allows such context searching.
I do have to credit Didier Prolhac for using his form for the script. His script does the same, but only with PHP, which has some limits. For example, you can’t query a different name server. Well, it is possible, but with an additional PHP extension, which seems to accept only IP addresses for the name server, or only a hostname. I don’t quite remember.
I hope that you will like it: