From d344f848249459656673027f29393d8599126b02 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Tue, 1 Nov 2016 19:38:47 +0100 Subject: [PATCH] remove cloudflare error handling --- lib/common/db_updater.rb | 11 +---------- lib/common/errors.rb | 5 ++--- wpscan.rb | 6 ------ 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/lib/common/db_updater.rb b/lib/common/db_updater.rb index 9e9703b4..f8d2439a 100644 --- a/lib/common/db_updater.rb +++ b/lib/common/db_updater.rb @@ -80,15 +80,6 @@ class DbUpdater local_file_checksum(filename) end - def get_cloudflare_info - begin - res = Browser.get(remote_file_url('/cdn-cgi/trace'), request_params) - res.body - rescue - nil - end - end - def update(verbose = false) FILES.each do |filename| begin @@ -110,7 +101,7 @@ class DbUpdater puts " [i] Database File Checksum : #{db_checksum}" if verbose unless dl_checksum == db_checksum - raise ChecksumError.new(File.read(local_file_path(filename)), get_cloudflare_info), "#{filename}: checksums do not match (local: #{dl_checksum} remote: #{db_checksum})" + raise ChecksumError.new(File.read(local_file_path(filename))), "#{filename}: checksums do not match (local: #{dl_checksum} remote: #{db_checksum})" end rescue => e puts ' [i] Restoring Backup due to error' if verbose diff --git a/lib/common/errors.rb b/lib/common/errors.rb index be111b85..80f1de32 100644 --- a/lib/common/errors.rb +++ b/lib/common/errors.rb @@ -33,10 +33,9 @@ class DownloadError < HttpError end class ChecksumError < StandardError - attr_reader :file, :cloudflare_info + attr_reader :file - def initialize(file, cloudflare_info) + def initialize(file) @file = file - @cloudflare_info = cloudflare_info end end diff --git a/wpscan.rb b/wpscan.rb index f5f403bd..75634eaf 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -470,12 +470,6 @@ def main puts end - if e.cloudflare_info - puts critical('Cloudflare Info:') - puts e.cloudflare_info - puts - end - puts critical('Please submit this info as an Github issue') exit(1) rescue => e