0% found this document useful (0 votes)
32 views2 pages

Untitled

This document contains a Python script for a Telegram bot that generates credit card numbers based on a provided BIN (Bank Identification Number). It includes functions for validating BINs, fetching BIN information, generating card numbers using the Luhn algorithm, and formatting card details. The bot responds to commands to generate multiple credit cards and provides information about the BIN if available.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Untitled

This document contains a Python script for a Telegram bot that generates credit card numbers based on a provided BIN (Bank Identification Number). It includes functions for validating BINs, fetching BIN information, generating card numbers using the Luhn algorithm, and formatting card details. The bot responds to commands to generate multiple credit cards and provides information about the BIN if available.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

import random

import requests
import telebot
from telebot import types
import time
import re

BOT_TOKEN = "7906912388:AAEWe8yewHi_6KOUngsFypCPn9TmCWBq6WY"

bot = telebot.TeleBot(7906912388:AAEWe8yewHi_6KOUngsFypCPn9TmCWBq6WY)

def is_valid_bin(bin_number):
if not bin_number.isdigit():
return False
if len(bin_number) < 6:
return False
return True

def get_bin_info(bin_number):
try:
response = requests.get(f"https://lookup.binlist.net/{bin_number}")
if response.status_code == 200:
return response.json()
return None
except:
return None

def generate_card(bin_prefix, length=16):

card_number = bin_prefix
while len(card_number) < length - 1:
card_number += str(random.randint(0, 9))

digits = [int(d) for d in card_number]


odd_digits = digits[-1::-2]
even_digits = digits[-2::-2]
total = sum(odd_digits)
for d in even_digits:
total += sum(divmod(d * 2, 10))

check_digit = (10 - (total % 10)) % 10


return card_number + str(check_digit)

def generate_card_details():

month = str(random.randint(1, 12)).zfill(2)

current_year = int(time.strftime("%y"))
year = str(random.randint(current_year + 1, current_year + 5))
cvv = str(random.randint(100, 999))

return month, year, cvv

@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
welcome_text = (
"Welcome to CC Generator Bot!\n\n"
"Commands:\n"
"/gen BIN or .gen BIN - Generate 15 credit cards with the specified BIN\n"
"Example: /gen 446542\n\n"
"The bot will generate valid credit card numbers using the Luhn algorithm."
)
bot.reply_to(message, welcome_text)

@bot.message_handler(func=lambda message: message.text.startswith(('/gen',


'.gen')))
def generate_cards(message):

command_parts = message.text.split()
if len(command_parts) < 2:
bot.reply_to(message, "Please provide a BIN number. Example: /gen 446542")
return

bin_number = command_parts[1]
if not is_valid_bin(bin_number):
bot.reply_to(message, "Invalid BIN. Please provide a valid 6-digit BIN.")
return

bin_info = get_bin_info(bin_number)

bin_info_text = "⚠️ BIN not found in database."


if bin_info:
bin_info_text = "🏦 BIN Information:\n"
bin_info_text += f"• Brand: {bin_info.get('scheme', 'Unknown').title()}\n"
bin_info_text += f"• Type: {bin_info.get('type', 'Unknown').title()}\n"

if 'bank' in bin_info:
bin_info_text += f"• Bank: {bin_info['bank'].get('name', 'Unknown')}\n"

if 'country' in bin_info:
bin_info_text += f"• Country: {bin_info['country'].get('name',
'Unknown')} {bin_info['country'].get('emoji', '')}\n"

cards = []
for _ in range(15):
card_number = generate_card(bin_number)
month, year, cvv = generate_card_details()
cards.append(f"{card_number}|{month}|{year}|{cvv}")

message_text = f"""••• CC GENERATOR


•Format Used: {bin_number}|xx|xx|xxx

You might also like