mihari 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 513324945758cadacf94345cb8a2a410cab99a08abc0ad02148c7737660d7348
4
- data.tar.gz: 5c031467f3a6da288c5fceb137c17102654de072b6b34b2374dd15c523d09a03
3
+ metadata.gz: e890d0871e67d6f67aaf432ca236152286e0b9035f26cc1320f150416580e59e
4
+ data.tar.gz: 071d117cd29cd73f29f00c78dd42637248efc1073e43ce994393a8a7efeb75a6
5
5
  SHA512:
6
- metadata.gz: bf28354ab901254085d6e055e9c7a4989ce3d75ede0a6e978c009e69eb8f8a60a198e3fe505b82b9c5eddfa29b1866cc51da4bb8b41cc1727352d5bacd04e4d1
7
- data.tar.gz: fa111a82851f3e695ce1b5c7a582b030459e3dac3598cff1b4d943f03fea8bdd000d21f17434e080f80109d2f90a19d154e4291efced316bf9e3c2d59880f747
6
+ metadata.gz: 1acbd69f2f744b9025da82b41e4c6dbeb42f29eb7563fc6a0b2c09a5c332bfcd7913cee0639540e92437672503e3770ff1051b252f79deae653bbaeafedda590
7
+ data.tar.gz: 64492cabe3e7102e9614c915cf857db96cd2f1d9931174604131c2069f08d2cb1afc6136dcb4dc29c659f0e2c0d7f2b54836b8d81a0cae7389b00e37fee91b24
@@ -21,6 +21,8 @@ module Mihari
21
21
  end
22
22
 
23
23
  def emit(title:, artifacts:, tags: [], **_options)
24
+ return if artifacts.empty?
25
+
24
26
  event = ::MISP::Event.new(info: title)
25
27
 
26
28
  artifacts.each do |artifact|
@@ -87,7 +87,7 @@ module Mihari
87
87
  memoize :_vt_link
88
88
 
89
89
  def _censys_link
90
- data_type == "ip" ? "https://censys.io/ipv4/#{data}" : nil
90
+ data_type == "ip" ? "https://search.censys.io/hosts/#{data}" : nil
91
91
  end
92
92
  memoize :_censys_link
93
93
 
@@ -14,9 +14,8 @@ module Mihari
14
14
  # @return [Hash]
15
15
  #
16
16
  def load_config(path)
17
- return YAML.safe_load(File.read(path), symbolize_names: true) if Pathname(path).exist?
18
-
19
- YAML.safe_load(path, symbolize_names: true)
17
+ data = _load_config(path)
18
+ data.transform_keys(&:downcase)
20
19
  end
21
20
 
22
21
  #
@@ -80,6 +79,12 @@ module Mihari
80
79
  puts "- #{path} #{message.text}".colorize(:red)
81
80
  end
82
81
  end
82
+
83
+ def _load_config(path)
84
+ return YAML.safe_load(File.read(path), symbolize_names: true) if Pathname(path).exist?
85
+
86
+ YAML.safe_load(path, symbolize_names: true)
87
+ end
83
88
  end
84
89
  end
85
90
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mihari
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
data/mihari.gemspec CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "standard", "~> 1.1"
38
38
  spec.add_development_dependency "timecop", "~> 0.9"
39
39
  spec.add_development_dependency "vcr", "~> 6.0"
40
- spec.add_development_dependency "webmock", "~> 3.12"
40
+ spec.add_development_dependency "webmock", "~> 3.13"
41
41
 
42
42
  spec.add_dependency "active_model_serializers", "~> 0.10"
43
43
  spec.add_dependency "activerecord", "~> 6.1"
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: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-16 00:00:00.000000000 Z
11
+ date: 2021-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '3.12'
187
+ version: '3.13'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '3.12'
194
+ version: '3.13'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: active_model_serializers
197
197
  requirement: !ruby/object:Gem::Requirement