Class: Shodan::Clients::REST

Inherits:
Base
  • Object
show all
Defined in:
lib/shodan/clients/rest.rb

Constant Summary

Constants inherited from Base

Base::BASE_URL, Base::HOST

Instance Attribute Summary

Attributes inherited from Base

#key

Instance Method Summary collapse

Methods inherited from Base

#initialize, #key?

Constructor Details

This class inherits a constructor from Shodan::Clients::Base

Instance Method Details

#infoObject

Returns information about the API plan belonging to the given API key.



19
20
21
# File 'lib/shodan/clients/rest.rb', line 19

def info
  get("/api-info")
end

#portsObject

This method returns a list of port numbers that the crawlers are looking for.



9
10
11
# File 'lib/shodan/clients/rest.rb', line 9

def ports
  get("/shodan/ports")
end

#protocolsObject

List all protocols that can be used when performing on-demand Internet scans via Shodan.



14
15
16
# File 'lib/shodan/clients/rest.rb', line 14

def protocols
  get("/shodan/protocols")
end