Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/interesting_findings/php_disabled.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Finders
5
module InterestingFindings
6
# See https://github.com/wpscanteam/wpscan/issues/1593
7
class PHPDisabled < CMSScanner::Finders::Finder
8
PATTERN = /\$wp_version =/.freeze
9
10
# @return [ InterestingFinding ]
11
def aggressive(_opts = {})
12
path = 'wp-includes/version.php'
13
14
return unless PATTERN.match?(target.head_and_get(path).body)
15
16
Model::PHPDisabled.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
17
end
18
end
19
end
20
end
21
end
22
23