From 160ee4dcec89d41eb4b2880604b9967c2ac24a16 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Fri, 10 May 2013 17:01:10 +0200 Subject: [PATCH 1/2] Fix #181 Don't exit if no usernames found during a simple enumeration (but exit if a brute force is asked) --- wpscan.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wpscan.rb b/wpscan.rb index 53a10da1..d41c5b8b 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -260,15 +260,17 @@ def main show_progression: false ) ) - puts + if wp_users.empty? puts 'We did not enumerate any usernames :(' - puts 'Try supplying your own username with the --username option' - puts - exit(1) + + if wpscan_options.wordlist + puts 'Try supplying your own username with the --username option' + puts + exit(1) + end else puts green('[+]') + " We found the following #{wp_users.size} user/s :" - wp_users.output(margin_left: ' ' * 4) end From 42efc9f9ec4f48d71c9223d1ee637edcc83415aa Mon Sep 17 00:00:00 2001 From: erwanlr Date: Fri, 10 May 2013 17:44:22 +0200 Subject: [PATCH 2/2] Fix #182 Remove the progress-bar static length (120), and let it to automatic --- lib/common/collections/wp_items/detectable.rb | 1 - lib/common/models/wp_user/brute_forcable.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/common/collections/wp_items/detectable.rb b/lib/common/collections/wp_items/detectable.rb index 348c75b4..832c27fa 100755 --- a/lib/common/collections/wp_items/detectable.rb +++ b/lib/common/collections/wp_items/detectable.rb @@ -58,7 +58,6 @@ class WpItems < Array ProgressBar.create( format: '%t %a <%B> (%c / %C) %P%% %e', title: ' ', # Used to craete a left margin - length: 120, total: targets_size ) end diff --git a/lib/common/models/wp_user/brute_forcable.rb b/lib/common/models/wp_user/brute_forcable.rb index d9ffe61d..995db2a5 100644 --- a/lib/common/models/wp_user/brute_forcable.rb +++ b/lib/common/models/wp_user/brute_forcable.rb @@ -66,7 +66,6 @@ class WpUser < WpItem ProgressBar.create( format: '%t %a <%B> (%c / %C) %P%% %e', title: " Brute Forcing '#{login}'", - length: 120, total: passwords_size ) end