Class: WPScan::Finders::Plugins::Comments
- Inherits:
-
CMSScanner::Finders::Finder
- Object
- CMSScanner::Finders::Finder
- WPScan::Finders::Plugins::Comments
- Defined in:
- app/finders/plugins/comments.rb
Overview
Plugins from Comments Finder
Instance Method Summary collapse
Instance Method Details
#passive(opts = {}) ⇒ Array<Plugin>
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/finders/plugins/comments.rb', line 10 def passive(opts = {}) found = [] opts[:unique] = true unless opts.key?(:unique) target.homepage_res.html.xpath('//comment()').each do |node| comment = node.text.to_s.strip DB::DynamicPluginFinders.comments.each do |name, config| next unless comment =~ config['pattern'] plugin = WPScan::Plugin.new(name, target, opts.merge(found_by: found_by, confidence: 70)) found << plugin unless opts[:unique] && found.include?(plugin) end end found end |