From b7f7bdb9acac130c3138817cdc278b3621c8f3ae Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Fri, 2 Jan 2015 18:17:45 +0100 Subject: [PATCH] Fix specs #748 --- lib/wpscan/wp_target.rb | 1 + lib/wpscan/wpscan_options.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wpscan/wp_target.rb b/lib/wpscan/wp_target.rb index 50e0a19e..b477d148 100644 --- a/lib/wpscan/wp_target.rb +++ b/lib/wpscan/wp_target.rb @@ -21,6 +21,7 @@ class WpTarget < WebSite attr_reader :verbose def initialize(target_url, options = {}) + raise Exception.new('target_url can not be nil or empty') if target_url.nil? || target_url == '' super(target_url) @verbose = options[:verbose] diff --git a/lib/wpscan/wpscan_options.rb b/lib/wpscan/wpscan_options.rb index cd2e9f48..76b8fdbd 100644 --- a/lib/wpscan/wpscan_options.rb +++ b/lib/wpscan/wpscan_options.rb @@ -53,7 +53,7 @@ class WpscanOptions end def url=(url) - raise 'Empty URL given' if !url + raise Exception.new('Empty URL given') if url.nil? || url == '' @url = URI.parse(add_http_protocol(url)).to_s end