Sha256: fa396b3e039b7843fd1d8b328043f6798b3e7843a4a0a6207d59824d45941f3f

Contents?: true

Size: 1.66 KB

Versions: 13

Compression:

Stored size: 1.66 KB

Contents

module Mihari
  module Emitters
    class Attachment
      attr_reader data: String
      attr_reader data_type: String
      # include Mem

      # extend Dry::Initializer

      def actions: () -> Array[Hash[(String | Symbol), untyped]]

      def vt_link: () -> (nil | { :type => "button", text: "VirusTotal", url: String })

      def urlscan_link: () -> (nil | { :type => "button", text: "urlscan.io", url: String })

      def censys_link: () -> (nil | { :type => "button", text: "Censys", url: String })

      def shodan_link: () -> (nil | { :type => "button", text: "Shodan", url: String })

      # @return [Array]
      def to_a: () -> ::Array[{ text: String, fallback: "VT & urlscan.io links", actions: Array[Hash[(String | Symbol), untyped]] }]

      private

      # @return [String]
      def _urlscan_link: () -> String?

      # @return [String]
      def _vt_link: () -> String?

      def _censys_link: () -> String?

      def _shodan_link: () -> String?

      # @return [String]
      def sha256: () -> String

      # @return [String]
      def defanged_data: () -> String
    end

    class Slack < Base
      def notifier: () -> Mihari::Notifiers::Slack

      def valid?: () -> bool

      def to_attachments: (Array[Mihari::Artifact] artifacts) -> Array[Mihari::Emitters::Attachment]

      def to_text: (title: String title, description: String description, ?tags: Array[String] tags) -> String

      def emit: (title: String title, description: String description, artifacts: Array[Mihari::Artifact] artifacts, ?tags: Array[String] tags, **untyped _options) -> void

      private

      def configuration_keys: () -> ::Array["slack_webhook_url"]
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mihari-3.12.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.11.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.10.1 sig/lib/mihari/emitters/slack.rbs
mihari-3.10.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.9.2 sig/lib/mihari/emitters/slack.rbs
mihari-3.9.1 sig/lib/mihari/emitters/slack.rbs
mihari-3.9.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.8.1 sig/lib/mihari/emitters/slack.rbs
mihari-3.8.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.7.2 sig/lib/mihari/emitters/slack.rbs
mihari-3.7.1 sig/lib/mihari/emitters/slack.rbs
mihari-3.7.0 sig/lib/mihari/emitters/slack.rbs
mihari-3.6.1 sig/lib/mihari/emitters/slack.rbs