Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/app/finders/interesting_findings/backup_db.rb
485 views
1
# frozen_string_literal: true
2
3
module WPScan
4
module Finders
5
module InterestingFindings
6
# BackupDB finder
7
class BackupDB < CMSScanner::Finders::Finder
8
# @return [ InterestingFinding ]
9
def aggressive(_opts = {})
10
path = 'wp-content/backup-db/'
11
res = target.head_and_get(path, [200, 403])
12
13
return unless [200, 403].include?(res.code) && !target.homepage_or_404?(res)
14
15
Model::BackupDB.new(
16
target.url(path),
17
confidence: 70,
18
found_by: DIRECT_ACCESS,
19
interesting_entries: target.directory_listing_entries(path)
20
)
21
end
22
end
23
end
24
end
25
end
26
27