TextExpander: Get Domain Information - WhoIs Record

A little while back I spent a bit of time investigating some domain names for a project I was working on. As you may know, you can see all sorts of useful information about a domain by looking up it’s Who Is record. In order to save time I came up with a couple of TextExpander snippets to help with that.

Whilst there are many services available online where you can manually lookup a Who Is record, I wanted to be able to scrape the information in a simple format. The service I elected to use in the end is provided by hackertarget.com and whilst it only allows 50 lookups per IP address per day this was sufficient to meet my own daily needs from my own unique IP address.

The TextExpander snippet runs a BASH script which simply uses a CURL command to query hackertarget.com for the Who Is information. It really is as straight forward as that. The two snippets below simply provide options to have a user enter in the domain to lookup into a prompt or to take a domain stored on the clipboard and use that instead.

Label Run WhoIs (Manual)
Description Lookup the who is record for a user entered domain.
Abbreviation .runwhois
Content
#!/bin/bash

#The hackertarget API is designed to be used in an ad-hoc fashion not for bulk queries and is limited to 50 (total) requests from a single IP Address per day.

curl http://api.hackertarget.com/whois/?q=%filltext:name=Domain%
Label Run WhoIs (Clipboard)
Description Lookup the who is record for a domain on the clipboard.
Abbreviation runcbwhois
Content
#!/bin/bash

#The hackertarget API is designed to be used in an ad-hoc fashion not for bulk queries and is limited to 50 (total) requests from a single IP Address per day.

curl http://api.hackertarget.com/whois/?q=%clipboard

These snippets can be downloaded as part of the Thought Asylum Shell Commands snippet group.

Author: Stephen Millard
Tags: | textexpander |

Buy me a coffeeBuy me a coffee



Related posts that you may also like to read