mihari 3.6.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/README.md +2 -0
- data/Steepfile +32 -0
- data/lib/mihari/analyzers/base.rb +5 -5
- data/lib/mihari/analyzers/binaryedge.rb +13 -0
- data/lib/mihari/analyzers/censys.rb +5 -0
- data/lib/mihari/analyzers/circl.rb +15 -0
- data/lib/mihari/analyzers/crtsh.rb +5 -0
- data/lib/mihari/analyzers/dnpedia.rb +5 -0
- data/lib/mihari/analyzers/dnstwister.rb +17 -0
- data/lib/mihari/analyzers/onyphe.rb +20 -4
- data/lib/mihari/analyzers/otx.rb +20 -0
- data/lib/mihari/analyzers/passivetotal.rb +25 -0
- data/lib/mihari/analyzers/pulsedive.rb +10 -0
- data/lib/mihari/analyzers/rule.rb +18 -0
- data/lib/mihari/analyzers/securitytrails.rb +25 -0
- data/lib/mihari/analyzers/shodan.rb +13 -0
- data/lib/mihari/analyzers/spyse.rb +20 -0
- data/lib/mihari/analyzers/urlscan.rb +10 -0
- data/lib/mihari/analyzers/virustotal.rb +20 -0
- data/lib/mihari/analyzers/zoomeye.rb +38 -0
- data/lib/mihari/emitters/base.rb +1 -1
- data/lib/mihari/emitters/misp.rb +38 -5
- data/lib/mihari/emitters/slack.rb +20 -2
- data/lib/mihari/emitters/the_hive.rb +16 -3
- data/lib/mihari/emitters/webhook.rb +18 -3
- data/lib/mihari/mixins/disallowed_data_value.rb +1 -1
- data/lib/mihari/structs/onyphe.rb +2 -2
- data/lib/mihari/type_checker.rb +9 -9
- data/lib/mihari/version.rb +1 -1
- data/mihari.gemspec +1 -0
- data/sig/lib/mihari/analyzers/base.rbs +99 -0
- data/sig/lib/mihari/analyzers/basic.rbs +17 -0
- data/sig/lib/mihari/analyzers/binaryedge.rbs +25 -0
- data/sig/lib/mihari/analyzers/censys.rbs +38 -0
- data/sig/lib/mihari/analyzers/circl.rbs +29 -0
- data/sig/lib/mihari/analyzers/crtsh.rbs +19 -0
- data/sig/lib/mihari/analyzers/dnpedia.rbs +18 -0
- data/sig/lib/mihari/analyzers/dnstwister.rbs +27 -0
- data/sig/lib/mihari/analyzers/onyphe.rbs +33 -0
- data/sig/lib/mihari/analyzers/otx.rbs +33 -0
- data/sig/lib/mihari/analyzers/passivetotal.rbs +33 -0
- data/sig/lib/mihari/analyzers/pulsedive.rbs +27 -0
- data/sig/lib/mihari/analyzers/rule.rbs +68 -0
- data/sig/lib/mihari/analyzers/securitytrails.rbs +33 -0
- data/sig/lib/mihari/analyzers/shodan.rbs +33 -0
- data/sig/lib/mihari/analyzers/spyse.rbs +29 -0
- data/sig/lib/mihari/analyzers/urlscan.rbs +28 -0
- data/sig/lib/mihari/analyzers/virustotal.rbs +31 -0
- data/sig/lib/mihari/analyzers/zoomeye.rbs +33 -0
- data/sig/lib/mihari/cli/analyzer.rbs +39 -0
- data/sig/lib/mihari/cli/base.rbs +11 -0
- data/sig/lib/mihari/cli/init.rbs +7 -0
- data/sig/lib/mihari/cli/main.rbs +9 -0
- data/sig/lib/mihari/cli/mixins/utils.rbs +50 -0
- data/sig/lib/mihari/cli/validator.rbs +7 -0
- data/sig/lib/mihari/commands/binaryedge.rbs +7 -0
- data/sig/lib/mihari/commands/censys.rbs +7 -0
- data/sig/lib/mihari/commands/circl.rbs +7 -0
- data/sig/lib/mihari/commands/crtsh.rbs +7 -0
- data/sig/lib/mihari/commands/dnpedia.rbs +7 -0
- data/sig/lib/mihari/commands/dnstwister.rbs +7 -0
- data/sig/lib/mihari/commands/init.rbs +11 -0
- data/sig/lib/mihari/commands/json.rbs +7 -0
- data/sig/lib/mihari/commands/onyphe.rbs +7 -0
- data/sig/lib/mihari/commands/otx.rbs +7 -0
- data/sig/lib/mihari/commands/passivetotal.rbs +7 -0
- data/sig/lib/mihari/commands/pulsedive.rbs +7 -0
- data/sig/lib/mihari/commands/search.rbs +35 -0
- data/sig/lib/mihari/commands/securitytrails.rbs +7 -0
- data/sig/lib/mihari/commands/shodan.rbs +7 -0
- data/sig/lib/mihari/commands/spyse.rbs +7 -0
- data/sig/lib/mihari/commands/urlscan.rbs +7 -0
- data/sig/lib/mihari/commands/validator.rbs +11 -0
- data/sig/lib/mihari/commands/virustotal.rbs +7 -0
- data/sig/lib/mihari/commands/web.rbs +7 -0
- data/sig/lib/mihari/commands/zoomeye.rbs +7 -0
- data/sig/lib/mihari/constants.rbs +3 -0
- data/sig/lib/mihari/database.rbs +25 -0
- data/sig/lib/mihari/emitters/base.rbs +18 -0
- data/sig/lib/mihari/emitters/database.rbs +9 -0
- data/sig/lib/mihari/emitters/misp.rbs +28 -0
- data/sig/lib/mihari/emitters/slack.rbs +58 -0
- data/sig/lib/mihari/emitters/stdout.rbs +9 -0
- data/sig/lib/mihari/emitters/the_hive.rbs +24 -0
- data/sig/lib/mihari/emitters/webhook.rbs +20 -0
- data/sig/lib/mihari/errors.rbs +10 -0
- data/sig/lib/mihari/mixins/configurable.rbs +26 -0
- data/sig/lib/mihari/mixins/configuration.rbs +45 -0
- data/sig/lib/mihari/mixins/disallowed_data_value.rbs +25 -0
- data/sig/lib/mihari/mixins/hash.rbs +14 -0
- data/sig/lib/mihari/mixins/refang.rbs +14 -0
- data/sig/lib/mihari/mixins/retriable.rbs +15 -0
- data/sig/lib/mihari/mixins/rule.rbs +41 -0
- data/sig/lib/mihari/models/alert.rbs +46 -0
- data/sig/lib/mihari/models/artifact.rbs +54 -0
- data/sig/lib/mihari/models/autonomous_system.rbs +5 -0
- data/sig/lib/mihari/models/dns.rbs +19 -0
- data/sig/lib/mihari/models/geolocation.rbs +6 -0
- data/sig/lib/mihari/models/reverse_dns.rbs +14 -0
- data/sig/lib/mihari/models/tag.rbs +5 -0
- data/sig/lib/mihari/models/tagging.rbs +4 -0
- data/sig/lib/mihari/models/whois.rbs +66 -0
- data/sig/lib/mihari/notifiers/base.rbs +18 -0
- data/sig/lib/mihari/notifiers/exception_notifier.rbs +75 -0
- data/sig/lib/mihari/notifiers/slack.rbs +50 -0
- data/sig/lib/mihari/status.rbs +25 -0
- data/sig/lib/mihari/structs/censys.rbs +50 -0
- data/sig/lib/mihari/structs/onyphe.rbs +25 -0
- data/sig/lib/mihari/structs/shodan.rbs +28 -0
- data/sig/lib/mihari/type_checker.rbs +48 -0
- data/sig/lib/mihari/types.rbs +17 -0
- data/sig/lib/mihari/version.rbs +3 -0
- data/sig/lib/mihari/web/app.rbs +5 -0
- data/sig/lib/mihari.rbs +57 -0
- metadata +102 -2
@@ -6,7 +6,7 @@ module Mihari
|
|
6
6
|
module Onyphe
|
7
7
|
class Result < Dry::Struct
|
8
8
|
attribute :asn, Types::String
|
9
|
-
attribute :country_code, Types::String
|
9
|
+
attribute :country_code, Types::String.optional
|
10
10
|
attribute :ip, Types::String
|
11
11
|
|
12
12
|
def self.from_dynamic!(d)
|
@@ -15,7 +15,7 @@ module Mihari
|
|
15
15
|
asn: d.fetch("asn"),
|
16
16
|
ip: d.fetch("ip"),
|
17
17
|
# Onyphe's country = 2-letter country code
|
18
|
-
country_code: d
|
18
|
+
country_code: d["country"]
|
19
19
|
)
|
20
20
|
end
|
21
21
|
end
|
data/lib/mihari/type_checker.rb
CHANGED
@@ -18,12 +18,12 @@ module Mihari
|
|
18
18
|
raise ArgumentError if data.is_a?(Hash)
|
19
19
|
end
|
20
20
|
|
21
|
-
# @return [
|
21
|
+
# @return [Boolean]
|
22
22
|
def hash?
|
23
23
|
md5? || sha1? || sha256? || sha512?
|
24
24
|
end
|
25
25
|
|
26
|
-
# @return [
|
26
|
+
# @return [Boolean]
|
27
27
|
def ip?
|
28
28
|
IPAddr.new data
|
29
29
|
true
|
@@ -31,7 +31,7 @@ module Mihari
|
|
31
31
|
false
|
32
32
|
end
|
33
33
|
|
34
|
-
# @return [
|
34
|
+
# @return [Boolean]
|
35
35
|
def domain?
|
36
36
|
uri = Addressable::URI.parse("http://#{data}")
|
37
37
|
uri.host == data && PublicSuffix.valid?(uri.host)
|
@@ -39,7 +39,7 @@ module Mihari
|
|
39
39
|
false
|
40
40
|
end
|
41
41
|
|
42
|
-
# @return [
|
42
|
+
# @return [Boolean]
|
43
43
|
def url?
|
44
44
|
uri = Addressable::URI.parse(data)
|
45
45
|
uri.scheme && uri.host && uri.path && PublicSuffix.valid?(uri.host)
|
@@ -47,7 +47,7 @@ module Mihari
|
|
47
47
|
false
|
48
48
|
end
|
49
49
|
|
50
|
-
# @return [
|
50
|
+
# @return [Boolean]
|
51
51
|
def mail?
|
52
52
|
EmailAddress.valid? data, host_validation: :syntax
|
53
53
|
end
|
@@ -83,22 +83,22 @@ module Mihari
|
|
83
83
|
|
84
84
|
private
|
85
85
|
|
86
|
-
# @return [
|
86
|
+
# @return [Boolean]
|
87
87
|
def md5?
|
88
88
|
data.match?(/^[A-Fa-f0-9]{32}$/)
|
89
89
|
end
|
90
90
|
|
91
|
-
# @return [
|
91
|
+
# @return [Boolean]
|
92
92
|
def sha1?
|
93
93
|
data.match?(/^[A-Fa-f0-9]{40}$/)
|
94
94
|
end
|
95
95
|
|
96
|
-
# @return [
|
96
|
+
# @return [Boolean]
|
97
97
|
def sha256?
|
98
98
|
data.match?(/^[A-Fa-f0-9]{64}$/)
|
99
99
|
end
|
100
100
|
|
101
|
-
# @return [
|
101
|
+
# @return [Boolean]
|
102
102
|
def sha512?
|
103
103
|
data.match?(/^[A-Fa-f0-9]{128}$/)
|
104
104
|
end
|
data/lib/mihari/version.rb
CHANGED
data/mihari.gemspec
CHANGED
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "rerun", "~> 0.13"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.10"
|
39
39
|
spec.add_development_dependency "standard", "~> 1.2"
|
40
|
+
spec.add_development_dependency "steep", "~> 0.45"
|
40
41
|
spec.add_development_dependency "timecop", "~> 0.9"
|
41
42
|
spec.add_development_dependency "vcr", "~> 6.0"
|
42
43
|
spec.add_development_dependency "webmock", "~> 3.14"
|
@@ -0,0 +1,99 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Base
|
4
|
+
# extend Dry::Initializer
|
5
|
+
|
6
|
+
include Mixins::Configurable
|
7
|
+
|
8
|
+
include Mixins::Retriable
|
9
|
+
|
10
|
+
attr_accessor ignore_old_artifacts: bool
|
11
|
+
|
12
|
+
attr_accessor ignore_threshold: Integer
|
13
|
+
|
14
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
15
|
+
|
16
|
+
# @return [Array<String>, Array<Mihari::Artifact>]
|
17
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
def title: () -> String
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def description: () -> String
|
24
|
+
|
25
|
+
# @return [String]
|
26
|
+
def source: () -> String
|
27
|
+
|
28
|
+
# @return [Array<String>]
|
29
|
+
def tags: () -> ::Array[String]
|
30
|
+
|
31
|
+
#
|
32
|
+
# Set artifacts & run emitters in parallel
|
33
|
+
#
|
34
|
+
# @return [nil]
|
35
|
+
#
|
36
|
+
def run: () -> void
|
37
|
+
|
38
|
+
#
|
39
|
+
# Run emitter
|
40
|
+
#
|
41
|
+
# @param [Mihari::Emitters::Base] emitter
|
42
|
+
#
|
43
|
+
# @return [nil]
|
44
|
+
#
|
45
|
+
def run_emitter: (untyped emitter) -> void
|
46
|
+
|
47
|
+
def self.inherited: (untyped child) -> untyped
|
48
|
+
|
49
|
+
#
|
50
|
+
# Normalize artifacts
|
51
|
+
# - Uniquefy artifacts by native #uniq
|
52
|
+
# - Convert data (string) into an artifact
|
53
|
+
# - Reject an invalid artifact
|
54
|
+
#
|
55
|
+
# @return [Array<Mihari::Artifact>]
|
56
|
+
#
|
57
|
+
def normalized_artifacts: () -> Array[Mihari::Artifact]
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
#
|
62
|
+
# Uniquefy artifacts
|
63
|
+
#
|
64
|
+
# @return [Array<Mihari::Artifact>]
|
65
|
+
#
|
66
|
+
def unique_artifacts: () -> Array[Mihari::Artifact]
|
67
|
+
|
68
|
+
#
|
69
|
+
# Enriched artifacts
|
70
|
+
#
|
71
|
+
# @return [Array<Mihari::Artifact>]
|
72
|
+
#
|
73
|
+
def enriched_artifacts: () -> Array[Mihari::Artifact]
|
74
|
+
|
75
|
+
#
|
76
|
+
# Set enriched artifacts
|
77
|
+
#
|
78
|
+
# @return [nil]
|
79
|
+
#
|
80
|
+
def set_enriched_artifacts: () -> void
|
81
|
+
|
82
|
+
#
|
83
|
+
# Select valid emitters
|
84
|
+
#
|
85
|
+
# @return [Array<Mihari::Emitters::Base>]
|
86
|
+
#
|
87
|
+
def valid_emitters: () -> Array[Mihari::Emitters::Base]
|
88
|
+
|
89
|
+
#
|
90
|
+
# Normalize ASN value
|
91
|
+
#
|
92
|
+
# @param [String, Integer] asn
|
93
|
+
#
|
94
|
+
# @return [Integer]
|
95
|
+
#
|
96
|
+
def normalize_asn: (String asn) -> Integer
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Basic < Base
|
4
|
+
attr_reader title: String
|
5
|
+
|
6
|
+
attr_reader description: String
|
7
|
+
|
8
|
+
attr_reader artifacts: (Array[String] | Array[Mihari::Artifact])
|
9
|
+
|
10
|
+
attr_reader source: String
|
11
|
+
|
12
|
+
attr_reader tags: Array[String]?
|
13
|
+
|
14
|
+
def initialize: (title: String title, description: String description, artifacts: (Array[String] | Array[Mihari::Artifact]) artifacts, source: String source, ?tags: Array[String] tags) -> void
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class BinaryEdge < Base
|
4
|
+
|
5
|
+
attr_reader query: String
|
6
|
+
attr_reader title: String
|
7
|
+
attr_reader description: String
|
8
|
+
attr_reader tags: Array[String]
|
9
|
+
|
10
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
PAGE_SIZE: ::Integer
|
15
|
+
|
16
|
+
def search_with_page: (String query, ?page: ::Integer page) -> Hash[(String | Symbol), untyped]
|
17
|
+
|
18
|
+
def search: () -> Array[Hash[(String | Symbol), untyped]]
|
19
|
+
|
20
|
+
def configuration_keys: () -> ::Array["binaryedge_api_key"]
|
21
|
+
|
22
|
+
def api: () -> untyped
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Censys < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
|
9
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def search: () -> Array[String]
|
14
|
+
|
15
|
+
#
|
16
|
+
# Extract IPv4s from Censys search API response
|
17
|
+
#
|
18
|
+
# @param [Structs::Censys::Response] response
|
19
|
+
#
|
20
|
+
# @return [Array<String>]
|
21
|
+
#
|
22
|
+
def response_to_artifacts: (Mihari::Structs::Censys::Response response) -> Array[String]
|
23
|
+
|
24
|
+
#
|
25
|
+
# Build an artifact from a Shodan search API response
|
26
|
+
#
|
27
|
+
# @param [Structs::Censys::Hit] hit
|
28
|
+
#
|
29
|
+
# @return [Artifact]
|
30
|
+
#
|
31
|
+
def build_artifact: (Mihari::Structs::Censys::Hit hit) -> Mihari::Artifact
|
32
|
+
|
33
|
+
def configuration_keys: () -> ::Array["censys_id" | "censys_secret"]
|
34
|
+
|
35
|
+
def api: () -> untyped
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class CIRCL < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["circl_passive_password" | "circl_passive_username"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def search: () -> Array[String]
|
23
|
+
|
24
|
+
def passive_dns_search: () -> Array[String]
|
25
|
+
|
26
|
+
def passive_ssl_search: () -> Array[String]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Crtsh < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
attr_reader exclude_expired: bool
|
9
|
+
|
10
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def api: () -> untyped
|
15
|
+
|
16
|
+
def search: () -> Array[Hash[(String | Symbol), untyped]]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class DNPedia < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
|
9
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def api: () -> untyped
|
14
|
+
|
15
|
+
def search: () -> Array[String]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class DNSTwister < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def valid_type?: () -> bool
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def resolvable?: (String domain) -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Onyphe < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
|
9
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
PAGE_SIZE: ::Integer
|
14
|
+
|
15
|
+
def configuration_keys: () -> ::Array["onyphe_api_key"]
|
16
|
+
|
17
|
+
def api: () -> untyped
|
18
|
+
|
19
|
+
def search_with_page: (String query, ?page: ::Integer page) -> Mihari::Structs::Onyphe::Response
|
20
|
+
|
21
|
+
def search: () -> Array[Mihari::Structs::Onyphe::Response]
|
22
|
+
|
23
|
+
#
|
24
|
+
# Build an artifact from an Onyphe search API result
|
25
|
+
#
|
26
|
+
# @param [Structs::Onyphe::Result] result
|
27
|
+
#
|
28
|
+
# @return [Artifact]
|
29
|
+
#
|
30
|
+
def build_artifact: (Mihari::Structs::Onyphe::Result result) -> Mihari::Artifact
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class OTX < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["otx_api_key"]
|
19
|
+
|
20
|
+
def domain_client: () -> untyped
|
21
|
+
|
22
|
+
def ip_client: () -> untyped
|
23
|
+
|
24
|
+
def valid_type?: () -> bool
|
25
|
+
|
26
|
+
def search: () -> Array[String]
|
27
|
+
|
28
|
+
def domain_search: () -> Array[String]
|
29
|
+
|
30
|
+
def ip_search: () -> Array[String]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|