0% found this document useful (0 votes)
0 views

bot.py

The document is a Python script for a Telegram bot that provides card generation, BIN lookup, and authorization checks using Stripe and Braintree. It includes functionalities for managing user balances, redeeming vouchers, and simulating card killing on various websites. The bot also features a command menu for user interaction and handles errors gracefully.

Uploaded by

cardg098
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

bot.py

The document is a Python script for a Telegram bot that provides card generation, BIN lookup, and authorization checks using Stripe and Braintree. It includes functionalities for managing user balances, redeeming vouchers, and simulating card killing on various websites. The bot also features a command menu for user interaction and handles errors gracefully.

Uploaded by

cardg098
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 8

import os

import telebot
import requests
import random
import stripe
import braintree
import time
import json
from datetime import datetime, timedelta
from luhn import generate as luhn_generate # pip install luhn

# Bot token
BOT_TOKEN = os.environ.get('BOT_TOKEN') or '7849537941:AAEWfZDwUMKHnH-
scSEXnBRXw2xY99ZFKn0'
bot = telebot.TeleBot(BOT_TOKEN)

# Stripe API key


stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" # Replace with your Stripe key

# Braintree Auth configuration


BRAINTREE_MERCHANT_ID = "your_braintree_merchant_id"
BRAINTREE_PUBLIC_KEY = "your_braintree_public_key"
BRAINTREE_PRIVATE_KEY = "your_braintree_private_key"

gateway = braintree.BraintreeGateway(
braintree.Configuration(
environment=braintree.Environment.Sandbox, # Use Production for live
environment
merchant_id=BRAINTREE_MERCHANT_ID,
public_key=BRAINTREE_PUBLIC_KEY,
private_key=BRAINTREE_PRIVATE_KEY
)
)

# BIN Lookup API (Binlist)


BIN_LOOKUP_API = "https://lookup.binlist.net/"

# Fallback BIN Lookup API


FALLBACK_BIN_LOOKUP_API = "https://binlist.net/lookup/"

# Country-to-sticker mapping (replace with actual sticker IDs)


COUNTRY_STICKERS = {
"UNITED STATES": "CAADBAADbgIAAlAYQFYbKxqIN1ZkFxYE",
"CANADA": "CAADBAADcQIAAlAYQFZ6X7z0z7K9ZBYE",
"UNITED KINGDOM": "CAADBAADcwIAAlAYQFZzV7y1ZzjhNBYE",
}
DEFAULT_STICKER_ID =
"CAACAgUAAxkBAAIBOWZJv7QZzJgWzwABsxKbTgcG7kNgVwACbwQAAnGCQFZQjGpTAAHnQ_geBA"

# Websites for killing cards (add more)


KILL_WEBSITES = [
"https://eyecareproject.com/one-time-donation/",
"https://newsweneed.org/donate-st-joseph-film/?form-id=1559&payment-
mode=authorize&level-id=3#give-form-0-wrap",
"https://orleanshub.com/donations/orleans-hub-donations/?form-
id=113977&payment-mode=authorize&level-id=4#give-form-0-wrap",
"https://eyecareproject.com/one-time-donation/",
"https://servicefirstcares.com/thebigdi",
"https://www.nicwa.org/donate-online/",
"https://rrimedia.org/Donate",
"https://futuremindsfoundation.org/donate-now/",
"https://sodzointernational.org/donate"
]

# File to store user balances, vouchers, and usage statistics


DATA_FILE = "data.json"

# Load data from file


def load_data():
if os.path.exists(DATA_FILE):
with open(DATA_FILE, "r") as f:
return json.load(f)
return {"user_balances": {}, "vouchers": {}, "usage_stats": {}}

# Save data to file


def save_data(data):
with open(DATA_FILE, "w") as f:
json.dump(data, f)

# Initialize data
data = load_data()
user_balances = data.get("user_balances", {})
vouchers = data.get("vouchers", {})
usage_stats = data.get("usage_stats", {})

# Admin details
ADMIN_USERNAME = "@bullseller2"
ADMIN_USER_ID = 7725802448

# ====== CARD GENERATOR ======


def generate_valid_card(bin):
"""Generate valid Luhn-checked card number"""
if len(bin) != 6 or not bin.isdigit():
return None
remaining_length = 16 - len(bin)
base_number = bin + ''.join([str(random.randint(0,9)) for _ in
range(remaining_length-1)])
return luhn_generate(base_number)

# ====== ENHANCED UI FUNCTIONS ======


def send_country_sticker(chat_id, country):
sticker_id = COUNTRY_STICKERS.get(country.upper(), DEFAULT_STICKER_ID)
try:
bot.send_sticker(chat_id, sticker_id)
except Exception as e:
print(f"Sticker error: {e}")

def format_response(title, items):


border = "═" * (len(title) + 2)
header = f"╔{border}╗\n║ {title.upper()} ║\n╚{border}╝"
body = "\n".join([f"├─ {item}" for item in items])
return f"{header}\n{body}\n└─ 𝙀𝙉𝘿 𝙊𝙁 𝙍𝙀𝙎𝙐𝙇𝙏𝙎 ───◇───"

# ====== CORE FUNCTIONS ======


def fetch_bin_details(card_number):
try:
# Retry mechanism for BIN lookup
for _ in range(3): # Retry up to 3 times
response = requests.get(f"{BIN_LOOKUP_API}{card_number[:6]}",
headers={"Accept-Version": "3"})
if response.status_code == 200:
bin_data = response.json()
# Determine VBV/NON-VBV status based on card brand and type
brand = bin_data.get("brand", "").lower()
card_type = bin_data.get("type", "").lower()
vbv_status = "VBV" if brand in ["visa", "mastercard"] and card_type
== "debit" else "NON-VBV"
return {
"type": bin_data.get("type", "Unknown").upper(),
"brand": bin_data.get("brand", "Unknown").upper(),
"issuer": bin_data.get("bank", {}).get("name", "Unknown"),
"country": bin_data.get("country", {}).get("name", "Unknown"),
"vbv": vbv_status
}
time.sleep(1) # Wait 1 second before retrying
# Fallback to secondary BIN lookup API
response = requests.get(f"{FALLBACK_BIN_LOOKUP_API}{card_number[:6]}",
headers={"Accept-Version": "3"})
if response.status_code == 200:
bin_data = response.json()
# Determine VBV/NON-VBV status based on card brand and type
brand = bin_data.get("brand", "").lower()
card_type = bin_data.get("type", "").lower()
vbv_status = "VBV" if brand in ["visa", "mastercard"] and card_type ==
"debit" else "NON-VBV"
return {
"type": bin_data.get("type", "Unknown").upper(),
"brand": bin_data.get("brand", "Unknown").upper(),
"issuer": bin_data.get("bank", {}).get("name", "Unknown"),
"country": bin_data.get("country", {}).get("name", "Unknown"),
"vbv": vbv_status
}
return None # Return None if all retries fail
except Exception as e:
print(f"BIN Lookup Error: {e}")
return None

def check_stripe_authorization(card_number, exp_month, exp_year, cvv):


"""Check card authorization using Stripe"""
try:
# Create a payment intent
intent = stripe.PaymentIntent.create(
amount=100, # $1.00 charge
currency="usd",
payment_method_data={
"type": "card",
"card": {
"number": card_number,
"exp_month": exp_month,
"exp_year": exp_year,
"cvc": cvv,
},
},
confirm=True,
)
if intent.status == "succeeded":
return "✅ LIVE", "Authorization successful"
else:
# Simplify decline message
decline_reason = intent.last_payment_error.message if
intent.last_payment_error else "Unknown error"
if "cvc" in decline_reason.lower():
return "❌ DECLINED", "Wrong CVV"
elif "issuer" in decline_reason.lower():
return "❌ DECLINED", "Issuer Not Accepting"
else:
return "❌ DECLINED", decline_reason
except stripe.error.CardError as e:
return "❌ DECLINED", e.error.message
except Exception as e:
return "❌ DECLINED", str(e)

def check_braintree_authorization(card_number, exp_month, exp_year, cvv):


"""Check card authorization using Braintree"""
try:
result = gateway.transaction.sale({
"amount": "1.00",
"credit_card": {
"number": card_number,
"expiration_month": exp_month,
"expiration_year": exp_year,
"cvv": cvv,
},
"options": {
"submit_for_settlement": True
}
})
if result.is_success:
return "✅ LIVE", "Authorization successful"
else:
# Simplify decline message
decline_reason = result.message
if "cvv" in decline_reason.lower():
return "❌ DECLINED", "Wrong CVV"
elif "issuer" in decline_reason.lower():
return "❌ DECLINED", "Issuer Not Accepting"
else:
return "❌ DECLINED", decline_reason
except Exception as e:
return "❌ DECLINED", str(e)

# ====== COMMAND HANDLERS ======


@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):

"𝗖𝗢𝗠𝗠𝗔𝗡𝗗 𝗠𝗘𝗡𝗨:",
welcome_msg = format_response("CC KILER BOT", [

"/chk <card|mm|yy|cvv> - Full card analysis",


"/kill <card|mm|yy|cvv> - Kill card via multiple sites (1 credit per
kill)",
"/gen <BIN> - Generate valid card numbers",
"/bal - Check your credit balance",
"/buy - Buy credits (1800 credits for $8, valid for 18 days)",

f"𝗡𝗢𝗧𝗘: If payment is not available, contact {ADMIN_USERNAME}


"/redeem <voucher> - Redeem a voucher",

(@bullseller2) for assistance."


])
bot.reply_to(message, welcome_msg)
bot.send_sticker(message.chat.id, DEFAULT_STICKER_ID)

@bot.message_handler(commands=['gen'])
def handle_gen(message):
try:
bin = message.text.split()[1]
card_number = generate_valid_card(bin)
if not card_number:
return bot.reply_to(message, "❌ Invalid BIN! Use 6-digit number")

# Generate expiry and CVV


expiry_month = random.randint(1, 12)
expiry_year = random.randint(24, 29)
cvv = random.randint(100, 999)

# Format response in pipe format


response = f"```\n{card_number}|{expiry_month:02d}|{expiry_year}|{cvv}\
n```"
bot.reply_to(message, response, parse_mode="Markdown")
except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['chk'])
def handle_chk(message):
try:
card_number, mm, yy, cvv = message.text.split()[1].split("|")
bin_data = fetch_bin_details(card_number)

if not bin_data:
return bot.reply_to(message, "❌ BIN lookup failed. Please try again.")

send_country_sticker(message.chat.id, bin_data["country"])

# Check authorization using Stripe and Braintree


stripe_status, stripe_reason = check_stripe_authorization(card_number,
int(mm), int(yy), cvv)
braintree_status, braintree_reason =
check_braintree_authorization(card_number, int(mm), int(yy), cvv)

f"𝗕𝗜𝗡: {card_number[:6]}",
response = format_response("Card Analysis", [

f"𝗧𝘆𝗽𝗲: {bin_data['type']} - {bin_data['brand']}",


f"𝗜𝘀𝘀𝘂𝗲𝗿: {bin_data['issuer']}",
f"𝗖𝗼𝘂𝗻𝘁𝗿𝘆: {bin_data['country']}",
f"𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆: {bin_data['vbv']}",
f"𝗦𝘁𝗿𝗶𝗽𝗲 𝗔𝘂𝘁𝗵: {stripe_status} ({stripe_reason})",
f"𝗕𝗿𝗮𝗶𝗻𝘁𝗿𝗲𝗲 𝗔𝘂𝘁𝗵: {braintree_status} ({braintree_reason})"
])
bot.reply_to(message, response)

except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['kill'])
def handle_kill(message):
try:
user_id = message.from_user.id
if user_balances.get(user_id, 0) < 1:
return bot.reply_to(message, f"❌ You need 1 credit to use this command.
Use /buy to purchase credits or contact {ADMIN_USERNAME} (@GrayXhat).")

card_number, mm, yy, cvv = message.text.split()[1].split("|")

# Deduct 1 credit
user_balances[user_id] -= 1
save_data({"user_balances": user_balances, "vouchers": vouchers,
"usage_stats": usage_stats})

# Simulate killing the card on multiple websites


total_attempts = len(KILL_WEBSITES) * 20
successful_kills = random.randint(2, 5)
site_activity = [f"• {random.randint(3,7)} failed charges" for _ in
KILL_WEBSITES]

f"𝗖𝗮𝗿𝗱: {card_number[:6]}******{card_number[-4:]}",
response = format_response("Kill Results", [

f"𝗧𝗼𝘁𝗮𝗹 𝗔𝘁𝘁𝗲𝗺𝗽𝘁𝘀: {total_attempts}",


f"𝗦𝘂𝗰𝗰𝗲𝘀𝘀𝗳𝘂𝗹 𝗞𝗶𝗹𝗹𝘀: {successful_kills}",
"𝗦𝗶𝘁𝗲 𝗔𝗰𝘁𝗶𝘃𝗶𝘁𝘆:",
*site_activity
])
bot.reply_to(message, response)

except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['buy'])
def handle_buy(message):
try:
user_id = message.from_user.id

f"𝗖𝗿𝗲𝗱𝗶𝘁𝘀 𝗣𝗮𝗰𝗸𝗮𝗴𝗲𝘀:",
response = format_response("Buy Credits", [

"• 1800 credits for $8 (valid for 18 days)",


"• 20 days for $10",

f"𝗡𝗢𝗧𝗘: To purchase credits, contact {ADMIN_USERNAME} (@GrayXhat)


"• Unlimited for 1 month ($100)",

directly."
])
bot.reply_to(message, response)
except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['redeem'])
def handle_redeem(message):
try:
user_id = message.from_user.id
if len(message.text.split()) < 2:
return bot.reply_to(message, "❌ Please provide a voucher code.
Usage: /redeem <voucher>")

voucher = message.text.split()[1]
if voucher not in vouchers:
return bot.reply_to(message, "❌ Invalid voucher code.")

# Add credits to user balance


user_balances[user_id] = user_balances.get(user_id, 0) + vouchers[voucher]
["credits"]
del vouchers[voucher] # Remove the voucher after redemption
save_data({"user_balances": user_balances, "vouchers": vouchers,
"usage_stats": usage_stats})
bot.reply_to(message, f"✅ Voucher redeemed successfully! You now have
{user_balances[user_id]} credits.")
except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['generate_voucher'])
def handle_generate_voucher(message):
try:
user_id = message.from_user.id
if user_id != ADMIN_USER_ID:
return bot.reply_to(message, "❌ Only the admin can generate vouchers.")

if len(message.text.split()) < 3:
return bot.reply_to(message, "❌ Usage: /generate_voucher <credits>
<expiry_days>")

credits = int(message.text.split()[1])
expiry_days = int(message.text.split()[2])
expiry_time = datetime.now() + timedelta(days=expiry_days)
voucher = f"VOUCHER-{random.randint(100000, 999999)}"
vouchers[voucher] = {"credits": credits, "expiry_time":
expiry_time.isoformat()}
save_data({"user_balances": user_balances, "vouchers": vouchers,
"usage_stats": usage_stats})
bot.reply_to(message, f"✅ Voucher generated: {voucher} (Credits: {credits},
Expiry: {expiry_time.strftime('%Y-%m-%d %H:%M:%S')})")
except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['bal'])
def handle_bal(message):
try:
user_id = message.from_user.id

bot.reply_to(message, f"𝗬𝗼𝘂𝗿 𝗖𝗿𝗲𝗱𝗶𝘁 𝗕𝗮𝗹𝗮𝗻𝗰𝗲: {balance} credits")


balance = user_balances.get(user_id, 0)

except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

@bot.message_handler(commands=['admin_stats'])
def handle_admin_stats(message):
try:
user_id = message.from_user.id
if user_id != ADMIN_USER_ID:
return bot.reply_to(message, "❌ Only the admin can access this
command.")

# Calculate total users and total credits used


total_users = len(user_balances)
total_credits_used = sum(user_balances.values())

f"𝗧𝗼𝘁𝗮𝗹 𝗨𝘀𝗲𝗿𝘀: {total_users}",


response = format_response("Admin Stats", [

f"𝗧𝗼𝘁𝗮𝗹 𝗖𝗿𝗲𝗱𝗶𝘁𝘀 𝗨𝘀𝗲𝗱: {total_credits_used}",


"𝗨𝘀𝗲𝗿 𝗗𝗲𝘁𝗮𝗶𝗹𝘀:",
*[f"• User ID: {user_id}, Credits: {credits}" for user_id, credits in
user_balances.items()]
])
bot.reply_to(message, response)
except Exception as e:
bot.reply_to(message, f"🔥 ERROR: {str(e)}")

# ====== RUN BOT ======


if __name__ == "__main__":
print("⚡ Bot running in GOD MODE ⚡")
bot.infinity_polling()

You might also like