Class: WPScan::DB::WpItem

Inherits:
Object
  • Object
show all
Defined in:
lib/wpscan/db/wp_item.rb

Overview

WpItem - super DB class for Plugin, Theme and Version

Direct Known Subclasses

Plugin, Theme, Version

Class Method Summary collapse

Class Method Details

.dbJSON

Returns:

  • (JSON)


15
16
17
# File 'lib/wpscan/db/wp_item.rb', line 15

def self.db
  @db ||= read_json_file(db_file)
end

.db_data(identifier) ⇒ Hash

Returns The JSON data from the DB associated to the identifier.

Parameters:

  • identifier (String)

    The plugin/theme slug or version number

Returns:

  • (Hash)

    The JSON data from the DB associated to the identifier



10
11
12
# File 'lib/wpscan/db/wp_item.rb', line 10

def self.db_data(identifier)
  db[identifier] || {}
end