show_progress_bar renamed to show_progression
This commit is contained in:
@@ -35,7 +35,7 @@ shared_examples_for "WpPlugins" do
|
||||
@options = {
|
||||
:base_url => @wp_url,
|
||||
:only_vulnerable_ones => false,
|
||||
:show_progress_bar => false,
|
||||
:show_progression => false,
|
||||
:error_404_hash => @module.error_404_hash,
|
||||
:homepage_hash => @module.homepage_hash,
|
||||
:vulns_file => @plugin_vulns_file,
|
||||
|
||||
@@ -31,15 +31,16 @@ shared_examples_for "WpThemes" do
|
||||
@module.error_404_hash = Digest::MD5.hexdigest("Error 404!")
|
||||
@module.extend(WpThemes)
|
||||
|
||||
@options = {:base_url => @wp_url,
|
||||
:only_vulnerable_ones => false,
|
||||
:show_progress_bar => false,
|
||||
:error_404_hash => Digest::MD5.hexdigest("Error 404!"),
|
||||
:vulns_file => @theme_vulns_file,
|
||||
:file => @themes_file,
|
||||
:type => "themes",
|
||||
:wp_content_dir => "wp-content",
|
||||
:vulns_xpath_2 => "//theme"
|
||||
@options = {
|
||||
:base_url => @wp_url,
|
||||
:only_vulnerable_ones => false,
|
||||
:show_progression => false,
|
||||
:error_404_hash => Digest::MD5.hexdigest("Error 404!"),
|
||||
:vulns_file => @theme_vulns_file,
|
||||
:file => @themes_file,
|
||||
:type => "themes",
|
||||
:wp_content_dir => "wp-content",
|
||||
:vulns_xpath_2 => "//theme"
|
||||
}
|
||||
File.exist?(@theme_vulns_file).should == true
|
||||
File.exist?(@themes_file).should == true
|
||||
|
||||
@@ -19,35 +19,34 @@
|
||||
shared_examples_for "WpTimthumbs" do
|
||||
|
||||
before :each do
|
||||
@options = {}
|
||||
@url = "http://example.localhost/"
|
||||
@theme_name = "bueno"
|
||||
@options[:base_url] = @url
|
||||
@options[:wp_content_dir] = "wp-content"
|
||||
@options[:name] = @theme_name
|
||||
@options[:error_404_hash] = "xx"
|
||||
@options[:show_progress_bar] = false
|
||||
@options = {}
|
||||
@url = "http://example.localhost/"
|
||||
@theme_name = "bueno"
|
||||
@options[:base_url] = @url
|
||||
@options[:wp_content_dir] = "wp-content"
|
||||
@options[:name] = @theme_name
|
||||
@options[:error_404_hash] = "xx"
|
||||
@options[:show_progression] = false
|
||||
@options[:only_vulnerable_ones] = false
|
||||
@options[:vulns_file] = "xx"
|
||||
@options[:type] = "timthumbs"
|
||||
@module = WpScanModuleSpec.new(@url)
|
||||
@fixtures_dir = SPEC_FIXTURES_WPSCAN_MODULES_DIR + "/wp_timthumbs"
|
||||
@timthumbs_file = @fixtures_dir + "/timthumbs.txt"
|
||||
@targets_from_file =
|
||||
%w{
|
||||
@options[:vulns_file] = "xx"
|
||||
@options[:type] = "timthumbs"
|
||||
@module = WpScanModuleSpec.new(@url)
|
||||
@fixtures_dir = SPEC_FIXTURES_WPSCAN_MODULES_DIR + "/wp_timthumbs"
|
||||
@timthumbs_file = @fixtures_dir + "/timthumbs.txt"
|
||||
@targets_from_file = %w{
|
||||
http://example.localhost/wp-content/plugins/fotoslide/timthumb.php
|
||||
http://example.localhost/wp-content/plugins/feature-slideshow/timthumb.php
|
||||
}
|
||||
@targets_from_theme =
|
||||
[
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/lib/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/inc/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/includes/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/scripts/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/tools/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/functions/timthumb.php"
|
||||
]
|
||||
[
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/lib/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/inc/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/includes/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/scripts/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/tools/timthumb.php",
|
||||
"http://example.localhost/wp-content/themes/" + @theme_name + "/functions/timthumb.php"
|
||||
]
|
||||
|
||||
@module.extend(WpTimthumbs)
|
||||
end
|
||||
|
||||
@@ -21,17 +21,17 @@ require File.expand_path(File.dirname(__FILE__) + '/wpscan_helper')
|
||||
describe WpOptions do
|
||||
describe "#check_options" do
|
||||
before :each do
|
||||
@options = {}
|
||||
@options[:base_url] = "url"
|
||||
@options = {}
|
||||
@options[:base_url] = "url"
|
||||
@options[:only_vulnerable_ones] = false
|
||||
@options[:file] = "file"
|
||||
@options[:vulns_file] = "vulns_file"
|
||||
@options[:vulns_xpath] = "vulns_xpath"
|
||||
@options[:vulns_xpath_2] = "vulns_xpath_2"
|
||||
@options[:wp_content_dir] = "wp_content_dir"
|
||||
@options[:show_progress_bar] = true
|
||||
@options[:error_404_hash] = "error_404_hash"
|
||||
@options[:type] = "type"
|
||||
@options[:file] = "file"
|
||||
@options[:vulns_file] = "vulns_file"
|
||||
@options[:vulns_xpath] = "vulns_xpath"
|
||||
@options[:vulns_xpath_2] = "vulns_xpath_2"
|
||||
@options[:wp_content_dir] = "wp_content_dir"
|
||||
@options[:show_progression] = true
|
||||
@options[:error_404_hash] = "error_404_hash"
|
||||
@options[:type] = "type"
|
||||
|
||||
@message = ""
|
||||
end
|
||||
@@ -105,9 +105,9 @@ describe WpOptions do
|
||||
@message = "wp_content_dir must be set"
|
||||
end
|
||||
|
||||
it "should raise an exception (show_progress_bar nil)" do
|
||||
@options[:show_progress_bar] = nil
|
||||
@message = "show_progress_bar must be set"
|
||||
it "should raise an exception (show_progression nil)" do
|
||||
@options[:show_progression] = nil
|
||||
@message = "show_progression must be set"
|
||||
end
|
||||
|
||||
it "should raise an exception (error_404_hash empty)" do
|
||||
@@ -135,4 +135,4 @@ describe WpOptions do
|
||||
@message = "Unknown type unknown"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user