Fix git merge problem
This commit is contained in:
52
wpscan.rb
52
wpscan.rb
@@ -63,12 +63,11 @@ def main
|
||||
end
|
||||
end
|
||||
|
||||
redirection = wp_target.redirection
|
||||
if redirection
|
||||
if (redirection = wp_target.redirection)
|
||||
if wpscan_options.follow_redirection
|
||||
puts "Following redirection #{redirection}"
|
||||
puts
|
||||
else
|
||||
<<<<<<< HEAD
|
||||
puts "#{blue('[i]')} The remote host tried to redirect to: #{redirection}"
|
||||
print "[?] Do you want follow the redirection ? [y/n] "
|
||||
end
|
||||
@@ -79,6 +78,22 @@ def main
|
||||
else
|
||||
puts "#{red('[!]')} Scan aborted"
|
||||
exit(0)
|
||||
=======
|
||||
puts "The remote host redirects to: #{redirection}"
|
||||
puts '[?] Do you want follow the redirection ? [Y]es [N]o [A]bort, default: [N]'
|
||||
end
|
||||
|
||||
if wpscan_options.follow_redirection || !wpscan_options.batch
|
||||
if wpscan_options.follow_redirection || (input = Readline.readline) =~ /^y/i
|
||||
wpscan_options.url = redirection
|
||||
wp_target = WpTarget.new(redirection, wpscan_options.to_h)
|
||||
else
|
||||
if input =~ /^a/i
|
||||
puts 'Scan aborted'
|
||||
exit(0)
|
||||
end
|
||||
end
|
||||
>>>>>>> master
|
||||
end
|
||||
end
|
||||
|
||||
@@ -100,8 +115,8 @@ def main
|
||||
unless wp_target.wp_plugins_dir_exists?
|
||||
puts "The plugins directory '#{wp_target.wp_plugins_dir}' does not exist."
|
||||
puts 'You can specify one per command line option (don\'t forget to include the wp-content directory if needed)'
|
||||
print '[?] Continue? [y/n] '
|
||||
unless Readline.readline =~ /^y/i
|
||||
puts '[?] Continue? [Y]es [N]o, default: [N]'
|
||||
if wpscan_options.batch || Readline.readline !~ /^y/i
|
||||
exit(0)
|
||||
end
|
||||
end
|
||||
@@ -148,7 +163,7 @@ def main
|
||||
wp_target.interesting_headers.each do |header|
|
||||
output = "#{green('[+]')} Interesting header: "
|
||||
|
||||
if header[1].class == Array
|
||||
if header[1].class == Array
|
||||
header[1].each do |value|
|
||||
puts output + "#{header[0]}: #{value}"
|
||||
end
|
||||
@@ -294,6 +309,11 @@ def main
|
||||
puts
|
||||
puts "#{green('[+]')} Enumerating usernames ..."
|
||||
|
||||
if wp_target.has_plugin?('stop-user-enumeration')
|
||||
puts "#{red('[!]')} Stop User Enumeration plugin detected, results might be empty. " \
|
||||
"However a bypass exists, see stop_user_enumeration_bypass.rb in #{File.expand_path(File.dirname(__FILE__))}"
|
||||
end
|
||||
|
||||
wp_users = WpUsers.aggressive_detection(wp_target,
|
||||
enum_options.merge(
|
||||
range: wpscan_options.enumerate_usernames_range,
|
||||
@@ -328,11 +348,11 @@ def main
|
||||
|
||||
puts
|
||||
puts "#{red('[!]')} The plugin #{protection_plugin.name} has been detected. It might record the IP and timestamp of every failed login and/or prevent brute forcing altogether. Not a good idea for brute forcing!"
|
||||
print "[?] Do you want to start the brute force anyway ? [y/n] "
|
||||
puts '[?] Do you want to start the brute force anyway ? [Y]es [N]o, default: [N]'
|
||||
|
||||
bruteforce = false if Readline.readline !~ /^y/i
|
||||
bruteforce = false if wpscan_options.batch || Readline.readline !~ /^y/i
|
||||
end
|
||||
puts
|
||||
|
||||
if bruteforce
|
||||
puts "#{green('[+]')} Starting the password brute forcer"
|
||||
|
||||
@@ -354,7 +374,7 @@ def main
|
||||
stop_time = Time.now
|
||||
elapsed = stop_time - start_time
|
||||
used_memory = get_memory_usage - start_memory
|
||||
|
||||
|
||||
puts
|
||||
puts green("[+] Finished: #{stop_time.asctime}")
|
||||
puts green("[+] Memory used: #{used_memory.bytes_to_human}")
|
||||
@@ -362,13 +382,13 @@ def main
|
||||
exit(0) # must exit!
|
||||
|
||||
rescue SystemExit, Interrupt
|
||||
|
||||
|
||||
rescue => e
|
||||
if e.backtrace[0] =~ /main/
|
||||
puts red(e.message)
|
||||
else
|
||||
puts red("[ERROR] #{e.message}")
|
||||
puts red("Trace:")
|
||||
puts
|
||||
puts red(e.message)
|
||||
|
||||
if wpscan_options && wpscan_options.verbose
|
||||
puts red('Trace:')
|
||||
puts red(e.backtrace.join("\n"))
|
||||
end
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user