Skip to content

ninoseki/dnsdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dnsdb

Build Status Coverage Status CodeFactor

DNSDB API wrapper for Ruby.

Installation

Add this line to your application's Gemfile:

gem 'dsndb'

And then execute:

bundle install

Or install it yourself as:

gem install dsndb

Usage

# when given nothing, it tries to load your API key via ENV["DNSDB_API_KEY"]
api = DNSDB::API.new
# or you can set it manually
api = DNSDB::API.new("YOUR_API_KEY")

api.lookup.rdata(value: "10.0.0.1", type: "ip")
api.lookup.rdata(value: "github.com", type: "name")

api.lookup.rrset(owner_name: "www.farsightsecurity.com")
api.lookup.rrset(owner_name: "*.farsightsecurity.com", rrtype: "ns", bailiwick: "farsightsecurity.com")
api.lookup.rrset(owner_name: "*.farsightsecurity.com", rrtype: "ns", bailiwick: "farsightsecurity.com", limit: 100, time_last_after: 1_468_281_600)

api.summarize.rdata(rrtype: "ANY", value: "10.0.0.1", type: "ip")
api.summarize.rdata(value: "github.com", type: "name")

api.summarize.rrset(owner_name: "www.farsightsecurity.com")
api.summarize.rrset(owner_name: "*.farsightsecurity.com", rrtype: "ns", bailiwick: "farsightsecurity.com")

License

The gem is available as open source under the terms of the MIT License.