This project is a comprehensive tool for managing, validating, and generating credit card numbers. It leverages the Luhn algorithm for validation and provides various functionalities to work with credit card data.
- Validation: Check the correctness of credit card numbers using the Luhn algorithm.
- Generation: Generate valid credit card numbers based on a given pattern.
- Information: Identify the brand and issuer of a credit card.
- Issuance: Generate unique credit card numbers for specific brands and issuers.
- Clone the repository:
git clone https://github.com/eraga0423/ValidCreditcard.git
- Ensure you have Go (1.18 or later) installed.
Compile the project with:
go build -o creditcardvalidate: Validate credit card numbers.generate: Generate valid credit card numbers.information: Retrieve information about a credit card (brand and issuer).issue: Generate a unique credit card number for a specific brand and issuer.
-
Validate Credit Card Numbers
echo "4400431234567890" | ./creditcard validate --stdin
-
Generate Credit Card Numbers
./creditcard generate --pick 440043**** -
Get Card Information
./creditcard information --brands=brands.txt --issuers=issuers.txt 4400431234567890
-
Issue a Credit Card
./creditcard issue --brands=brands.txt --issuers=issuers.txt --brand=VISA --issuer=Kaspi Gold
main.go: Entry point for command processing.generator.go: Handles credit card number generation.input.go: Processes input and reads data from files.output.go: Formats and outputs results.luhna.go: Implements the Luhn algorithm for validation.brands.txt: Stores mappings of credit card brands and prefixes.issuers.txt: Stores mappings of issuers and prefixes.
- brands.txt: Contains brand data in the format
BRAND:PREFIX. - issuers.txt: Contains issuer data in the format
ISSUER:PREFIX.
This project is open-source and available for use and modification.