digging is a Web API for DNS digging.
- Ruby 3.x
git clone https://github.com/ninoseki/digging.git
cd digging
bundle install
bundle exec puma -C config/puma.rb
In order to send data, you must perform an HTTP POST request to the root path of the web app. (e.g. http://localhost:3000/
)
The API call expects the following parameter:
name
: the name of the resource record that is to be looked up.type
: the type of query: A, AAAA, CNAME, NX, NS, SOA, TXT.server
(optional): the name or IP address of the name server to query. If not specified8.8.8.8
will be used.
Example:
$ curl -s -X POST localhost:3000 -d "type=A&&name=google.com" | jq .
[
{
"address": "172.217.175.78",
"ttl": "300"
}
]