class Shodan::API
Attributes
account[R]
@return [Shodan::Clients::Account]
alert[R]
@return [Shodan::Clients::Alert]
dns[R]
@return [Shodan::Clients::DNS]
exploits[R]
@return [Shodan::Clients::Exploits]
host[R]
@return [Shodan::Clients::Host]
labs[R]
@return [Shodan::Clients::Labs]
query[R]
@return [Shodan::Clients::Query]
scan[R]
@return [Shodan::Clients::Scan]
tools[R]
@return [Shodan::Clients::Tools]
Public Class Methods
new(key: ENV.fetch("SHODAN_API_KEY", nil))
click to toggle source
# File lib/shodan/api.rb, line 53 def initialize(key: ENV.fetch("SHODAN_API_KEY", nil)) raise ArgumentError, "No API key has been found or provided! (setup your SHODAN_API_KEY environment varialbe)" if key.nil? @account = Clients::Account.new(key: key) @alert = Clients::Alert.new(key: key) @dns = Clients::DNS.new(key: key) @host = Clients::Host.new(key: key) @labs = Clients::Labs.new(key: key) @query = Clients::Query.new(key: key) @scan = Clients::Scan.new(key: key) @tools = Clients::Tools.new(key: key) @rest = Clients::REST.new(key: key) @exploits = Clients::Exploits.new(key: key) end