mihari 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/notifiers/slack.rb +26 -11
- data/lib/mihari/version.rb +1 -1
- data/screenshots/slack.png +0 -0
- 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: 249e7df317ee9b52f8ea3b5cfd61907e01c0b70b212198c761d187d9e7632c05
|
4
|
+
data.tar.gz: '0286a744aac6c5572fb427167a221eab3021d7f2f640a7de80e8426cf9f79ca4'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c962e2822a4202d4e0ad1566964363aaa4ec3aa9cfa70de3cebd263a2929d92b04d01c2825ce300206afcf7b8dc3baec679dd5c0d6fd3db484a82755457f3de1
|
7
|
+
data.tar.gz: 796f880fcc0c71cc0d11ee393dc710a9e647cbc545d950c9b4a350336284c17fe9c31438bd5f1344bec185b796782efd7bc82669e821b4e407ad39d3dd080a88
|
@@ -16,15 +16,21 @@ module Mihari
|
|
16
16
|
@data_type = data_type
|
17
17
|
end
|
18
18
|
|
19
|
+
def fields
|
20
|
+
[vt_link, urlscan_link].compact
|
21
|
+
end
|
22
|
+
|
23
|
+
def actions
|
24
|
+
[vt_link, urlscan_link].compact
|
25
|
+
end
|
26
|
+
|
19
27
|
def vt_link
|
20
28
|
return nil unless _vt_link
|
21
29
|
|
22
30
|
{
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
footer: "virustotal.com",
|
27
|
-
footer_icon: "http://www.google.com/s2/favicons?domain=virustotal.com"
|
31
|
+
type: "button",
|
32
|
+
text: "Lookup on VirusTotal",
|
33
|
+
url: _vt_link,
|
28
34
|
}
|
29
35
|
end
|
30
36
|
|
@@ -32,17 +38,21 @@ module Mihari
|
|
32
38
|
return nil unless _urlscan_link
|
33
39
|
|
34
40
|
{
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
footer: "urlscan.io",
|
39
|
-
footer_icon: "http://www.google.com/s2/favicons?domain=urlscan.io"
|
41
|
+
type: "button",
|
42
|
+
text: "Lookup on urlscan.io",
|
43
|
+
url: _urlscan_link,
|
40
44
|
}
|
41
45
|
end
|
42
46
|
|
43
47
|
# @return [Array]
|
44
48
|
def to_a
|
45
|
-
[
|
49
|
+
[
|
50
|
+
{
|
51
|
+
text: defanged_data,
|
52
|
+
fallback: "VT & urlscan.io links",
|
53
|
+
actions: actions
|
54
|
+
}
|
55
|
+
]
|
46
56
|
end
|
47
57
|
|
48
58
|
private
|
@@ -82,6 +92,11 @@ module Mihari
|
|
82
92
|
def sha256
|
83
93
|
Digest::SHA256.hexdigest data
|
84
94
|
end
|
95
|
+
|
96
|
+
# @return [String]
|
97
|
+
def defanged_data
|
98
|
+
@defanged_data ||= data.to_s.gsub /\./, "[.]"
|
99
|
+
end
|
85
100
|
end
|
86
101
|
|
87
102
|
class Slack < Base
|
data/lib/mihari/version.rb
CHANGED
data/screenshots/slack.png
CHANGED
Binary file
|
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.2.
|
4
|
+
version: 0.2.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: 2019-05-
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|