Sha256: d9dcdb83f3099d644c600e2db7afde68947c5592e4e5613cfd86edc6f70c930e
Contents?: true
Size: 1005 Bytes
Versions: 4
Compression:
Stored size: 1005 Bytes
Contents
# frozen_string_literal: true require_relative "./feeds/feed" require_relative "./feeds/phishing_database" require_relative "./feeds/phishstats" require_relative "./feeds/ayashige" require_relative "./feeds/urlscan" require_relative "./feeds/urlscan_pro" module Miteru class Entry # @return [String] attr_reader :url # @return [String] attr_reader :source def initialize(url, source) @url = url @source = source end end class Feeds IGNORE_EXTENSIONS = %w[.htm .html .php .asp .aspx .exe .txt].freeze def initialize @feeds = [ PhishingDatabase.new, PhishStats.new, UrlScan.new(Miteru.configuration.size), UrlScanPro.new, Miteru.configuration.ayashige? ? Ayashige.new : nil ].compact end # # Returns a list of suspicious entries # # @return [Array<Entry>] # def suspicious_entries @suspicious_entries ||= @feeds.map(&:entries).flatten.uniq(&:url) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
miteru-1.2.2 | lib/miteru/feeds.rb |
miteru-1.2.1 | lib/miteru/feeds.rb |
miteru-1.2.0 | lib/miteru/feeds.rb |
miteru-1.1.0 | lib/miteru/feeds.rb |