Sha256: d608f7babcb479784ed061f13e024cba9f4e8361368c1570ea35e3b12d722cd3

Contents?: true

Size: 1.46 KB

Versions: 55

Compression:

Stored size: 1.46 KB

Contents

# frozen_string_literal: true

# require 'credit_card_validations'

module PWN
  module Plugins
    # This plugin provides useful credit card capabilities
    module CreditCard
      # Supported Method Parameters::
      # PWN::Plugins::CreditCard.generate(
      #   type: 'required - card to generate :amex|:unionpay|:dankort|:diners|:elo|:discover|:hipercard|:jcb|:maestro|:mastercard|:mir|:rupay|:solo|:switch|:visa',
      #   count: 'required - number of numbers to generate'
      # )

      public_class_method def self.generate(opts = {})
        type = opts[:type].to_s.scrub.strip.chomp.to_sym
        count = opts[:count].to_i

        cc_result_arr = []
        (1..count).each do
          cc_result_arr.push(CreditCardValidations::Factory.random(type))
        end

        cc_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(
            type: 'required - card to generate :amex|:unionpay|:dankort|:diners|:elo|:discover|:hipercard|:jcb|:maestro|:mastercard|:mir|:rupay|:solo|:switch|:visa',
            count: 'required - number of numbers to generate'
          )

          #{self}.authors
        "
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
pwn-0.4.404 lib/pwn/plugins/credit_card.rb
pwn-0.4.403 lib/pwn/plugins/credit_card.rb
pwn-0.4.402 lib/pwn/plugins/credit_card.rb
pwn-0.4.401 lib/pwn/plugins/credit_card.rb
pwn-0.4.400 lib/pwn/plugins/credit_card.rb
pwn-0.4.399 lib/pwn/plugins/credit_card.rb
pwn-0.4.398 lib/pwn/plugins/credit_card.rb
pwn-0.4.396 lib/pwn/plugins/credit_card.rb
pwn-0.4.394 lib/pwn/plugins/credit_card.rb
pwn-0.4.393 lib/pwn/plugins/credit_card.rb
pwn-0.4.391 lib/pwn/plugins/credit_card.rb
pwn-0.4.390 lib/pwn/plugins/credit_card.rb
pwn-0.4.389 lib/pwn/plugins/credit_card.rb
pwn-0.4.388 lib/pwn/plugins/credit_card.rb
pwn-0.4.387 lib/pwn/plugins/credit_card.rb
pwn-0.4.386 lib/pwn/plugins/credit_card.rb
pwn-0.4.385 lib/pwn/plugins/credit_card.rb
pwn-0.4.384 lib/pwn/plugins/credit_card.rb
pwn-0.4.383 lib/pwn/plugins/credit_card.rb
pwn-0.4.382 lib/pwn/plugins/credit_card.rb