Method: CMSScanner::Finders::UniqueFinders#run
- Defined in:
- lib/cms_scanner/finders/unique_finders.rb
#run(opts = {}) ⇒ Object, false
Returns The best finding or false if none.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cms_scanner/finders/unique_finders.rb', line 17 def run(opts = {}) opts[:confidence_threshold] ||= 100 symbols_from_mode(opts[:mode]).each do |symbol| each do |finder| [*finder.send(symbol, opts.merge(found: findings))].compact.each do |found| findings << found end next if opts[:confidence_threshold] <= 0 findings.each { |f| return f if f.confidence >= opts[:confidence_threshold] } end end best_finding(findings) end |