Sha256: 8f5b3448e74a00c4bb0743af1a0f7f5bac0c234b0d29f512747807c2f84ddc0f

Contents?: true

Size: 1.46 KB

Versions: 13

Compression:

Stored size: 1.46 KB

Contents

# frozen_string_literal: true

require "thor"

module Miteru
  class CLI < Thor
    method_option :auto_download, type: :boolean, default: false, desc: "Enable or disable auto-download of phishing kits"
    method_option :ayashige, type: :boolean, default: false, desc: "Enable or disable ayashige(ninoseki/ayashige) feed"
    method_option :directory_traveling, type: :boolean, default: false, desc: "Enable or disable directory traveling"
    method_option :download_to, type: :string, default: "/tmp", desc: "Directory to download file(s)"
    method_option :post_to_slack, type: :boolean, default: false, desc: "Post a message to Slack if it detects a phishing kit"
    method_option :size, type: :numeric, default: 100, desc: "Number of urlscan.io's results. (Max: 10,000)"
    method_option :threads, type: :numeric, desc: "Number of threads to use"
    method_option :verbose, type: :boolean, default: true
    desc "execute", "Execute the crawler"
    def execute
      Miteru.configure do |config|
        config.auto_download = options["auto_download"]
        config.ayashige = options["ayashige"]
        config.directory_traveling = options["directory_traveling"]
        config.download_to = options["download_to"]
        config.post_to_slack = options["post_to_slack"]
        config.size = options["size"]
        config.verbose = options["verbose"]

        threads = options["threads"]
        config.threads = threads if threads
      end

      Crawler.execute
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
miteru-0.14.6 lib/miteru/cli.rb
miteru-0.14.5 lib/miteru/cli.rb
miteru-0.14.4 lib/miteru/cli.rb
miteru-0.14.3 lib/miteru/cli.rb
miteru-0.14.2 lib/miteru/cli.rb
miteru-0.14.1 lib/miteru/cli.rb
miteru-0.14.0 lib/miteru/cli.rb
miteru-0.13.0 lib/miteru/cli.rb
miteru-0.12.13 lib/miteru/cli.rb
miteru-0.12.12 lib/miteru/cli.rb
miteru-0.12.11 lib/miteru/cli.rb
miteru-0.12.10 lib/miteru/cli.rb
miteru-0.12.9 lib/miteru/cli.rb