Parent

Methods

Files

WpOptions

Options Hash

Options

Public Class Methods

check_options(options) click to toggle source
# File lib/wpscan/wp_options.rb, line 34
def self.check_options(options)
  raise("url must be set")                  unless options[:url] != nil and options[:url].to_s.length > 0
  raise("only_vulnerable_ones must be set") unless options[:only_vulnerable_ones] != nil
  raise("file must be set")                 unless options[:file] != nil and options[:file].length > 0
  raise("vulns_file must be set")           unless options[:vulns_file] != nil and options[:vulns_file].length > 0
  raise("vulns_xpath must be set")          unless options[:vulns_xpath] != nil and options[:vulns_xpath].length > 0
  raise("vulns_xpath_2 must be set")        unless options[:vulns_xpath_2] != nil and options[:vulns_xpath_2].length > 0
  raise("wp_content_dir must be set")       unless options[:wp_content_dir] != nil and options[:wp_content_dir].length > 0
  raise("show_progress_bar must be set")    unless options[:show_progress_bar] != nil
  raise("error_404_hash must be set")       unless options[:error_404_hash] != nil and options[:error_404_hash].length > 0
  raise("type must be set")                 unless options[:type] != nil and options[:type].length > 0

  unless options[:type] =~ /plugins/ or options[:type] =~ /themes/ or options[:type] =~ /timthumbs/
    raise("Unknown type #{options[:type]}")
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.