Class: Mihari::Emitters::Attachment
- Inherits:
-
Object
- Object
- Mihari::Emitters::Attachment
- Extended by:
- Dry::Initializer
- Includes:
- Memist::Memoizable
- Defined in:
- lib/mihari/emitters/slack.rb
Instance Method Summary collapse
- #actions ⇒ Object
- #censys_link ⇒ Object
- #shodan_link ⇒ Object
- #to_a ⇒ Array
- #urlscan_link ⇒ Object
- #vt_link ⇒ Object
Instance Method Details
#actions ⇒ Object
16 17 18 |
# File 'lib/mihari/emitters/slack.rb', line 16 def actions [vt_link, urlscan_link, censys_link, shodan_link].compact end |
#censys_link ⇒ Object
32 33 34 35 36 |
# File 'lib/mihari/emitters/slack.rb', line 32 def censys_link return nil unless _censys_link { type: "button", text: "Censys", url: _censys_link } end |
#shodan_link ⇒ Object
38 39 40 41 42 |
# File 'lib/mihari/emitters/slack.rb', line 38 def shodan_link return nil unless _shodan_link { type: "button", text: "Shodan", url: _shodan_link } end |
#to_a ⇒ Array
45 46 47 48 49 50 51 52 53 |
# File 'lib/mihari/emitters/slack.rb', line 45 def to_a [ { text: defanged_data, fallback: "VT & urlscan.io links", actions: actions } ] end |
#urlscan_link ⇒ Object
26 27 28 29 30 |
# File 'lib/mihari/emitters/slack.rb', line 26 def urlscan_link return nil unless _urlscan_link { type: "button", text: "urlscan.io", url: _urlscan_link } end |
#vt_link ⇒ Object
20 21 22 23 24 |
# File 'lib/mihari/emitters/slack.rb', line 20 def vt_link return nil unless _vt_link { type: "button", text: "VirusTotal", url: _vt_link } end |