class 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('base_url must be set')             unless options[:base_url] != nil and options[:base_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_progression must be set')     unless options[:show_progression] != 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] =~ %rplugins/ or options[:type] =~ %rthemes/ or options[:type] =~ %rtimthumbs/
    raise("Unknown type #{options[:type]}")
  end
end