Sha256: 301ad5816ccef2e7d0bd2b30db35ea999ed3a2ed5939d7c6c857bd4e71c719a1
Contents?: true
Size: 1.35 KB
Versions: 721
Compression:
Stored size: 1.35 KB
Contents
# frozen_string_literal: true module PWN module Plugins # This plugin provides useful social security number capabilities module SSN # Supported Method Parameters:: # PWN::Plugins::SSN.generate( # count: 'required - number of SSN numbers to generate' # ) public_class_method def self.generate(opts = {}) count = opts[:count].to_i # Based upon new SSN Randomization: # https://www.ssa.gov/employer/randomization.html ssn_result_arr = [] (1..count).each do this_area = format('%0.3d', Random.rand(1..999)) this_group = format('%0.2d', Random.rand(1..99)) this_serial = format('%0.4d', Random.rand(1..9999)) this_ssn = "#{this_area}-#{this_group}-#{this_serial}" ssn_result_arr.push(this_ssn) end ssn_result_arr rescue StandardError => e raise e end # Author(s):: 0day Inc. <request.pentest@0dayinc.com> public_class_method def self.authors "AUTHOR(S): 0day Inc. <request.pentest@0dayinc.com> " end # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.generate( count: 'required - number of SSN numbers to generate' ) #{self}.authors " end end end end
Version data entries
721 entries across 721 versions & 1 rubygems