Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@mihnea.dev/credit-card-generator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mihnea.dev/credit-card-generator

A Node.js package that generates valid credit card numbers, expiry dates, and CVV2 codes. The credit card numbers are valid with respect to the Luhn algorithm, and the CVV2 codes are generated using the Tripple-DES algorithm with double length keys.

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

Credit Card Generator

A Node.js package that generates valid credit card numbers, expiry dates, and CVV2 codes. The credit card numbers are valid with respect to the Luhn algorithm, and the CVV2 codes are generated using the Tripple-DES algorithm with double length keys.

Installation

To install the credit-card-generator package, run the following command:

npm install @mihnea.dev/credit-card-generator

Usage

To generate a credit card number, expiry date, and CVV2 code, use the following code:

const { default: CreditCardGenerator } = require("@mihnea.dev/credit-card-generator");
/** Initialize new Credit Card Generator */
const carder = new CreditCardGenerator()
/** Create a single card */
const card = carder.generate_one()
/** Create a set of cards */
const set = carder.generate_set(2)
/** Log the results */
console.log(card, '\n', set)

This will output:

{
  number: '4532355776740539',
  expiry: { month: '01', year: '27' },
  cvv2: '510'
} 
 Set(2) {
  {
    number: '4916384806334101',
    expiry: { month: '11', year: '27' },
    cvv2: '040'
  },
  {
    number: '4539505711626762',
    expiry: { month: '04', year: '27' },
    cvv2: '564'
  }
}

Parameters

  • new CreditCardGenerator() Create a new instance of the CreditCardGenerator class.
(alias) new CreditCardGenerator(encryption_key?: string | null | undefined, cc_presents?: Object<ICCPreset> | null | undefined, service_code?: number | undefined, log_in_console?: boolean | undefined): CreditCardGenerator
  • encryption_key - This parameter is the encryption key that will be used to generate the CVV2 code
  • cc_presents - This parameter is an object that contains credit card vendors with prefixes and digits length (ICCPreset interface)
  • service_code - This parameter is the service code that will be used to generate the credit card number
  • log_in_console - This parameter specifies whether or not the function should log its output to the console
  • .generate_one() Generate a single credit card.
(method) CreditCardGenerator.generate_one(type?: CreditCardTypes | undefined): ICreditCard
  • type - Type of credit card to be used
  • .generate_set Generate a set of credit cards.
(method) CreditCardGenerator.generate_set(size: number, type?: CreditCardTypes | undefined): Set<ICreditCard>
  • size - Batch size
  • type - Type of credit card to be used
  • CreditCardGenerator.check_sum() Check if a credit card is valid with respect to the Luhn algorithm.
(method) CreditCardGenerator.check_sum(number: string): boolean
  • number - Credit card number to be validated

DISCLAIMER

The credit card numbers and additional information produced by this tool are entirely arbitrary and lack any genuine monetary significance. Please refrain from attempting to employ these fictitious credit card details for any transactions, as they are non-functional. Engaging in illegal activities such as attempting to hack or scam using counterfeit credit card information is against the law and may result in penalties, including imprisonment. We unequivocally disapprove of any unlawful actions and will collaborate closely with law enforcement to scrutinize and take legal action against individuals who misuse our tools.

Keywords

credit

FAQs

Package last updated on 28 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts