From 336473d912d39e1393b7e00950450eae8d04b5e3 Mon Sep 17 00:00:00 2001 From: Erwan Date: Thu, 30 Aug 2012 18:01:12 +0200 Subject: [PATCH] Useless code removed Options given to the Browser initializator improved --- lib/browser.rb | 4 ++-- lib/wpscan/wp_target.rb | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/browser.rb b/lib/browser.rb index 0e10f97a..b29ad9bb 100644 --- a/lib/browser.rb +++ b/lib/browser.rb @@ -197,9 +197,9 @@ class Browser # Override with the options if they are set def override_config_with_options(options) options.each do |option, value| - #if ACCESSOR_OPTIONS.include?(option) + if ACCESSOR_OPTIONS.include?(option) self.send(:"#{option}=", value) - #end + end end end diff --git a/lib/wpscan/wp_target.rb b/lib/wpscan/wp_target.rb index ce0d0693..d130831e 100644 --- a/lib/wpscan/wp_target.rb +++ b/lib/wpscan/wp_target.rb @@ -33,17 +33,12 @@ class WpTarget attr_reader :uri, :verbose def initialize(target_url, options = {}) - raise "Empty URL" if !target_url - @uri = URI.parse(add_http_protocol(target_url)) @verbose = options[:verbose] @wp_content_dir = options[:wp_content_dir] @wp_plugins_dir = options[:wp_plugins_dir] - Browser.instance(#options.merge(:max_threads => options[:threads])) - :proxy => options[:proxy], - :max_threads => options[:threads] - ) + Browser.instance(options.merge(:max_threads => options[:threads])) end # Alias of @uri.to_s