Class: WPScan::Finders::DbExports::KnownLocations
- Inherits:
-
CMSScanner::Finders::Finder
- Object
- CMSScanner::Finders::Finder
- WPScan::Finders::DbExports::KnownLocations
- Includes:
- CMSScanner::Finders::Finder::Enumerator
- Defined in:
- app/finders/db_exports/known_locations.rb
Overview
DB Exports finder See github.com/wpscanteam/wpscan-v3/issues/62
Instance Method Summary collapse
- #aggressive(opts = {}) ⇒ Array<DBExport>
- #create_progress_bar(opts = {}) ⇒ Object
- #potential_urls(opts = {}) ⇒ Hash
Instance Method Details
#aggressive(opts = {}) ⇒ Array<DBExport>
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/finders/db_exports/known_locations.rb', line 14 def aggressive(opts = {}) found = [] enumerate(potential_urls(opts), opts) do |res| next unless res.code == 200 && res.body =~ /INSERT INTO/ found << WPScan::DbExport.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100) end found end |
#create_progress_bar(opts = {}) ⇒ Object
43 44 45 |
# File 'app/finders/db_exports/known_locations.rb', line 43 def (opts = {}) super(opts.merge(title: ' Checking DB Exports -')) end |
#potential_urls(opts = {}) ⇒ Hash
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/finders/db_exports/known_locations.rb', line 30 def potential_urls(opts = {}) urls = {} domain_name = target.uri.host[/(^[\w|-]+)/, 1] File.open(opts[:list]).each_with_index do |path, index| path.gsub!('{domain_name}', domain_name) urls[target.url(path.chomp)] = index end urls end |