Skip to content

RainbowPonny/dnsbl-client

This branch is 1 commit ahead of, 21 commits behind chrislee35/dnsbl-client:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9dc1239 · May 7, 2020

History

57 Commits
Feb 16, 2016
May 23, 2017
May 7, 2020
Jul 22, 2018
Feb 16, 2016
Apr 5, 2015
Jun 2, 2013
Jun 2, 2013
Oct 7, 2014
Apr 5, 2015
Jul 22, 2018

Repository files navigation

DNSBL::Client

dnsbl-client queries DNS Blacklists for listings. Currently this only does IP lookups, but the next version will handle domains.

Installation

Add this line to your application's Gemfile:

gem 'dnsbl-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dnsbl-client

Usage

require "dnsbl/client"
c = DNSBL::Client.new 
c.lookup("203.150.14.85")
=> [#<struct DNSBL::DNSBLResult dnsbl="UCEPROTECT1", query="85.14.150.203.dnsbl-1.uceprotect.net", result="127.0.0.2", meaning="Blacklisted", timing=0.0247988700866699>, #<struct DNSBL::DNSBLResult dnsbl="BARRACUDA", query="85.14.150.203.b.barracudacentral.org", result="127.0.0.2", meaning="Listed", timing=0.0266849994659424>]

c.add_dnsbl("superdnsbl","super.dnsbl.com",'ip',{"0"=>"OK","127.0.0.2"=>"Blacklisted"})
puts c.dnsbls.join(" ")

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

queries various DNS Blacklists

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%