Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/interesting_findings/emergency_pwd_reset_script.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Finders
5
module InterestingFindings
6
# Emergency Password Reset Script finder
7
class EmergencyPwdResetScript < CMSScanner::Finders::Finder
8
# @return [ InterestingFinding ]
9
def aggressive(_opts = {})
10
path = 'emergency.php'
11
res = target.head_and_get(path)
12
13
return unless res.code == 200 && !target.homepage_or_404?(res)
14
15
Model::EmergencyPwdResetScript.new(
16
target.url(path),
17
confidence: /password/i.match?(res.body) ? 100 : 40,
18
found_by: DIRECT_ACCESS
19
)
20
end
21
end
22
end
23
end
24
end
25
26