Class: WPScan::Finders::Findings
- Inherits:
-
Array
- Object
- Array
- WPScan::Finders::Findings
- Defined in:
- lib/wpscan/finders/findings.rb
Overview
Findings container
Instance Attribute Summary collapse
-
#on_append ⇒ Object
Optional callable invoked with each newly-appended finding (not invoked when a duplicate is merged into an existing one via confirmed_by).
Instance Method Summary collapse
-
#<<(finding) ⇒ Object
Override to include the confirmed_by logic.
Instance Attribute Details
#on_append ⇒ Object
Optional callable invoked with each newly-appended finding (not invoked when a duplicate is merged into an existing one via confirmed_by). Used by enumeration controllers to stream findings as they are discovered.
10 11 12 |
# File 'lib/wpscan/finders/findings.rb', line 10 def on_append @on_append end |
Instance Method Details
#<<(finding) ⇒ Object
Override to include the confirmed_by logic
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wpscan/finders/findings.rb', line 15 def <<(finding) return self unless finding each do |found| next unless found == finding found.confirmed_by << finding found.confidence += finding.confidence return self end super @on_append&.call(finding) self end |