Class: WPScan::Plugin
Overview
WordPress Plugin
Constant Summary
Constants inherited from WpItem
WpItem::CHANGELOGS, WpItem::READMES
Instance Attribute Summary
Attributes inherited from WpItem
#detection_opts, #name, #target, #uri
Instance Method Summary collapse
- #db_data ⇒ JSON
-
#initialize(name, target, opts = {}) ⇒ Plugin
constructor
See WpItem.
- #version(opts = {}) ⇒ WPScan::Version, false
Methods inherited from WpItem
#==, #changelog_url, #classify_name, #directory_listing?, #error_log?, #last_updated, #latest_version, #outdated?, #popular?, #readme_url, #to_s, #url, #vulnerabilities, #vulnerable_to?
Methods included from Vulnerable
Constructor Details
#initialize(name, target, opts = {}) ⇒ Plugin
See WpItem
5 6 7 8 9 |
# File 'app/models/plugin.rb', line 5 def initialize(name, target, opts = {}) super(name, target, opts) @uri = Addressable::URI.parse(target.url("wp-content/plugins/#{name}/")) end |
Instance Method Details
#db_data ⇒ JSON
12 13 14 |
# File 'app/models/plugin.rb', line 12 def db_data DB::Plugin.db_data(name) end |
#version(opts = {}) ⇒ WPScan::Version, false
19 20 21 22 23 |
# File 'app/models/plugin.rb', line 19 def version(opts = {}) @version = Finders::PluginVersion::Base.find(self, detection_opts.merge(opts)) if @version.nil? @version end |