Project

rb-urlvoid

0.0
No commit activity in last 3 years
No release in over 3 years
Yet another ruby gem for URLVoid API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
>= 0
~> 5.0
~> 10.0
>= 0

Runtime

 Project Readme

rb-urlvoid

Code Climate TravisCI

Yet another Ruby Gem for URLVoid API.

Installation

Add this line to your application's Gemfile:

gem 'rb-urlvoid'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rb-urlvoid
$ urlvoid [options]

Create your configuration file

$ urlvoid create_config

Edit your configuration file with API KEY

$ $EDITOR ~/.urlvoid.yml

Alternatively you can set Environment variables without a config file

$ export URLVOID_API_KEY=<YOUR_API_KEY_HERE>

CLI Usage

Retrieve information about a specific website

$ urlvoid info malicious.com
=>
{
  "details": {
    "host": "malicious.com",
    "updated": "1486047152",
    "http_response_code": "0",
    "domain_age": "808372800",
    "google_page_rank": "0",
    "alexa_rank": "0",
    "connect_time": "0",
    "header_size": "0",
    "download_size": "0",
    "speed_download": "0",
    "external_url_redirect": null,
    "ip": {
      "addr": "93.184.216.34",
      "hostname": null,
      "asn": "15133",
      "asname": "EdgeCast Networks, Inc.",
      "country_code": "US",
      "country_name": "United States",
      "region_name": "Massachusetts",
      "city_name": "Norwell",
      "continent_code": "NA",
      "continent_name": "North America",
      "latitude": "42.1508",
      "longitude": "-70.8228"
    }
  },
  "detections": {
    "engines": [
      "BitDefender",
      "Fortinet"
    ],
    "count": "2"
  },
  "page_load": "0.01"
}

Rescan of a specific website

$ urlvoid rescan example.com
=>
{
  "details": {
    "host": "example.com",
    "updated": "1486798381",
    "http_response_code": "0",
    "domain_age": "808372800",
    "google_page_rank": "0",
    "alexa_rank": "0",
    "connect_time": "0",
    "header_size": "0",
    "download_size": "0",
    "speed_download": "0",
    "external_url_redirect": null,
    "ip": {
      "addr": "93.184.216.34",
      "hostname": null,
      "asn": "15133",
      "asname": "EdgeCast Networks, Inc.",
      "country_code": "US",
      "country_name": "United States",
      "region_name": "Massachusetts",
      "city_name": "Norwell",
      "continent_code": "NA",
      "continent_name": "North America",
      "latitude": "42.1508",
      "longitude": "-70.8228"
    }
  },
  "action_result": "OK",
  "page_load": "20.38"
}

Scan a new website not present in the URLVoid's database

$ urlvoid new_sacan unkown.com
=>
{
  "page_load": "0.01"
}

** Get the number of queries remained **

$ urlvoid stats
=> Remained queries: 973

API Usage

require 'urlvoid'

# Retrieve information about a specific website
result = URLVoid::Host.info "example.com"
# => Returns API response as a Hash

# Rescan of a specific website
result = URLVoid::Host.rescan "example.com"
# => Returns API response as a Hash

# Scan a new website not present in the URLVoid's database
result = URLVoid::Host.new_scan "example.com"
# => Returns API response as a Hash

# Get the number of queries remained
result = URLVoid::Stats.remained_queries
# => Returns API response as a Integer

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ninoseki/rb-urlvoid. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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