Class: Shodan::DatalossDB
- Inherits:
-
Object
- Object
- Shodan::DatalossDB
- Defined in:
- lib/shodan/api.rb
Overview
The DatalossDB class shouldn’t be used independently, as it depends on the WebAPI class.
- Author
-
achillean (jmath at surtri.com)
:title:Shodan::DatalossDB
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize(api) ⇒ DatalossDB
constructor
A new instance of DatalossDB.
-
#search(params = {}) ⇒ Object
Search the Dataloss DB archive.
Constructor Details
#initialize(api) ⇒ DatalossDB
Returns a new instance of DatalossDB.
111 112 113 |
# File 'lib/shodan/api.rb', line 111 def initialize(api) @api = api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
109 110 111 |
# File 'lib/shodan/api.rb', line 109 def api @api end |
Instance Method Details
#search(params = {}) ⇒ Object
Search the Dataloss DB archive.
Arguments: name – Name of the affected company/ organisation
arrest – whether the incident resulted in an arrest breaches – the type of breach that occurred (Hack, MissingLaptop etc.) country – country where the incident took place ext – whether an external, third party was affected ext_names – the name of the third party company that was affected lawsuit – whether the incident resulted in a lawsuit records – the number of records that were lost/ stolen recovered – whether the affected items were recovered sub_types – the sub-categorization of the affected company/ organization source – whether the incident occurred from inside or outside the organization stocks – stock symbol of the affected company types – the basic type of organization (government, business, educational) uid – unique ID for the incident
133 134 135 |
# File 'lib/shodan/api.rb', line 133 def search(params={}) return @api.request('datalossdb/search', params) end |