Class: CMSScanner::Finders::InterestingFindings::RobotsTxt
- Defined in:
- app/finders/interesting_findings/robots_txt.rb
Overview
Robots.txt finder
Constant Summary
Constants inherited from Finder
Instance Attribute Summary
Attributes inherited from Finder
Instance Method Summary collapse
Methods inherited from Finder
#browser, #create_progress_bar, #found_by, #hydra, #initialize, #passive, #titleize
Constructor Details
This class inherits a constructor from CMSScanner::Finders::Finder
Instance Method Details
#aggressive(_opts = {}) ⇒ InterestingFinding
9 10 11 12 13 14 15 16 |
# File 'app/finders/interesting_findings/robots_txt.rb', line 9 def aggressive(_opts = {}) path = 'robots.txt' res = target.head_and_get(path) return unless res&.code == 200 && res.body =~ /(?:user-agent|(?:dis)?allow):/i NS::Model::RobotsTxt.new(target.url(path), confidence: 100, found_by: found_by) end |