mihari 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/analyzers/censys.rb +1 -1
- data/lib/mihari/analyzers/onyphe.rb +1 -1
- data/lib/mihari/analyzers/shodan.rb +1 -1
- data/lib/mihari/cli.rb +2 -2
- data/lib/mihari/notifiers/slack.rb +3 -2
- data/lib/mihari/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c422cf04d9135c233e7bb474665fe5ed75d5b2fe3664066ff5a47eafd512a3f
|
4
|
+
data.tar.gz: 602a8869a041ec52b9bdf3553767bef221cdefd8b55336d0c61477575da7487c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7637aebdac55860402cffe0efbaa0bb2b67ff62630ad92e6b7fb42e78b19cc5d8ece769628f23611cb60aa8a409d0318542f5d32b213414b884d1f71c6c8e65e
|
7
|
+
data.tar.gz: e94ac2d667733c356664afb6f439fc9eca967eb70fc3e7b010915aed5f461fdab678a17e1064bb028c4f68e492bdb818f8a2aa07b748cbda5f0abbb0dfa391a2
|
data/lib/mihari/cli.rb
CHANGED
@@ -6,7 +6,7 @@ require "json"
|
|
6
6
|
module Mihari
|
7
7
|
class CLI < Thor
|
8
8
|
desc "censys [QUERY]", "Censys IPv4 lookup by a given query"
|
9
|
-
method_option :tags, type: :array,
|
9
|
+
method_option :tags, type: :array, desc: "tags"
|
10
10
|
def censys(query)
|
11
11
|
tags = options.dig("tags") || []
|
12
12
|
with_error_handling do
|
@@ -26,7 +26,7 @@ module Mihari
|
|
26
26
|
end
|
27
27
|
|
28
28
|
desc "onyphe [QUERY]", "Onyphe datascan lookup by a given query"
|
29
|
-
method_option :tags, type: :array,
|
29
|
+
method_option :tags, type: :array, desc: "tags"
|
30
30
|
def onyphe(query)
|
31
31
|
tags = options.dig("tags") || []
|
32
32
|
with_error_handling do
|
@@ -125,13 +125,14 @@ module Mihari
|
|
125
125
|
end.flatten
|
126
126
|
end
|
127
127
|
|
128
|
-
def notify(title:, description:, artifacts:)
|
128
|
+
def notify(title:, description:, artifacts:, tags:)
|
129
129
|
return if artifacts.empty?
|
130
130
|
|
131
131
|
attachments = to_attachments(artifacts)
|
132
|
+
tags << ["N/A"] if tags.empty?
|
132
133
|
|
133
134
|
slack = ::Slack::Incoming::Webhooks.new(slack_webhook_url, channel: slack_channel)
|
134
|
-
slack.post("#{title} (#{description})", attachments: attachments)
|
135
|
+
slack.post("#{title} (desc.: #{description} / tags: #{tags.join(', ')})", attachments: attachments)
|
135
136
|
end
|
136
137
|
end
|
137
138
|
end
|
data/lib/mihari/version.rb
CHANGED