Class: Shodan::DatalossDB

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#apiObject

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