Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/interesting_findings/readme.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Finders
5
module InterestingFindings
6
# Readme.html finder
7
class Readme < CMSScanner::Finders::Finder
8
# @return [ InterestingFinding ]
9
def aggressive(_opts = {})
10
potential_files.each do |path|
11
res = target.head_and_get(path)
12
13
next unless res.code == 200 && res.body =~ /wordpress/i
14
15
return Model::Readme.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
16
end
17
18
nil
19
end
20
21
# @retun [ Array<String> ] The list of potential readme files
22
def potential_files
23
%w[readme.html olvasdel.html lisenssi.html liesmich.html]
24
end
25
end
26
end
27
end
28
end
29
30