Added 'Total WordPress Sites in the World' statistics
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
require 'nokogiri'
|
||||||
|
require 'typhoeus'
|
||||||
|
|
||||||
class StatsPlugin < Plugin
|
class StatsPlugin < Plugin
|
||||||
|
|
||||||
@@ -12,8 +14,9 @@ class StatsPlugin < Plugin
|
|||||||
|
|
||||||
def run(options = {})
|
def run(options = {})
|
||||||
if options[:stats]
|
if options[:stats]
|
||||||
puts 'WPScan Database Statistics:'
|
puts "WPScan Database Statistics:"
|
||||||
puts '--------------------------'
|
puts "--------------------------"
|
||||||
|
puts "[#] Total WordPress Sites in the World: #{get_wp_installations}"
|
||||||
puts "[#] Total vulnerable versions: #{vuln_core_count}"
|
puts "[#] Total vulnerable versions: #{vuln_core_count}"
|
||||||
puts "[#] Total vulnerable plugins: #{vuln_plugin_count}"
|
puts "[#] Total vulnerable plugins: #{vuln_plugin_count}"
|
||||||
puts "[#] Total vulnerable themes: #{vuln_theme_count}"
|
puts "[#] Total vulnerable themes: #{vuln_theme_count}"
|
||||||
@@ -62,4 +65,9 @@ class StatsPlugin < Plugin
|
|||||||
IO.readlines(file).size
|
IO.readlines(file).size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_wp_installations()
|
||||||
|
page = Nokogiri::HTML(Typhoeus.get('http://en.wordpress.com/stats/').body)
|
||||||
|
page.css('span[class="stats-flipper-number"]').text
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user