Sha256: 8ba81a6d081a68f1ae264551c8ba72d7447b54f14c142b44c9894cb00467351b

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

module Miteru
  module Commands
    module Main
      class << self
        def included(thor)
          thor.class_eval do
            include Concerns::DatabaseConnectable

            method_option :auto_download, type: :boolean, default: false,
              desc: "Enable or disable auto-downloading of phishing kits"
            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 phishing kits"
            method_option :verbose, type: :boolean, default: true
            desc "execute", "Execute the crawler"
            around :with_db_connection
            def execute
              Miteru.config.tap do |config|
                config.auto_download = options["auto_download"]
                config.directory_traveling = options["directory_traveling"]
                config.download_to = options["download_to"]
                config.verbose = options["verbose"]
              end
              Orchestrator.call
            end
            default_command :execute
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
miteru-3.0.1 lib/miteru/commands/main.rb
miteru-3.0.0 lib/miteru/commands/main.rb