Sha256: 587bebf9f4c42635e2887d515f69e230d2c9083d874c72b07b7796817ac14cd4
Contents?: true
Size: 1.41 KB
Versions: 9
Compression:
Stored size: 1.41 KB
Contents
module WPScan module Finders module Users # Users disclosed from the dc:creator field in the RSS # The names disclosed are display names, however depending on the configuration of the blog, # they can be the same than usernames class RSSGenerator < WPScan::Finders::WpVersion::RSSGenerator def process_urls(urls, _opts = {}) found = [] urls.each do |url| res = Browser.get_and_follow_location(url) next unless res.code == 200 && res.body =~ /<dc\:creator>/i potential_usernames = [] begin res.xml.xpath('//item/dc:creator').each do |node| potential_username = node.text.to_s # Ignoring potential username longer than 60 characters and containing accents # as they are considered invalid. See https://github.com/wpscanteam/wpscan/issues/1215 next if potential_username.length > 60 || potential_username =~ /[^\x00-\x7F]/ potential_usernames << potential_username end rescue Nokogiri::XML::XPath::SyntaxError next end potential_usernames.uniq.each do |potential_username| found << CMSScanner::User.new(potential_username, found_by: found_by, confidence: 50) end break end found end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems