No release in over a year
A Ruby library to resolve IP addresses and AS numbers to responsible email addressses
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

IP contact finder

This is a simple tool that uses RDAP to determine an array of authoritative email addresses for a given IP address or AS number.

Installation

gem 'ip_contact_finder', '~> 1.0'

Usage

# Lookup addresses for a given IP address
IPContactFinder.ip('8.8.8.8') #=> ['noc@example.com', 'abuse@example.com']

# Lookup addresses for a given AS number
IPContactFinder.autnum('60899') #=> ['noc@example.com', 'abuse@example.com']

# Catch errors which can be encountered while making lookups
begin
  IPContactFinder.ip('4.1.3.5')
rescue IPContactFinder::RDAP::NotFoundError
  # The given resource was not found
rescue IPContactFinder::RDAP::RateLimitedError
  # A rate limit was encountered, retry later
rescue IPContactFinder::RDAP::RequestError
  # A generic error occurred making the request
end

# If necessary, you can override which server the backend RDAP requests are
# sent to first.
IPContactFinder.rdap.server = 'rdap.arin.net'

# You can also configure a logger for the RDAP connections
IPContactFinder.rdap.logger = Logger.new($stdout)