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