Class: WPScan::Finders::InterestingFindings::UploadSQLDump
- Defined in:
- app/finders/interesting_findings/upload_sql_dump.rb
Overview
UploadSQLDump finder
Constant Summary collapse
- SQL_PATTERN =
/(?:DROP|CREATE|(?:UN)?LOCK) TABLE|INSERT INTO/
Constants inherited from Finder
Instance Attribute Summary
Attributes inherited from Finder
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
11 12 13 14 15 16 17 18 |
# File 'app/finders/interesting_findings/upload_sql_dump.rb', line 11 def aggressive(_opts = {}) path = 'wp-content/uploads/dump.sql' res = target.head_and_get(path, [200], get: { headers: { 'Range' => 'bytes=0-3000' } }) return unless SQL_PATTERN.match?(res.body) Model::UploadSQLDump.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS) end |