class Yawast::Scanner::Plugins::Applications::CMS::Generic
Public Class Methods
get_generator(body)
click to toggle source
# File lib/scanner/plugins/applications/cms/generic.rb, line 9 def self.get_generator(body) regex = /<meta name="generator[^>]+content\s*=\s*['"]([^'"]+)['"][^>]*>/ match = body.match regex if match Yawast::Utilities.puts_info "Meta Generator: #{match[1]}" Yawast::Shared::Output.log_hash 'vulnerabilities', 'cms_meta_generator_exposed', {vulnerable: true, generator: match[1]} else Yawast::Shared::Output.log_hash 'vulnerabilities', 'cms_meta_generator_exposed', {vulnerable: false, generator: nil} end end