mihari 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -13
- data/lib/mihari/analyzers/base.rb +1 -1
- data/lib/mihari/analyzers/urlscan.rb +1 -1
- data/lib/mihari/cli.rb +13 -13
- data/lib/mihari/emitters/base.rb +1 -1
- data/lib/mihari/retriable.rb +2 -2
- data/lib/mihari/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5a283261490c642311f94a2cb72a5a1596b2b5b2d3ba1b69d54b7ef785b4d39
|
4
|
+
data.tar.gz: '078f0fa96c14cd90a1c91ba1ca6235c453049b826719fc69db8e2c629e7fcc49'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9189cbee2cce11c71342a06f741a8ff5d9351aedc0dd84e85378f8e2b4c88275812fa12cf0b8681965b09f27f7009bb7e7267cade8dd0c74655c11e28cd0d35
|
7
|
+
data.tar.gz: ead6cf8241cdba49266abdc455ba8d65287aa1defe9d8dd49a528b7061b26bcf7a23fb80c377d3c26a3a4554e3105aad57775affcf4ee5e720bf31885c1c9558
|
data/README.md
CHANGED
@@ -69,22 +69,22 @@ mihari supports the following services by default.
|
|
69
69
|
$ mihari
|
70
70
|
Commands:
|
71
71
|
mihari alerts # Show the alerts on TheHive
|
72
|
-
mihari binaryedge [QUERY] # BinaryEdge
|
73
|
-
mihari censys [QUERY] # Censys IPv4
|
74
|
-
mihari circl [DOMAIN|SHA1] # CIRCL passive DNS/SSL lookup by a
|
75
|
-
mihari crtsh [QUERY] # crt.sh
|
76
|
-
mihari dnpedia [QUERY] # DNPedia domain
|
72
|
+
mihari binaryedge [QUERY] # BinaryEdge host search by a query
|
73
|
+
mihari censys [QUERY] # Censys IPv4 search by a query
|
74
|
+
mihari circl [DOMAIN|SHA1] # CIRCL passive DNS/SSL lookup by a domain / SHA1 certificate fingerprint
|
75
|
+
mihari crtsh [QUERY] # crt.sh search by a query
|
76
|
+
mihari dnpedia [QUERY] # DNPedia domain search by a query
|
77
77
|
mihari help [COMMAND] # Describe available commands or one specific command
|
78
78
|
mihari import_from_json # Give a JSON input via STDIN
|
79
|
-
mihari onyphe [QUERY] # Onyphe datascan
|
80
|
-
mihari passivetotal [IP|DOMAIN|EMAIL|SHA1] # PassiveTotal lookup by
|
81
|
-
mihari securitytrails [IP|DOMAIN|EMAIL] # SecurityTrails lookup by
|
82
|
-
mihari securitytrails_domain_feed [REGEXP] # SecurityTrails new domain feed
|
83
|
-
mihari shodan [QUERY] # Shodan host
|
79
|
+
mihari onyphe [QUERY] # Onyphe datascan search by a query
|
80
|
+
mihari passivetotal [IP|DOMAIN|EMAIL|SHA1] # PassiveTotal lookup by an ip / domain / email / SHA1 certificate fingerprint
|
81
|
+
mihari securitytrails [IP|DOMAIN|EMAIL] # SecurityTrails lookup by an ip, domain or email
|
82
|
+
mihari securitytrails_domain_feed [REGEXP] # SecurityTrails new domain feed search by a regexp
|
83
|
+
mihari shodan [QUERY] # Shodan host search by a query
|
84
84
|
mihari status # Show the current configuration status
|
85
|
-
mihari urlscan [QUERY] # urlscan
|
86
|
-
mihari virustotal [IP|DOMAIN] # VirusTotal resolutions lookup by
|
87
|
-
mihari zoomeye [QUERY] # ZoomEye
|
85
|
+
mihari urlscan [QUERY] # urlscan search by a given query
|
86
|
+
mihari virustotal [IP|DOMAIN] # VirusTotal resolutions lookup by an ip or domain
|
87
|
+
mihari zoomeye [QUERY] # ZoomEye search by a query
|
88
88
|
|
89
89
|
```
|
90
90
|
|
@@ -77,7 +77,7 @@ module Mihari
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def set_unique_artifacts
|
80
|
-
|
80
|
+
retry_on_error { unique_artifacts }
|
81
81
|
rescue ArgumentError => _e
|
82
82
|
klass = self.class.to_s.split("::").last.to_s
|
83
83
|
raise Error, "Please configure #{klass} API settings properly"
|
data/lib/mihari/cli.rb
CHANGED
@@ -5,7 +5,7 @@ require "json"
|
|
5
5
|
|
6
6
|
module Mihari
|
7
7
|
class CLI < Thor
|
8
|
-
desc "censys [QUERY]", "Censys IPv4
|
8
|
+
desc "censys [QUERY]", "Censys IPv4 search by a query"
|
9
9
|
method_option :title, type: :string, desc: "title"
|
10
10
|
method_option :description, type: :string, desc: "description"
|
11
11
|
method_option :tags, type: :array, desc: "tags"
|
@@ -16,7 +16,7 @@ module Mihari
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
desc "shodan [QUERY]", "Shodan host
|
19
|
+
desc "shodan [QUERY]", "Shodan host search by a query"
|
20
20
|
method_option :title, type: :string, desc: "title"
|
21
21
|
method_option :description, type: :string, desc: "description"
|
22
22
|
method_option :tags, type: :array, desc: "tags"
|
@@ -26,7 +26,7 @@ module Mihari
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
desc "onyphe [QUERY]", "Onyphe datascan
|
29
|
+
desc "onyphe [QUERY]", "Onyphe datascan search by a query"
|
30
30
|
method_option :title, type: :string, desc: "title"
|
31
31
|
method_option :description, type: :string, desc: "description"
|
32
32
|
method_option :tags, type: :array, desc: "tags"
|
@@ -36,7 +36,7 @@ module Mihari
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
desc "urlscan [QUERY]", "urlscan
|
39
|
+
desc "urlscan [QUERY]", "urlscan search by a given query"
|
40
40
|
method_option :title, type: :string, desc: "title"
|
41
41
|
method_option :description, type: :string, desc: "description"
|
42
42
|
method_option :tags, type: :array, desc: "tags"
|
@@ -47,7 +47,7 @@ module Mihari
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
desc "virustotal [IP|DOMAIN]", "VirusTotal resolutions lookup by
|
50
|
+
desc "virustotal [IP|DOMAIN]", "VirusTotal resolutions lookup by an ip or domain"
|
51
51
|
method_option :title, type: :string, desc: "title"
|
52
52
|
method_option :description, type: :string, desc: "description"
|
53
53
|
method_option :tags, type: :array, desc: "tags"
|
@@ -57,7 +57,7 @@ module Mihari
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
desc "securitytrails [IP|DOMAIN|EMAIL]", "SecurityTrails lookup by
|
60
|
+
desc "securitytrails [IP|DOMAIN|EMAIL]", "SecurityTrails lookup by an ip, domain or email"
|
61
61
|
method_option :title, type: :string, desc: "title"
|
62
62
|
method_option :description, type: :string, desc: "description"
|
63
63
|
method_option :tags, type: :array, desc: "tags"
|
@@ -68,7 +68,7 @@ module Mihari
|
|
68
68
|
end
|
69
69
|
map "st" => :securitytrails
|
70
70
|
|
71
|
-
desc "securitytrails_domain_feed [REGEXP]", "SecurityTrails new domain feed
|
71
|
+
desc "securitytrails_domain_feed [REGEXP]", "SecurityTrails new domain feed search by a regexp"
|
72
72
|
method_option :title, type: :string, desc: "title"
|
73
73
|
method_option :description, type: :string, desc: "description"
|
74
74
|
method_option :tags, type: :array, desc: "tags"
|
@@ -80,7 +80,7 @@ module Mihari
|
|
80
80
|
end
|
81
81
|
map "st_domain_feed" => :securitytrails_domain_feed
|
82
82
|
|
83
|
-
desc "crtsh [QUERY]", "crt.sh
|
83
|
+
desc "crtsh [QUERY]", "crt.sh search by a query"
|
84
84
|
method_option :title, type: :string, desc: "title"
|
85
85
|
method_option :description, type: :string, desc: "description"
|
86
86
|
method_option :tags, type: :array, desc: "tags"
|
@@ -90,7 +90,7 @@ module Mihari
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
desc "dnpedia [QUERY]", "DNPedia domain
|
93
|
+
desc "dnpedia [QUERY]", "DNPedia domain search by a query"
|
94
94
|
method_option :title, type: :string, desc: "title"
|
95
95
|
method_option :description, type: :string, desc: "description"
|
96
96
|
method_option :tags, type: :array, desc: "tags"
|
@@ -100,7 +100,7 @@ module Mihari
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
-
desc "circl [DOMAIN|SHA1]", "CIRCL passive DNS/SSL lookup by a
|
103
|
+
desc "circl [DOMAIN|SHA1]", "CIRCL passive DNS/SSL lookup by a domain / SHA1 certificate fingerprint"
|
104
104
|
method_option :title, type: :string, desc: "title"
|
105
105
|
method_option :description, type: :string, desc: "description"
|
106
106
|
method_option :tags, type: :array, desc: "tags"
|
@@ -110,7 +110,7 @@ module Mihari
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
desc "passivetotal [IP|DOMAIN|EMAIL|SHA1]", "PassiveTotal lookup by
|
113
|
+
desc "passivetotal [IP|DOMAIN|EMAIL|SHA1]", "PassiveTotal lookup by an ip / domain / email / SHA1 certificate fingerprint"
|
114
114
|
method_option :title, type: :string, desc: "title"
|
115
115
|
method_option :description, type: :string, desc: "description"
|
116
116
|
method_option :tags, type: :array, desc: "tags"
|
@@ -120,7 +120,7 @@ module Mihari
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
desc "zoomeye [QUERY]", "ZoomEye
|
123
|
+
desc "zoomeye [QUERY]", "ZoomEye search by a query"
|
124
124
|
method_option :title, type: :string, desc: "title"
|
125
125
|
method_option :description, type: :string, desc: "description"
|
126
126
|
method_option :tags, type: :array, desc: "tags"
|
@@ -131,7 +131,7 @@ module Mihari
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
desc "binaryedge [QUERY]", "BinaryEdge
|
134
|
+
desc "binaryedge [QUERY]", "BinaryEdge host search by a query"
|
135
135
|
method_option :title, type: :string, desc: "title"
|
136
136
|
method_option :description, type: :string, desc: "description"
|
137
137
|
method_option :tags, type: :array, desc: "tags"
|
data/lib/mihari/emitters/base.rb
CHANGED
data/lib/mihari/retriable.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
module Mihari
|
4
4
|
module Retriable
|
5
|
-
def
|
5
|
+
def retry_on_error(times: 3, interval: 10)
|
6
6
|
try = 0
|
7
7
|
begin
|
8
8
|
try += 1
|
9
9
|
yield
|
10
|
-
rescue Timeout::Error => _e
|
10
|
+
rescue Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, Timeout::Error => _e
|
11
11
|
sleep interval
|
12
12
|
retry if try < times
|
13
13
|
raise
|
data/lib/mihari/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mihari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|