Sha256: f893fed5f20c3cc60af4cef163768b7b11813080fdf15054377b6632b43b47cf

Contents?: true

Size: 771 Bytes

Versions: 23

Compression:

Stored size: 771 Bytes

Contents

# Waraxe authority-specific code.
module Metasploit::Model::Authority::Waraxe
  #
  # CONSTANTS
  #

  # Regular expression for breaking up designation into year and number
  DESIGNATION_REGEXP = /\A(?<year>\d+)-SA#(?<number>\d+)\Z/

  #
  # Methods
  #

  # Returns URL to {Metasploit::Model::Reference#designation Waraxe Security Advisory's} page on Waraxe's site.
  #
  # @param designation [String] YYYY-SA#N+ Waraxe fully-qualified ID.
  # @return [String] URL
  # @return [nil] if designation does not match {DESIGNATION_REGEXP}.
  def self.designation_url(designation)
    match = DESIGNATION_REGEXP.match(designation)
    url = nil

    if match
      number = match[:number]

      url = "http://www.waraxe.us/advisory-#{number}.html"
    end

    url
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
metasploit-model-0.28.0 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.28.0-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.28.0.pre.engine.pre.requires lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.27.4 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.27.4-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.27.0.pre.dep.pre.railties lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.26.1-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.26.1 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.7 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.7-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.6 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.6-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.3 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.3-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.2 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.2-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.1 lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.1-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java lib/metasploit/model/authority/waraxe.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups lib/metasploit/model/authority/waraxe.rb