Sha256: 0a76f95edfb1b30e92e70e161aeedaa1ce0f79297af6f7ea20b93ebfe0b078df

Contents?: true

Size: 906 Bytes

Versions: 2

Compression:

Stored size: 906 Bytes

Contents

# frozen_string_literal: true

module Osakana
  class Monitor
    def self.check_newly_domains(keyword)
      websites = DNPedia.search(keyword)
      attachements = websites.map(&:to_attachement)
      Notifier.notify("DNPedia keyword: #{keyword}", attachements)
    end

    def self.censys_lookup(query)
      websites = Censys.lookup(query)
      attachements = websites.map(&:to_attachement)
      Notifier.notify("Censys query: #{query}", attachements)
    end

    def self.ayashige_lookup(keyword)
      websites = Ayashige.lookup(keyword)
      attachements = websites.map(&:to_attachement)
      Notifier.notify("Ayashige keyword: #{keyword}", attachements)
    end

    def self.urlscan_lookup(query, size:)
      websites = Urlscan.lookup(query, size: size)
      attachements = websites.map(&:to_attachement)
      Notifier.notify("urlscan.io query: #{query}", attachements)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
osakana-0.4.0 lib/osakana/monitor.rb
osakana-0.3.0 lib/osakana/monitor.rb