# File lib/wpscan/modules/wp_item.rb, line 54 def <=>(item) item.name <=> @name end
# File lib/wpscan/modules/wp_item.rb, line 50 def ==(item) item.name == @name end
Is directory listing enabled?
# File lib/wpscan/modules/wp_item.rb, line 36 def directory_listing? # Need to remove to file part from the url Browser.instance.get(location_uri_from_file_url(get_url.to_s)).body[%{<title>Index of}] ? true : false end
# File lib/wpscan/modules/wp_item.rb, line 41 def extract_name_from_url(url) url.to_s[%{^(https?://.*/([^/]+)/)}, 2] end
# File lib/wpscan/modules/wp_item.rb, line 23 def get_url URI.parse("#{@base_url.to_s}#@wp_content_dir/#@path") end
# File lib/wpscan/modules/wp_item.rb, line 58 def location_uri_from_file_url(location_url) valid_location_url = location_url[%{^(https?://.*/)[^.]+\.[^/]+$}, 1] unless valid_location_url valid_location_url = add_trailing_slash(location_url) end URI.parse(valid_location_url) end
Generated with the Darkfish Rdoc Generator 2.