mihari 3.10.0 → 3.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4d53239fe8be60cdc674dc22c14f801147a71144649cec83f4fd3caaf2c99fa
4
- data.tar.gz: 71b9b3746164b1f3eec9b98a807a6940e85a9184991efd7dd9abe5bd9b3f3578
3
+ metadata.gz: 0fcea779559f641125a388f63f0aa2d39979842f9b66f116194c36fe6410c56c
4
+ data.tar.gz: ceefe0fa86e5d3c8066bab202f7dc1dfb2b21017554a2b63c5a18f567e45aadb
5
5
  SHA512:
6
- metadata.gz: 6bee10443bd55e0ac483e8495c508bcce95dc56073aeb99f6c1566f38fb73707140baa838c07212c39795017d109aef8e9478f560bc3d04a21cbb949a48c9b61
7
- data.tar.gz: c35f757168a737c37dcbf9a54d0408eabdfbf807a7a57db77c59c10f9a5b803d6731c615f3360db93b05647ee5e6cdcd35518baf4a7a7efe8d73e198d7f2664e
6
+ metadata.gz: 834c4c815ddf9c14b9047c9a8d9ed8ce56e3f115c16b797c4ebf40205529f7c94fe7ddda8f9c7f5cc0675c65123ac0957d28a0bfe51108d2492efc230f509dd8
7
+ data.tar.gz: 03ed05a672e17bfce72706de94aa2a339053f9b6545907c1e71cf60987be047e1af6bc6d4e95a16f6b6bb371de2ff3b65602ae4c3c9eb2eab3f70c2ace0735cf
data/README.md CHANGED
@@ -38,6 +38,7 @@ Mihari supports the following services by default.
38
38
  - [crt.sh](https://crt.sh/)
39
39
  - [DN Pedia](https://dnpedia.com/)
40
40
  - [dnstwister](https://dnstwister.report/)
41
+ - [GreyNoise](https://www.greynoise.io/)
41
42
  - [Onyphe](https://onyphe.io)
42
43
  - [OTX](https://otx.alienvault.com/)
43
44
  - [PassiveTotal](https://community.riskiq.com/)
@@ -58,6 +58,7 @@ module Mihari
58
58
  responses = []
59
59
  (1..Float::INFINITY).each do |page|
60
60
  res = search_with_page(query, page: page)
61
+
61
62
  break unless res
62
63
 
63
64
  responses << res
@@ -81,10 +82,13 @@ module Mihari
81
82
  as = nil
82
83
  as = AutonomousSystem.new(asn: normalize_asn(match.asn)) unless match.asn.nil?
83
84
 
84
- geolocation = Geolocation.new(
85
- country: match.location.country_name,
86
- country_code: match.location.country_code
87
- )
85
+ geolocation = nil
86
+ if !match.location.country_name.nil? && !match.location.country_code.nil?
87
+ geolocation = Geolocation.new(
88
+ country: match.location.country_name,
89
+ country_code: match.location.country_code
90
+ )
91
+ end
88
92
 
89
93
  Artifact.new(
90
94
  data: match.ip_str,
@@ -5,14 +5,14 @@ module Mihari
5
5
  module Structs
6
6
  module Shodan
7
7
  class Location < Dry::Struct
8
- attribute :country_code, Types::String
9
- attribute :country_name, Types::String
8
+ attribute :country_code, Types::String.optional
9
+ attribute :country_name, Types::String.optional
10
10
 
11
11
  def self.from_dynamic!(d)
12
12
  d = Types::Hash[d]
13
13
  new(
14
- country_code: d.fetch("country_code"),
15
- country_name: d.fetch("country_name")
14
+ country_code: d["country_code"],
15
+ country_name: d["country_name"]
16
16
  )
17
17
  end
18
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mihari
4
- VERSION = "3.10.0"
4
+ VERSION = "3.10.1"
5
5
  end
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/favicon.ico"><title>Mihari</title><link href="/static/js/app.0a0cc502.js" rel="preload" as="script"></head><body><noscript><strong>We're sorry but Mihari doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/app.0a0cc502.js"></script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/favicon.ico"><title>Mihari</title><link href="/static/js/app.fbc19869.js" rel="preload" as="script"></head><body><noscript><strong>We're sorry but Mihari doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/app.fbc19869.js"></script></body></html>