Module: PWN::Plugins::CreditCard
- Defined in:
- lib/pwn/plugins/credit_card.rb
Overview
This plugin provides useful credit card capabilities
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
-
.generate(opts = {}) ⇒ Object
- 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: ‘optional - number of numbers to generate (defaults to 1)’ ).
-
.help ⇒ Object
Display Usage for this Module.
-
.type(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::CreditCard.type( cc: ‘required - e.g. XXXX XXXX XXXX XXXX’ ).
Class Method Details
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
45 46 47 48 49 |
# File 'lib/pwn/plugins/credit_card.rb', line 45 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.generate(opts = {}) ⇒ Object
- 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: 'optional - number of numbers to generate (defaults to 1)'
)
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pwn/plugins/credit_card.rb', line 16 public_class_method def self.generate(opts = {}) type = opts[:type].to_s.scrub.strip.chomp.to_sym count = opts[:count].to_i count = 1 if count.zero? 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 |
.help ⇒ Object
Display Usage for this Module
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/pwn/plugins/credit_card.rb', line 53 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: 'optional - number of numbers to generate (defaults to 1)' ) #{self}.type( cc: 'required - e.g. XXXX XXXX XXXX XXXX' ) #{self}.authors " end |
.type(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::CreditCard.type(
cc: 'required - e.g. XXXX XXXX XXXX XXXX'
)
36 37 38 39 40 41 |
# File 'lib/pwn/plugins/credit_card.rb', line 36 public_class_method def self.type(opts = {}) cc = opts[:cc].to_s.scrub.strip.chomp cc.credit_card_brand rescue StandardError => e raise e end |