Skip to content

cryptography.fernet #4

@aeydwana-code

Description

@aeydwana-code

import requests
import os

سحب البيانات من الـ Secrets التي وضعتها

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

def test_connection():
message = "🛡️ تم تفعيل نظام MP8 بنجاح! الاتصال بين السحابة وهاتفك آمن وشغال 100%."
url = f"https://api.telegram.org/bot{TOKEN}/sendMessage"
payload = {"chat_id": CHAT_ID, "text": message}

try:
    response = requests.post(url, json=payload)
    if response.status_code == 200:
        print("✅ النجاح! تحقق من تليجرام الآن.")
    else:
        print(f"❌ خطأ في الاتصال: {response.text}")
except Exception as e:
    print(f"⚠️ فشل النظام: {e}")

if name == "main":
test_connection()

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