From 6dc09e7d105af5b7db5cb6e5b080d8854948f9a0 Mon Sep 17 00:00:00 2001 From: Erwan Date: Sun, 9 Sep 2012 00:24:12 +0200 Subject: [PATCH] Ref #17 : Removed the output of plugins from passive detection if the user enumerate plugins or only vulnerable plugins (but they are still merged) --- wpscan.rb | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/wpscan.rb b/wpscan.rb index 9a7a678a..728ecb37 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -150,26 +150,28 @@ begin end end - puts - print "[+] Enumerating plugins from passive detection ... " + if wpscan_options.enumerate_plugins == nil and wpscan_options.enumerate_only_vulnerable_plugins == nil + puts + print "[+] Enumerating plugins from passive detection ... " - plugins = wp_target.plugins_from_passive_detection - unless plugins.empty? - print "#{plugins.size} found :\n" + plugins = wp_target.plugins_from_passive_detection + unless plugins.empty? + print "#{plugins.size} found :\n" - plugins.each do |plugin| - puts - puts " | Name: " + plugin.name - puts " | Location: " + plugin.location_url.gsub("$wp-plugins$", wp_target.wp_plugins_dir()) #Hotfix + plugins.each do |plugin| + puts + puts " | Name: " + plugin.name + puts " | Location: " + plugin.location_url.gsub("$wp-plugins$", wp_target.wp_plugins_dir()) #Hotfix - plugin.vulnerabilities.each do |vulnerability| - puts " |" - puts " | [!] " + vulnerability.title - puts " | * Reference: " + vulnerability.reference + plugin.vulnerabilities.each do |vulnerability| + puts " |" + puts " | [!] " + vulnerability.title + puts " | * Reference: " + vulnerability.reference + end end + else + print "No plugins found :(\n" end - else - print "No plugins found :(\n" end # Enumerate the installed plugins