Sha256: 8833a023bfaf423ba79b621909a2d20f554139143f1b51dca8b2bd8c69f0a312
Contents?: true
Size: 809 Bytes
Versions: 8
Compression:
Stored size: 809 Bytes
Contents
require 'metasploit/model/authority' # 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
8 entries across 8 versions & 1 rubygems