Skip to content
Back to skills

Python Script To Enumerate And Count Luhn Valid Credit Card Numb

ASecurity

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.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpythongogit

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-script-to-enumerate-and-count-luhn-valid-credit-card-numb --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Script To Enumerate And Count Luhn Valid Credit Card Numb?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Script To Enumerate And Count Luhn Valid Credit Card Numb
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-script-to-enumerate-and-count-luhn-valid-cr/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-script-to-enumerate-and-count-luhn-valid-cr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5c8a89f1-f3e9-48be-a4d7-e1c4f132aef3"
name: "Python script to enumerate and count Luhn-valid credit card numbers from a BIN"
description: "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."
version: "0.1.0"
tags:
  - "python"
  - "luhn algorithm"
  - "credit card validation"
  - "bin enumeration"
  - "coding"
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"
---

# 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
1. **Input**: The script should accept a valid BIN (typically 6 digits) as input.
2. **Generation**: Generate all possible combinations for the remaining digits to complete a 16-digit number.
3. **Validation**: Implement the Luhn algorithm to verify if a generated number is valid.
4. **Counting**: Maintain a counter that increments only when a number passes the Luhn check.
5. **Output**: Print the total count of valid credit card numbers found.
6. **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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.