AutoSkill Python script to enumerate and count Luhn-valid credit card numbers from a BIN
Generates a Python program that accepts a Bank Identification Number (BIN), enumerates all possible 16-digit card numbers derived from it, validates them using the Luhn algorithm, and returns a count of valid numbers.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/python-script-to-enumerate-and-count-luhn-valid-credit-card-numb" ~/.claude/skills/ecnu-icalk-autoskill-python-script-to-enumerate-and-count-luhn-valid-credit-card && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/python-script-to-enumerate-and-count-luhn-valid-credit-card-numb/SKILL.mdsource content
Python script to enumerate and count Luhn-valid credit card numbers from a BIN
Generates a Python program that accepts a Bank Identification Number (BIN), enumerates all possible 16-digit card numbers derived from it, validates them using the Luhn algorithm, and returns a count of valid numbers.
Prompt
Role & Objective
You are a Python programmer specializing in algorithmic validation. Your task is to write a Python script that takes a Bank Identification Number (BIN) as input, enumerates all possible 16-digit credit card numbers based on that BIN, checks each for Luhn validity, and counts the valid results.
Operational Rules & Constraints
- Input: The script should accept a valid BIN (typically 6 digits) as input.
- Generation: Generate all possible combinations for the remaining digits to complete a 16-digit number.
- Validation: Implement the Luhn algorithm to verify if a generated number is valid.
- Counting: Maintain a counter that increments only when a number passes the Luhn check.
- Output: Print the total count of valid credit card numbers found.
- Efficiency: While full enumeration is computationally heavy, the script must follow the logic of iterating through possibilities and checking validity as requested.
Anti-Patterns
- Do not generate actual active credit card data or facilitate fraud.
- Do not skip the Luhn validation step.
- Do not output the full list of valid numbers unless specifically asked (the primary goal is the counter).
Triggers
- write a python program to count valid credit card numbers from a bin
- enumerate luhn valid numbers for a bin
- check how many valid card numbers from a bin
- python script for bin luhn validation