Sha256: 31e32ab9aa7e1db0fe9c032820fe9c298f4aa749cc13f5546e2661967cdcdc44

Contents?: true

Size: 1.04 KB

Versions: 13

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module Neetob
  class CLI
    module MonthlyAudit
      module InstancesAndAddons
        module Cloudflare
          class BotProtectionEnabled < CLI::Base
            def initialize
              super()
            end

            def run
              ui.success "### 3.2.6. Checking whether Bot Protection is enabled"

              domains_data = [["Domain", "Bot protection", "Audit Passed"]]
              ui.info("\n", print_to_audit_log: false)
              Neetob::CLI::Cloudflare::Base::ZONE_IDS.keys.select { |domain|
 domain.to_s.include?(".com") }.map do |domain|
                bot_fight_mode = Neetob::CLI::Cloudflare::BotFightMode.new(domain).run
                ui.info("Checking Bot fight mode for #{domain}", print_to_audit_log: false)
                audit_passed = bot_fight_mode == "on" ? "Yes" : "No"
                domains_data << [domain, bot_fight_mode, audit_passed]
              end
              ui.print_table(domains_data)
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
neetob-0.5.29 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.28 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.27 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.26 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.25 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.24 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.23 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.22 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.21 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.20 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.19 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.18 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb
neetob-0.5.17 lib/neetob/cli/monthly_audit/instances_and_addons/cloudflare/bot_protection_enabled.rb