Class: WPScan::Finders::InterestingFindings::Readme

Inherits:
Finder
  • Object
show all
Defined in:
app/finders/interesting_findings/readme.rb

Overview

Readme.html finder

Constant Summary

Constants inherited from Finder

Finder::DIRECT_ACCESS

Instance Attribute Summary

Attributes inherited from Finder

#progress_bar, #target

Instance Method Summary collapse

Methods inherited from Finder

#browser, #create_progress_bar, #found_by, #hydra, #initialize, #passive, #titleize

Constructor Details

This class inherits a constructor from WPScan::Finders::Finder

Instance Method Details

#aggressive(_opts = {}) ⇒ InterestingFinding

Returns:

  • (InterestingFinding)


9
10
11
12
13
14
15
16
17
18
19
# File 'app/finders/interesting_findings/readme.rb', line 9

def aggressive(_opts = {})
  potential_files.each do |path|
    res = target.head_and_get(path)

    next unless res.code == 200 && res.body =~ /wordpress/i

    return Model::Readme.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
  end

  nil
end

#potential_filesObject



22
23
24
# File 'app/finders/interesting_findings/readme.rb', line 22

def potential_files
  %w[readme.html olvasdel.html lisenssi.html liesmich.html]
end