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/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, 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
- #found_by ⇒ Object
-
#initialize(target) ⇒ Finder
constructor
A new instance of Finder.
- #passive(_opts = {}) ⇒ Object
- #progress_bar(total, title = '', format = '%t %a <%B> (%c / %C) %P%% %e') ⇒ ProgressBar
-
#titleize ⇒ String
The titleize name of the finder.
Constructor Details
#initialize(target) ⇒ Finder
Returns a new instance of Finder.
13 14 15 |
# File 'lib/cms_scanner/finders/finder.rb', line 13 def initialize(target) @target = target end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
11 12 13 |
# File 'lib/cms_scanner/finders/finder.rb', line 11 def target @target end |
Instance Method Details
#aggressive(_opts = {}) ⇒ Object
27 28 |
# File 'lib/cms_scanner/finders/finder.rb', line 27 def aggressive(_opts = {}) end |
#found_by ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/cms_scanner/finders/finder.rb', line 39 def found_by caller_locations.each do |call| label = call.label next unless label == 'aggressive' || label == 'passive' return "#{titleize} (#{label.capitalize} Detection)" end end |
#passive(_opts = {}) ⇒ Object
23 24 |
# File 'lib/cms_scanner/finders/finder.rb', line 23 def passive(_opts = {}) end |
#progress_bar(total, title = '', format = '%t %a <%B> (%c / %C) %P%% %e') ⇒ ProgressBar
35 36 37 |
# File 'lib/cms_scanner/finders/finder.rb', line 35 def (total, title = '', format = '%t %a <%B> (%c / %C) %P%% %e') ProgressBar.create(total: total, title: title, format: format) end |
#titleize ⇒ String
Returns The titleize name of the finder.
18 19 20 |
# File 'lib/cms_scanner/finders/finder.rb', line 18 def titleize self.class.to_s.demodulize.underscore.titleize end |