class WPScan::DB::WpItem

WpItem - super DB class for Plugin, Theme and Version

Public Class Methods

metadata() click to toggle source

@return [ JSON ]

# File lib/wpscan/db/wp_item.rb, line 15
def self.metadata
  @metadata ||= read_json_file(metadata_file)
end
metadata_at(identifier) click to toggle source

@param [ String ] identifier The plugin/theme slug or version number

@return [ Hash ] The JSON data from the metadata associated to the identifier

# File lib/wpscan/db/wp_item.rb, line 10
def self.metadata_at(identifier)
  metadata[identifier] || {}
end
metadata_file() click to toggle source

@return [ String ]

# File lib/wpscan/db/wp_item.rb, line 20
def self.metadata_file
  @metadata_file ||= DB_DIR.join('metadata.json').to_s
end