Sha256: d2813f791b3986b6b752326abf16648dea74011e6a0d426ca5a662dd3d0a0c6e

Contents?: true

Size: 1.64 KB

Versions: 4

Compression:

Stored size: 1.64 KB

Contents

module Mihari
  module Emitters
    class Attachment
      attr_reader data: String
      attr_reader data_type: String

      # 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

4 entries across 4 versions & 1 rubygems

Version Path
mihari-4.1.2 sig/lib/mihari/emitters/slack.rbs
mihari-4.1.1 sig/lib/mihari/emitters/slack.rbs
mihari-4.1.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.0.0 sig/lib/mihari/emitters/slack.rbs