
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@mihnea.dev/credit-card-generator
Advanced tools
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.
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.
To install the credit-card-generator package, run the following command:
npm install @mihnea.dev/credit-card-generator
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'
}
}
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 codecc_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 numberlog_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 sizetype - Type of credit card to be usedCreditCardGenerator.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 validatedThe 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.
FAQs
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.
We found that @mihnea.dev/credit-card-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.