Class: Mihari::Structs::Shodan::InternetDBResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Shodan::InternetDBResponse
- Defined in:
- lib/mihari/structs/shodan.rb
Instance Attribute Summary collapse
- #cpes ⇒ Array<String> readonly
- #hostnames ⇒ Array<String> readonly
- #ip ⇒ String readonly
- #ports ⇒ Array<Integer> readonly
- #tags ⇒ Array<String> readonly
- #vulns ⇒ Array<String> readonly
Class Method Summary collapse
Instance Attribute Details
#cpes ⇒ Array<String> (readonly)
253 |
# File 'lib/mihari/structs/shodan.rb', line 253 attribute :cpes, Types.Array(Types::String) |
#hostnames ⇒ Array<String> (readonly)
257 |
# File 'lib/mihari/structs/shodan.rb', line 257 attribute :hostnames, Types.Array(Types::String) |
#ip ⇒ String (readonly)
245 |
# File 'lib/mihari/structs/shodan.rb', line 245 attribute :ip, Types::String |
#ports ⇒ Array<Integer> (readonly)
249 |
# File 'lib/mihari/structs/shodan.rb', line 249 attribute :ports, Types.Array(Types::Int) |
#tags ⇒ Array<String> (readonly)
261 |
# File 'lib/mihari/structs/shodan.rb', line 261 attribute :tags, Types.Array(Types::String) |
#vulns ⇒ Array<String> (readonly)
265 |
# File 'lib/mihari/structs/shodan.rb', line 265 attribute :vulns, Types.Array(Types::String) |
Class Method Details
.from_dynamic!(d) ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/mihari/structs/shodan.rb', line 271 def from_dynamic!(d) d = Types::Hash[d] new( ip: d.fetch("ip"), ports: d.fetch("ports"), cpes: d.fetch("cpes"), hostnames: d.fetch("hostnames"), tags: d.fetch("tags"), vulns: d.fetch("vulns") ) end |