Class: WPScan::Finders::ConfigBackups::KnownFilenames
- Inherits:
-
CMSScanner::Finders::Finder
- Object
- CMSScanner::Finders::Finder
- WPScan::Finders::ConfigBackups::KnownFilenames
- Includes:
- CMSScanner::Finders::Finder::Enumerator
- Defined in:
- app/finders/config_backups/known_filenames.rb
Overview
Config Backup finder
Instance Method Summary collapse
- #aggressive(opts = {}) ⇒ Array<InterestingFinding>
- #create_progress_bar(opts = {}) ⇒ Object
- #potential_urls(opts = {}) ⇒ Hash
Instance Method Details
#aggressive(opts = {}) ⇒ Array<InterestingFinding>
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/finders/config_backups/known_filenames.rb', line 13 def aggressive(opts = {}) found = [] enumerate(potential_urls(opts), opts) do |res| # Might need to improve that next unless res.body =~ /define/i && res.body !~ /<\s?html/i found << WPScan::ConfigBackup.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100) end found end |
#create_progress_bar(opts = {}) ⇒ Object
40 41 42 |
# File 'app/finders/config_backups/known_filenames.rb', line 40 def (opts = {}) super(opts.merge(title: ' Checking Config Backups -')) end |
#potential_urls(opts = {}) ⇒ Hash
30 31 32 33 34 35 36 37 38 |
# File 'app/finders/config_backups/known_filenames.rb', line 30 def potential_urls(opts = {}) urls = {} File.open(opts[:list]).each_with_index do |file, index| urls[target.url(file.chomp)] = index end urls end |