Ruby API client for urlscan.io
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
exe Add +x Aug 12, 2018
lib
spec fix: fix coveralls issue Sep 17, 2018
.codeclimate.yml Add codeclimate.yml Jan 17, 2018
.gitignore Add a prototype Jan 16, 2018
.rspec Add a prototype Jan 16, 2018
.rubocop.yml Update rubocop.yml Aug 12, 2018
.travis.yml Add ruby 2.5 suport Aug 12, 2018
Gemfile Add a prototype Jan 16, 2018
LICENSE Initial commit Jan 16, 2018
README.md Update READMEmd Aug 12, 2018
Rakefile Add a prototype Jan 16, 2018
urlscan.gemspec Add coveralls support Aug 12, 2018

README.md

UrlScan

Build Status Maintainability Coverage Status

Description

Ruby API client for urlscan.io

Installation

$ gem install urlscan

API usage

Initialize the API:

require 'urlscan'
# initialize the API by passing the API key.
api = UrlScan::API.new(api_key)
# or initialize the API by using `$URLSCAN_API_KEY` environment variable
api = UrlScan::API.new

Submit:

res = api.submit("https://wikipedia.org")
puts res["result"] # => "https://urlscan.io/result/ac04bc14-4efe-439d-b356-8384843daf75/"

Result:

res = api.result("ac04bc14-4efe-439d-b356-8384843daf75")
p res # => See the following URL as an example of the response.
      #    https://gist.github.com/ninoseki/a974d7e95629813615b380c30e737825#file-result-json

Search:

res = api.search("wikipedia.org")
p res  # => See the following URL as an example of the reponse.
       #    https://gist.github.com/ninoseki/a974d7e95629813615b380c30e737825#file-search-json

CLI usage

$ urlscan
Commands:
  urlscan help [COMMAND]  # Describe available commands or one specific command
  urlscan result [UUID]   # get the result of a scan using the [UUID]
  urlscan search [QUERY]  # search for scans by [QUERY]
  urlscan submit [URL]    # submit a scan to [URL]

Options:
  [--API-KEY=API_KEY]