output total number of plugins and themes
This commit is contained in:
@@ -192,6 +192,12 @@ shared_examples_for 'WpPlugins' do
|
||||
|
||||
@expected_plugins = [plugins[1]]
|
||||
end
|
||||
end
|
||||
|
||||
describe '#plugin_vulns_count' do
|
||||
it 'should return the correct number' do
|
||||
xml = "#{SPEC_FIXTURES_WPSCAN_WP_PLUGIN_DIR}/vulnerabilities/plugin_vulns.xml"
|
||||
@module.plugin_vulns_count(xml).should === 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -207,4 +207,11 @@ shared_examples_for 'WpThemes' do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#theme_vulns_count' do
|
||||
it 'should return the correct number' do
|
||||
xml = "#{SPEC_FIXTURES_WPSCAN_WP_THEME_DIR}/vulnerabilities/theme_vulns.xml"
|
||||
@module.theme_vulns_count(xml).should === 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -285,4 +285,5 @@ describe WpTheme do
|
||||
(instance === instance2).should == true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
17
spec/samples/wpscan/wp_theme/vulnerabilities/theme_vulns.xml
Normal file
17
spec/samples/wpscan/wp_theme/vulnerabilities/theme_vulns.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<vulnerabilities>
|
||||
<theme name="onepagewebsite">
|
||||
<vulnerability>
|
||||
<title>onepagewebsite Full Path Disclosure vulnerability</title>
|
||||
<reference>http://1337day.com/exploit/20027</reference>
|
||||
<type>FPD</type>
|
||||
</vulnerability>
|
||||
</theme>
|
||||
<theme name="vithy">
|
||||
<vulnerability>
|
||||
<title>vithy Full Path Disclosure vulnerability</title>
|
||||
<reference>http://1337day.com/exploit/20040</reference>
|
||||
<type>FPD</type>
|
||||
</vulnerability>
|
||||
</theme>
|
||||
</vulnerabilities>
|
||||
Reference in New Issue
Block a user