Class: CMSScanner::Finders::Finder
- Inherits:
-
Object
- Object
- CMSScanner::Finders::Finder
- Defined in:
- lib/cms_scanner/finders/finder.rb,
lib/cms_scanner/finders/finder/enumerator.rb,
lib/cms_scanner/finders/finder/fingerprinter.rb,
lib/cms_scanner/finders/finder/smart_url_checker.rb,
lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
Overview
Finder
Direct Known Subclasses
InterestingFiles::FantasticoFileslist, InterestingFiles::Headers, InterestingFiles::RobotsTxt, InterestingFiles::SearchReplaceDB2, InterestingFiles::XMLRPC
Defined Under Namespace
Modules: Enumerator, Fingerprinter, SmartURLChecker
Constant Summary collapse
- DIRECT_ACCESS =
Constants for common found_by
'Direct Access (Aggressive Detection)'
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #aggressive(_opts = {}) ⇒ Object
- #browser ⇒ Browser
- #found_by ⇒ Object
- #hydra ⇒ Typhoeus::Hydra
-
#initialize(target) ⇒ Finder
constructor
A new instance of Finder.
- #passive(_opts = {}) ⇒ Object
- #progress_bar(opts = {}) ⇒ ProgressBar::Base
-
#titleize ⇒ String
The titleized name of the finder.
Constructor Details
#initialize(target) ⇒ Finder
Returns a new instance of Finder.
14 15 16 |
# File 'lib/cms_scanner/finders/finder.rb', line 14 def initialize(target) @target = target end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
12 13 14 |
# File 'lib/cms_scanner/finders/finder.rb', line 12 def target @target end |
Instance Method Details
#aggressive(_opts = {}) ⇒ Object
28 29 |
# File 'lib/cms_scanner/finders/finder.rb', line 28 def aggressive(_opts = {}) end |
#browser ⇒ Browser
39 40 41 |
# File 'lib/cms_scanner/finders/finder.rb', line 39 def browser @browser ||= NS::Browser.instance end |
#found_by ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/cms_scanner/finders/finder.rb', line 48 def found_by caller_locations.each do |call| label = call.label next unless label == 'aggressive' || label == 'passive' return "#{titleize} (#{label.capitalize} Detection)" end end |
#hydra ⇒ Typhoeus::Hydra
44 45 46 |
# File 'lib/cms_scanner/finders/finder.rb', line 44 def hydra @hydra ||= browser.hydra end |
#passive(_opts = {}) ⇒ Object
24 25 |
# File 'lib/cms_scanner/finders/finder.rb', line 24 def passive(_opts = {}) end |
#progress_bar(opts = {}) ⇒ ProgressBar::Base
34 35 36 |
# File 'lib/cms_scanner/finders/finder.rb', line 34 def (opts = {}) ProgressBar.create({ format: '%t %a <%B> (%c / %C) %P%% %e' }.merge(opts)) end |
#titleize ⇒ String
Returns The titleized name of the finder.
19 20 21 |
# File 'lib/cms_scanner/finders/finder.rb', line 19 def titleize self.class.to_s.demodulize.underscore.titleize end |