From bbefdfc4e5f3c88ee18d86c0df7ef4ce8d57763b Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Sun, 9 Jun 2013 09:19:25 +0200 Subject: [PATCH] Added debug output --- README | 16 ++++++++++++++++ README.md | 4 ++++ lib/wpscan/wpscan_helper.rb | 3 +++ lib/wpscan/wpscan_options.rb | 10 ++++++++-- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README b/README index aa113cfc..8eeabc76 100644 --- a/README +++ b/README @@ -180,6 +180,22 @@ Enumerate installed plugins... ruby wpscan.rb --url www.example.com --enumerate p +Run all enumeration tools... + + ruby wpscan.rb --url www.example.com --enumerate + +Use custom content directory... + + ruby wpscan.rb -u www.example.com --wp-content-dir custom-content + +Update WPScan... + + ruby wpscan.rb --update + +Debug output... + + ruby wpscan.rb --url www.example.com --debug-output 2>debug.log + ==WPSTOOLS ARGUMENTS== --help | -h This help screen. diff --git a/README.md b/README.md index f84ac256..2ddd995d 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,10 @@ Update WPScan... ```ruby wpscan.rb --update``` +Debug output... + +```ruby wpscan.rb --url www.example.com --debug-output 2>debug.log``` + #### WPSTOOLS ARGUMENTS --help | -h This help screen. diff --git a/lib/wpscan/wpscan_helper.rb b/lib/wpscan/wpscan_helper.rb index d26b6d2e..35f45174 100644 --- a/lib/wpscan/wpscan_helper.rb +++ b/lib/wpscan/wpscan_helper.rb @@ -49,6 +49,9 @@ def usage puts '-Update ...' puts "ruby #{script_name} --update" puts + puts '-Debug output ...' + puts "ruby #{script_name} --url www.example.com --debug-output 2>debug.log" + puts puts 'See README for further information.' puts end diff --git a/lib/wpscan/wpscan_options.rb b/lib/wpscan/wpscan_options.rb index 0e7a38ca..67e17243 100644 --- a/lib/wpscan/wpscan_options.rb +++ b/lib/wpscan/wpscan_options.rb @@ -28,7 +28,8 @@ class WpscanOptions :help, :config_file, :exclude_content_based, - :basic_auth + :basic_auth, + :debug_output ] attr_accessor *ACCESSOR_OPTIONS @@ -126,6 +127,10 @@ class WpscanOptions @basic_auth = "Basic #{Base64.encode64(basic_auth).chomp}" end + def debug_output=(debug_output) + Typhoeus::Config.verbose = debug_output + end + def has_options? !to_h.empty? end @@ -231,7 +236,8 @@ class WpscanOptions ['--wp-plugins-dir', GetoptLong::REQUIRED_ARGUMENT], ['--config-file', '-c', GetoptLong::REQUIRED_ARGUMENT], ['--exclude-content-based', GetoptLong::REQUIRED_ARGUMENT], - ['--basic-auth', GetoptLong::REQUIRED_ARGUMENT] + ['--basic-auth', GetoptLong::REQUIRED_ARGUMENT], + ['--debug-output', GetoptLong::NO_ARGUMENT] ) end