Class: WPScan::Finders::Medias::AttachmentBruteForcing
- Inherits:
-
CMSScanner::Finders::Finder
- Object
- CMSScanner::Finders::Finder
- WPScan::Finders::Medias::AttachmentBruteForcing
- Includes:
- CMSScanner::Finders::Finder::Enumerator
- Defined in:
- app/finders/medias/attachment_brute_forcing.rb
Overview
Medias Finder, see github.com/wpscanteam/wpscan/issues/172
Instance Method Summary collapse
- #aggressive(opts = {}) ⇒ Array<Media>
- #create_progress_bar(opts = {}) ⇒ Object
- #target_urls(opts = {}) ⇒ Hash
Instance Method Details
#aggressive(opts = {}) ⇒ Array<Media>
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/finders/medias/attachment_brute_forcing.rb', line 14 def aggressive(opts = {}) found = [] enumerate(target_urls(opts), opts) do |res| next unless res.code == 200 found << Model::Media.new(res.effective_url, opts.merge(found_by: found_by, confidence: 100)) end found end |
#create_progress_bar(opts = {}) ⇒ Object
40 41 42 |
# File 'app/finders/medias/attachment_brute_forcing.rb', line 40 def (opts = {}) super(opts.merge(title: ' Brute Forcing Attachment IDs -')) end |
#target_urls(opts = {}) ⇒ Hash
30 31 32 33 34 35 36 37 38 |
# File 'app/finders/medias/attachment_brute_forcing.rb', line 30 def target_urls(opts = {}) urls = {} opts[:range].each do |id| urls[target.uri.join("?attachment_id=#{id}").to_s] = id end urls end |