Sha256: b7def172d3abe03b9a9f28be1d3b23eb782f82bd3a1b4cbc98f0afe34bbedf04

Contents?: true

Size: 1.92 KB

Versions: 18

Compression:

Stored size: 1.92 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
      DEFAULT_CHANNEL: String

      DEFAULT_USERNAME: String

      # @return [String, nil]
      attr_reader webhook_url: String?

      # @return [String]
      attr_reader channel: String

      # @return [String]
      attr_reader username: String

      #
      # Check webhook URL is set
      #
      # @return [Boolean]
      #
      def webhook_url?: () -> bool

      def notifier: () -> ::Slack::Notifier

      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
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mihari-4.12.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.11.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.10.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.9.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.8.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.7.4 sig/lib/mihari/emitters/slack.rbs
mihari-4.7.3 sig/lib/mihari/emitters/slack.rbs
mihari-4.7.2 sig/lib/mihari/emitters/slack.rbs
mihari-4.7.1 sig/lib/mihari/emitters/slack.rbs
mihari-4.7.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.6.1 sig/lib/mihari/emitters/slack.rbs
mihari-4.6.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.5.3 sig/lib/mihari/emitters/slack.rbs
mihari-4.5.2 sig/lib/mihari/emitters/slack.rbs
mihari-4.5.1 sig/lib/mihari/emitters/slack.rbs
mihari-4.5.0 sig/lib/mihari/emitters/slack.rbs
mihari-4.4.1 sig/lib/mihari/emitters/slack.rbs
mihari-4.4.0 sig/lib/mihari/emitters/slack.rbs