Layout changes with new colors
This commit is contained in:
@@ -96,7 +96,7 @@ def banner
|
|||||||
puts ' \\ /\\ / | | ____) | (__| (_| | | | |'
|
puts ' \\ /\\ / | | ____) | (__| (_| | | | |'
|
||||||
puts ' \\/ \\/ |_| |_____/ \\___|\\__,_|_| |_|'
|
puts ' \\/ \\/ |_| |_____/ \\___|\\__,_|_| |_|'
|
||||||
puts
|
puts
|
||||||
puts ' WordPress Security Scanner by the WPScan Team '
|
puts bold(' WordPress Security Scanner by the WPScan Team ')
|
||||||
# Alignment of the version (w & w/o the Revision)
|
# Alignment of the version (w & w/o the Revision)
|
||||||
if REVISION
|
if REVISION
|
||||||
puts " Version #{version}"
|
puts " Version #{version}"
|
||||||
@@ -113,6 +113,10 @@ def colorize(text, color_code)
|
|||||||
"\e[#{color_code}m#{text}\e[0m"
|
"\e[#{color_code}m#{text}\e[0m"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bold(text)
|
||||||
|
colorize(text, 1)
|
||||||
|
end
|
||||||
|
|
||||||
def red(text)
|
def red(text)
|
||||||
colorize(text, 31)
|
colorize(text, 31)
|
||||||
end
|
end
|
||||||
@@ -121,6 +125,14 @@ def green(text)
|
|||||||
colorize(text, 32)
|
colorize(text, 32)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def amber(text)
|
||||||
|
colorize(text, 33)
|
||||||
|
end
|
||||||
|
|
||||||
|
def blue(text)
|
||||||
|
colorize(text, 34)
|
||||||
|
end
|
||||||
|
|
||||||
def xml(file)
|
def xml(file)
|
||||||
Nokogiri::XML(File.open(file)) do |config|
|
Nokogiri::XML(File.open(file)) do |config|
|
||||||
config.noblanks
|
config.noblanks
|
||||||
|
|||||||
14
wpscan.rb
14
wpscan.rb
@@ -38,8 +38,8 @@ def main
|
|||||||
end
|
end
|
||||||
puts @updater.update()
|
puts @updater.update()
|
||||||
else
|
else
|
||||||
puts 'Svn / Git not installed, or wpscan has not been installed with one of them.'
|
puts '[i] Svn / Git not installed, or wpscan has not been installed with one of them.'
|
||||||
puts 'Update aborted'
|
puts "#{red('[!]')} Update aborted"
|
||||||
end
|
end
|
||||||
exit(0)
|
exit(0)
|
||||||
end
|
end
|
||||||
@@ -69,15 +69,15 @@ def main
|
|||||||
puts "Following redirection #{redirection}"
|
puts "Following redirection #{redirection}"
|
||||||
puts
|
puts
|
||||||
else
|
else
|
||||||
puts "The remote host tried to redirect us to: #{redirection}"
|
puts "#{blue('[i]')} The remote host tried to redirect to: #{redirection}"
|
||||||
print '[?] Do you want follow the redirection ? [y/n] '
|
print "[?] Do you want follow the redirection ? [y/n] "
|
||||||
end
|
end
|
||||||
|
|
||||||
if wpscan_options.follow_redirection or Readline.readline =~ /^y/i
|
if wpscan_options.follow_redirection or Readline.readline =~ /^y/i
|
||||||
wpscan_options.url = redirection
|
wpscan_options.url = redirection
|
||||||
wp_target = WpTarget.new(redirection, wpscan_options.to_h)
|
wp_target = WpTarget.new(redirection, wpscan_options.to_h)
|
||||||
else
|
else
|
||||||
puts 'Scan aborted'
|
puts "#{red('[!]')} Scan aborted"
|
||||||
exit(0)
|
exit(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -138,7 +138,7 @@ def main
|
|||||||
end
|
end
|
||||||
|
|
||||||
wp_target.config_backup.each do |file_url|
|
wp_target.config_backup.each do |file_url|
|
||||||
puts red("[!] A wp-config.php backup file has been found in: '#{file_url}'")
|
puts "#{red('[!]')} A wp-config.php backup file has been found in: '#{file_url}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
if wp_target.search_replace_db_2_exists?
|
if wp_target.search_replace_db_2_exists?
|
||||||
@@ -212,7 +212,7 @@ def main
|
|||||||
|
|
||||||
wp_plugins = WpPlugins.passive_detection(wp_target)
|
wp_plugins = WpPlugins.passive_detection(wp_target)
|
||||||
if !wp_plugins.empty?
|
if !wp_plugins.empty?
|
||||||
puts " | #{wp_plugins.size} plugins found:"
|
puts " | Plugins found: #{wp_plugins.size}"
|
||||||
|
|
||||||
wp_plugins.output(wpscan_options.verbose)
|
wp_plugins.output(wpscan_options.verbose)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user