Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mrxbroken011 authored Aug 4, 2024
1 parent 44a41cc commit d918906
Showing 1 changed file with 17 additions and 44 deletions.
61 changes: 17 additions & 44 deletions ANNIEMUSIC/plugins/tools/.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from ANNIEMUSIC import app

import aiohttp
import asyncio
import re
import os
from pyrogram import filters

CONCURRENCY_LIMIT = 1
Expand Down Expand Up @@ -51,49 +51,22 @@ async def format_output(approved_cards):
output += f"โŠ— ๐†๐š๐ญ๐ž๐ฌ: Masstxt SK Base 1$ CVV\nโŠ— ๐‘๐ž๐ฌ๐ฉ๐จ๐ง๐ฌ๐ž: {card['cc']}\n"
output += f"โŠ— ๐‚๐ก๐š๐ซ๐ ๐ž๐: {card['charge']}\nโŠ— ๐Œ๐ž๐ฌ๐ฌ๐š๐ ๐ž: {card['message']}\nโŠ— ๐’๐ญ๐š๐ญ๐ฎ๐ฌ: APPROVED โœ…\n\n"
return output

@app.on_message(filters.command("chkfile", prefixes=[".", "/"]))
async def check_cc_file(_, message):
try:
reply_msg = message.reply_to_message
if reply_msg and reply_msg.document:
status_message = await message.reply_text("Processing your request...")
file_id = reply_msg.document.file_id
file_path = await app.download_media(file_id)
stats = {'total': 0, 'approved': 0, 'declined': 0}

with open(file_path, 'r') as file:
lines = file.readlines()

approved_cards = []
async with aiohttp.ClientSession() as session:
tasks = []
for line in lines:
stats['total'] += 1
task = process_credit_card(line.strip(), message, stats, session)
tasks.append(task)
if len(tasks) >= 10: # Update every 10 tasks
results = await asyncio.gather(*tasks)
approved_cards.extend([result for result in results if result])
tasks = []
summary = f"โŠ— ๐“๐จ๐ญ๐š๐ฅ ๐‚๐‚ ๐ˆ๐ง๐ฉ๐ฎ๐ญ: {stats['total']} | โŠ— ๐‹๐ข๐ฏ๐ž: {stats['approved']} | โŠ— ๐ƒ๐ž๐š๐: {stats['declined']}"
await status_message.edit_text(f"Processing your request...\n{summary}")

if tasks: # Process remaining tasks
results = await asyncio.gather(*tasks)
approved_cards.extend([result for result in results if result])

final_output = await format_output(approved_cards)
summary = f"Finished processing\nโŠ— ๐“๐จ๐ญ๐š๐ฅ ๐‚๐ก๐ž๐œ๐ค๐ž๐: {stats['total']} | โŠ— ๐‹๐ข๐ฏ๐ž: {stats['approved']} | โŠ— ๐ƒ๐ž๐š๐: {stats['declined']}\nโŠ— ๐‚๐ก๐ž๐œ๐ค๐ž๐ ๐๐ฒ: {message.from_user.username}"
output_file_path = f'{message.from_user.id}_summary.txt'
with open(output_file_path, 'w') as f:
f.write(final_output)

await status_message.edit_text(summary)
await message.reply_document(document=output_file_path, caption=summary)
os.remove(file_path)
os.remove(output_file_path)
@app.on_message(filters.command("chk", prefixes=[".", "/"]))
async def check_cc_entry(_, message):
try:
cc_entry = message.text.split(" ", 1)[1]
stats = {'total': 1, 'approved': 0, 'declined': 0}
async with aiohttp.ClientSession() as session:
result = await process_credit_card(cc_entry.strip(), message, stats, session)

if result:
final_output = await format_output([result])
summary = f"โŠ— ๐‚๐ก๐ž๐œ๐ค๐ž๐ ๐๐ฒ: {message.from_user.username}\n{final_output}"
await message.reply_text(summary)
else:
await message.reply_text("Please reply to a text file containing credit card details.")
await message.reply_text("No live cards.")
except Exception as e:
await message.reply_text(f"Error reading CC file: {e}")
await message.reply_text(f"Error processing CC entry: {e}")


0 comments on commit d918906

Please sign in to comment.