mihari 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mihari/structs/censys.rb +6 -4
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/public/assets/{index-BfEMNMrz.js → index-BO6YgRrl.js} +61 -61
- data/lib/mihari/web/public/assets/index-Dwa66Ymz.css +1 -0
- data/lib/mihari/web/public/index.html +2 -2
- data/mihari.gemspec +15 -15
- metadata +36 -36
- data/lib/mihari/web/public/assets/index-oiGfMI5B.css +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3d454e8ac560ec2d1b7463dfdc686e69fc033da82e318f9479ba14f72194c49
|
4
|
+
data.tar.gz: d2f191e78eb2180a9062d885fd527f5e55c70fa70a5e9f8f910b15a50d57d6a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723186046c14e4532c3662280264a51fb7a5966173d7010c50d6537a8b96304b6ff7f7f24d9686d1773fe8f13ceaba09d7d33c0265e286b58c9d18f3849645b8
|
7
|
+
data.tar.gz: 8a9f7001f3edb2a4035178c810ff5a12cf2cf913533f853e778c8d15ef4e74edfaef4d1b9061ab406d824406e7abd9eba94adb2e45da6c9b963a5d029123d322
|
@@ -22,6 +22,8 @@ module Mihari
|
|
22
22
|
# @param [Hash] d
|
23
23
|
#
|
24
24
|
def from_dynamic!(d)
|
25
|
+
return nil if d.nil?
|
26
|
+
|
25
27
|
d = Types::Hash[d]
|
26
28
|
new(
|
27
29
|
asn: d.fetch("asn")
|
@@ -102,8 +104,8 @@ module Mihari
|
|
102
104
|
attribute :location, Location
|
103
105
|
|
104
106
|
# @!attribute [r] autonomous_system
|
105
|
-
# @return [AutonomousSystem]
|
106
|
-
attribute :autonomous_system, AutonomousSystem
|
107
|
+
# @return [AutonomousSystem, nil]
|
108
|
+
attribute :autonomous_system, AutonomousSystem.optional
|
107
109
|
|
108
110
|
# @!attribute [r] metadata
|
109
111
|
# @return [Hash]
|
@@ -127,7 +129,7 @@ module Mihari
|
|
127
129
|
Models::Artifact.new(
|
128
130
|
data: ip,
|
129
131
|
metadata:,
|
130
|
-
autonomous_system: autonomous_system
|
132
|
+
autonomous_system: autonomous_system&.as,
|
131
133
|
geolocation: location.geolocation,
|
132
134
|
ports:
|
133
135
|
)
|
@@ -142,7 +144,7 @@ module Mihari
|
|
142
144
|
new(
|
143
145
|
ip: d.fetch("ip"),
|
144
146
|
location: Location.from_dynamic!(d.fetch("location")),
|
145
|
-
autonomous_system: AutonomousSystem.from_dynamic!(d
|
147
|
+
autonomous_system: AutonomousSystem.from_dynamic!(d["autonomous_system"]),
|
146
148
|
metadata: d,
|
147
149
|
services: d.fetch("services", []).map { |x| Service.from_dynamic!(x) }
|
148
150
|
)
|
data/lib/mihari/version.rb
CHANGED