Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
exe
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

urlscan

Gem Version Ruby CI Maintainability Coverage Status

Description

urlscan.io API wrapper for Ruby.

Installation

gem install urlscan

API usage

require "urlscan"

# when given nothing, it tries to load your API key from ENV["URLSCAN_API_KEY"]
api = UrlScan::API.new
# or you can set it manually
api = UrlScan::API.new(api_key)

# Submit a URL to scan
res = api.submit("https://wikipedia.org")

# Get a scan result
res = api.result("ac04bc14-4efe-439d-b356-8384843daf75")

# Get a DOM
res = api.dom("ac04bc14-4efe-439d-b356-8384843daf75")

# Search
res = api.search("wikipedia.org")

Supported API endpoints

HTTP Method URI API method
POST /scan UrlScan::Clients::Community#submit(url, is_public = true)
GET /result/uuid/ UrlScan::Clients::Community#result(uuid)
GET /dom/uuid/ UrlScan::Clients::Community#dom(uuid)
GET /screenshots/uuid.png UrlScan::Clients::Community#screenshot(uuid)
GET /search UrlScan::Clients::Community#search(q, size: 100, search_after: nil)

Pro

HTTP Method URI API method
GET /brands UrlScan::Clients::Pro#brands
GET /kits UrlScan::Clients::Pro#kits
GET /phishfeed UrlScan::Clients::Pro#phishfeed
GET /result/uuid/similar/ UrlScan::Clients::Pro#similar(uuid)

CLI usage

$ urlscan
Commands:
  urlscan dom [UUID]         # get the DOM of a scan using the scan id [UUID]
  urlscan help [COMMAND]     # Describe available commands or one specific command
  urlscan result [UUID]      # get the result of a scan using the scan id [UUID]
  urlscan screenshot [UUID]  # get the screenshot(image/png) of a scan using the scan id [UUID]
  urlscan search [QUERY]     # search for scans by [QUERY]
  urlscan submit [URL]       # submit a scan to [URL]

Options:
  [--API-KEY=API_KEY]

About

urlscan.io API wrapper for Ruby

Resources

License

Packages

No packages published

Languages