uk
Feedback

Не попадись на ботовода! Telemetrio знаходить і позначає такі канали мітками 👉 Хочеш бачити мітку, оформляй підписку

متجر IB للبلياردو 🎱

متجر IB للبلياردو 🎱

Відкрити в Telegram

اي هاك بلياردو مجاني +مدفوع +حسابات للبيع +تصعيد حسابات تلكى هنا ✅ للتواصل @IB1VP

Показати більше
1 863
Підписники
Немає даних24 години
-177 днів
-1 78130 днів
Архів дописів
# --- وظائف البوتات المصنوعة (لوحة التحكم والإدارة) --- # تخزين حالة المستخدمين في البوتات المصنوعة bot_user_states = {} # تخزين آخر وقت تفاعل للمستخدم في البوتات المصنوعة user_last_interaction_time = {} # بيانات البوتات المصنوعة (سيتم تحميلها من ملفات JSON) # {bot_username: { # "channels": [], # "notifications": "off", # "bot_status": "on", # "payment_status": "free", # "paid_users": [], # "banned_users": [], # "members": [], # "additional_check_channel": "@IRX_J", # "start_message": "**مرحبًا! بك كل الازرار مجاناً:**", # "rembo_state": None # Temporary state for admin actions # "features_channel": None # New field for features channel # "points": 0, # New field for points # "referred_users": [], # New field to track referred users # "payload_points_required": 30 # New field for payload points # "custom_buttons": [] # New field for custom buttons # "custom_buttons_enabled_by_admin": False # New field to enable custom buttons # "bot_type": "hack_bot" # New field to distinguish bot types # "main_channel_link": None # New field for encryption bot's main channel # "parent_factory_admin_id": None # New field to store the admin ID of the parent factory # "factory_sub_admins": [] # New field for sub-factory admins # }} made_bot_data = {} DEFAULT_BOT_SETTINGS = { "channels": [FACTORY_MAIN_SUBSCRIPTION_CHANNEL] if FACTORY_MAIN_SUBSCRIPTION_ENABLED else [], # تحديث بناءً على حالة الاشتراك الإجباري للمصنع "notifications": "off", "bot_status": "on", "payment_status": "free", "banned_users": [], "members": [], "additional_check_channel": "@IRX_J", # هذا قد يكون قناة المصنع الأساسية أو قناة أخرى "start_message": "**مرحبًا! بك كل الازرار مجاناً:**", "rembo_state": None, "features_channel": None, # Default for new features channel "points": {}, # Changed to dict to store points per user {user_id: points} "referred_users": [], # Default referred users "payload_points_required": 1, # Default payload points required (changed to 1 as per request) "custom_buttons": [], # Default for custom buttons "custom_buttons_enabled_by_admin": False, # Default to False "bot_type": "hack_bot", # Default bot type "main_channel_link": None, # Default for encryption bot's main channel "paid_users": [], # Ensure paid_users is always initialized "parent_factory_admin_id": None, # Default for parent factory admin ID "factory_sub_admins": [] # Default for sub-factory admins } def get_made_bot_data_path(bot_username): return os.path.join(DATABASE_DIR, f"{bot_username}_settings.json") def load_made_bot_settings(bot_username): """تحميل إعدادات البوت المصنوع من ملف JSON.""" file_path = get_made_bot_data_path(bot_username) if os.path.exists(file_path): with open(file_path, 'r') as f: settings = json.load(f) # Merge with default settings to ensure all keys exist made_bot_data[bot_username] = {**DEFAULT_BOT_SETTINGS, **settings} # Ensure 'points' is a dictionary if not isinstance(made_bot_data[bot_username].get("points"), dict): made_bot_data[bot_username]["points"] = {} # Ensure 'referred_users' is a list if not isinstance(made_bot_data[bot_username].get("referred_users"), list): made_bot_data[bot_username]["referred_users"] = [] # Ensure 'paid_users' is a list if not isinstance(made_bot_data[bot_username].get("paid_users"), list): made_bot_data[bot_username]["paid_users"] = [] # Ensure 'factory_sub_admins' is a list if not isinstance(made_bot_data[bot_username].get("factory_sub_admins"), list): made_bot_data[bot_username]["factory_sub_admins"] = [] else: made_bot_data[bot_username] = DEFAULT_BOT_SETTINGS.copy() save_made_bot_settings(bot_username) # Create the file with default settings
20 серп, 03:43
20 серп, ~03:45

parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, update.message.chat.id, "هذا المستخدم هو أدمن بالفعل. ℹ️") user_state[user_id] = None except ValueError: send_message(context.bot, update.message.chat.id, "❌ معرف المستخدم غير صالح. الرجاء إرسال رقم صحيح.") return if state == "await_remove_factory_admin_id": try: admin_to_remove_id = int(text) if admin_to_remove_id == MAIN_ADMIN_ID: send_message(context.bot, update.message.chat.id, "❌ لا يمكن حذف المالك الرئيسي للمصنع.") elif admin_to_remove_id in FACTORY_ADMINS: FACTORY_ADMINS.remove(admin_to_remove_id) send_message(context.bot, update.message.chat.id, f"✅ تم حذف المستخدم {admin_to_remove_id} كأدمن من المصنع. 🗑️") send_message(context.bot, admin_to_remove_id, "لقد تم إزالتك من قائمة أدمنز المصنع. 😔") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بحذف الأدمن: [{admin_to_remove_id}](tg://user?id={admin_to_remove_id}).", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, update.message.chat.id, "هذا المستخدم ليس أدمنًا في المصنع. ℹ️") user_state[user_id] = None except ValueError: send_message(context.bot, update.message.chat.id, "❌ معرف المستخدم غير صالح. الرجاء إرسال رقم صحيح.") return if state == "await_broadcast_free_bots_message": broadcast_message = text sent_count = 0 failed_count = 0 for admin_id_key, bots_list in created_bots.items(): for bot_info in bots_list: bot_username = bot_info["username"] load_made_bot_settings(bot_username) bot_settings = made_bot_data[bot_username] if bot_settings["payment_status"] == "free": # Get the bot's actual updater instance updater_instance = running_made_bot_updaters.get(bot_username) if updater_instance: bot_instance = updater_instance.bot members = bot_settings["members"] for member_id in members: try: send_message(bot_instance, member_id, broadcast_message) sent_count += 1 except Exception as e: logging.warning(f"Could not send broadcast to {member_id} in bot @{bot_username}: {e}") failed_count += 1 else: logging.warning(f"Bot @{bot_username} is not running, skipping broadcast.") send_message(context.bot, update.message.chat.id, f"✅ تم إرسال الإذاعة إلى البوتات المجانية.\n" f"عدد الرسائل المرسلة بنجاح: {sent_count} 🚀\n" f"عدد الرسائل الفاشلة: {failed_count} 💔") user_state[user_id] = None if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإذاعة رسالة للبوتات المجانية.\n" f"الرسائل المرسلة بنجاح: {sent_count}, الفاشلة: {failed_count}.", parse_mode=ParseMode.MARKDOWN) return
20 серп, 03:43
20 серп, ~03:45

send_message(context.bot, update.message.chat.id, f"✅ تم تشغيل البوت @{bot_username} بنجاح! 🎉") user_state[user_id] = None # Send notification to MAIN_ADMIN_ID if user_id != MAIN_ADMIN_ID: # Avoid notifying admin about their own bot creation creator_name = update.effective_user.first_name creator_username = update.effective_user.username send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار: تم إنشاء بوت جديد!* 🔔\n\n" f"👤 *بواسطة:* [{creator_name}](tg://user?id={user_id}) (@{creator_username})\n" f"🤖 *اسم البوت:* @{bot_username} (نوع: {bot_type})\n" f"🔗 *رابط البوت:* t.me/{bot_username}", parse_mode=ParseMode.MARKDOWN) updater = run_made_bot(bot_token, user_id, bot_username, bot_type) if updater: # Only add to running_made_bot_updaters if updater started successfully running_made_bot_updaters[bot_username] = updater except Exception as e: logging.error(f"Error setting up bot with token {bot_token}: {e}") send_message(context.bot, update.message.chat.id, "❌ حدث خطأ أثناء إعداد البوت. يرجى المحاولة مرة أخرى.") user_state[user_id] = None return if state and state.startswith("confirm_delete_"): username_to_delete = state.split("_", 2)[2] if text == f"delete {username_to_delete}": # Find the bot_type before deleting bot_type_to_delete = None for bots_list in created_bots.values(): for bot_data in bots_list: if bot_data["username"] == username_to_delete: bot_type_to_delete = bot_data["bot_type"] break if bot_type_to_delete: break bots = created_bots.get(user_id, []) created_bots[user_id] = [b for b in bots if b["username"] != username_to_delete] bot_data_file = os.path.join(DATABASE_DIR, f"{username_to_delete}.json") if os.path.exists(bot_data_file): os.remove(bot_data_file) bot_made_data_dir = os.path.join(DATABASE_DIR, f"{username_to_delete}_settings.json") if os.path.exists(bot_made_data_dir): os.remove(bot_made_data_dir) if username_to_delete in running_made_bot_updaters: running_made_bot_updaters[username_to_delete].stop() del running_made_bot_updaters[username_to_delete] user_state[user_id] = None send_message(context.bot, update.message.chat.id, f"✅ تم حذف البوت @{username_to_delete} من المصنع بنجاح! 🗑️") else: send_message(context.bot, update.message.chat.id, "❌ أمر الحذف غير صحيح. يرجى المحاولة مرة أخرى.") user_state[user_id] = None return if user_id in FACTORY_ADMINS: if state == "await_new_factory_admin_id": try: new_admin_id = int(text) if new_admin_id not in FACTORY_ADMINS: FACTORY_ADMINS.append(new_admin_id) send_message(context.bot, update.message.chat.id, f"✅ تم إضافة المستخدم {new_admin_id} كأدمن جديد للمصنع. 👨‍💻") send_message(context.bot, new_admin_id, "تهانينا! 🎉 لقد تم إضافتك كأدمن في بوت المصنع. أرسل /start للوصول إلى لوحة التحكم. 🚀") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإضافة أدمن جديد: [{new_admin_id}](tg://user?id={new_admin_id}).",
20 серп, 03:43
20 серп, ~03:45

def add_factory_main_subscription(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري تفعيل الاشتراك الإجباري لقناة المصنع...", show_alert=True) global FACTORY_MAIN_SUBSCRIPTION_ENABLED FACTORY_MAIN_SUBSCRIPTION_ENABLED = True # تحديث إعدادات جميع البوتات المصنوعة for bot_username in made_bot_data: load_made_bot_settings(bot_username) if FACTORY_MAIN_SUBSCRIPTION_CHANNEL not in made_bot_data[bot_username]["channels"]: made_bot_data[bot_username]["channels"].append(FACTORY_MAIN_SUBSCRIPTION_CHANNEL) save_made_bot_settings(bot_username) send_message(context.bot, query.message.chat.id, "✅ تم تفعيل الاشتراك الإجباري لقناة المصنع لجميع البوتات (الحالية والمستقبلية).") edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) if query.from_user.id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\nقام الأدمن [{query.from_user.first_name}](tg://user?id={query.from_user.id}) بتفعيل الاشتراك الإجباري لقناة المصنع.", parse_mode=ParseMode.MARKDOWN) def remove_factory_main_subscription(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إزالة الاشتراك الإجباري لقناة المصنع...", show_alert=True) global FACTORY_MAIN_SUBSCRIPTION_ENABLED FACTORY_MAIN_SUBSCRIPTION_ENABLED = False # تحديث إعدادات جميع البوتات المصنوعة for bot_username in made_bot_data: load_made_bot_settings(bot_username) if FACTORY_MAIN_SUBSCRIPTION_CHANNEL in made_bot_data[bot_username]["channels"]: made_bot_data[bot_username]["channels"].remove(FACTORY_MAIN_SUBSCRIPTION_CHANNEL) save_made_bot_settings(bot_username) send_message(context.bot, query.message.chat.id, "✅ تم إزالة الاشتراك الإجباري لقناة المصنع من جميع البوتات (الحالية والمستقبلية).") edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) if query.from_user.id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\nقام الأدمن [{query.from_user.first_name}](tg://user?id={query.from_user.id}) بإزالة الاشتراك الإجباري لقناة المصنع.", parse_mode=ParseMode.MARKDOWN) def handle_message_main_bot(update: Update, context: CallbackContext): user_id = update.effective_user.id state = user_state.get(user_id) text = update.message.text.strip() if isinstance(state, dict) and state.get("action") == "await_token": send_message(context.bot, update.message.chat.id, "⏳ جاري إعداد البوت، يرجى الانتظار... 🚀") bot_token = text bot_type = state["bot_type"] try: bot_info_resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getMe").json() if not bot_info_resp.get("ok"): send_message(context.bot, update.message.chat.id, "❌ التوكن غير صالح. يرجى التأكد من صحة التوكن وإعادة المحاولة.") user_state[user_id] = None return bot_username = bot_info_resp["result"]["username"] bots = created_bots.get(user_id, []) bots.append({"token": bot_token, "admin_id": user_id, "username": bot_username, "bot_type": bot_type}) created_bots[user_id] = bots bot_data_file = os.path.join(DATABASE_DIR, f"{bot_username}.json") with open(bot_data_file, 'w') as f: json.dump({"token": bot_token, "admin_id": user_id, "bot_type": bot_type}, f)
20 серп, 03:43
20 серп, ~03:45

def factory_stats_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id total_bots = sum(len(bots) for bots in created_bots.values()) total_users_in_made_bots = 0 for bot_username in made_bot_data: total_users_in_made_bots += len(made_bot_data[bot_username].get("members", [])) stats_message = ( f"📊 *إحصائيات المصنع:*\n" f"🤖 عدد البوتات المصنوعة: {total_bots}\n" f"👥 إجمالي عدد المستخدمين في البوتات المصنوعة: {total_users_in_made_bots}\n" f"👨‍💻 عدد الأدمنز في المصنع: {len(FACTORY_ADMINS)}" ) send_message(context.bot, query.message.chat.id, stats_message, parse_mode=ParseMode.MARKDOWN) def stop_all_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إيقاف جميع البوتات... ⏳", show_alert=True) user_id = query.from_user.id action_taken = False for bot_username, updater_instance in list(running_made_bot_updaters.items()): try: updater_instance.stop() del running_made_bot_updaters[bot_username] logging.info(f"Stopped made bot @{bot_username}") action_taken = True except Exception as e: logging.error(f"Error stopping made bot @{bot_username}: {e}") if action_taken: send_message(context.bot, query.message.chat.id, "✅ تم إيقاف جميع البوتات المصنوعة بنجاح.") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإيقاف جميع البوتات المصنوعة.", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, query.message.chat.id, "⚠️ لا توجد بوتات قيد التشغيل لإيقافها أو حدث خطأ.") def start_all_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إعادة تشغيل جميع البوتات... 🔄", show_alert=True) user_id = query.from_user.id action_taken = False # Restart made bots for admin_id_key, bots_list in created_bots.items(): for bot_info in bots_list: bot_username = bot_info["username"] if bot_username not in running_made_bot_updaters: try: updater = run_made_bot(bot_info["token"], bot_info["admin_id"], bot_username, bot_info["bot_type"]) if updater: running_made_bot_updaters[bot_username] = updater logging.info(f"Restarted made bot @{bot_username}") action_taken = True except Exception as e: logging.error(f"Error restarting made bot @{bot_username}: {e}") if action_taken: send_message(context.bot, query.message.chat.id, "✅ تم إعادة تشغيل جميع البوتات المصنوعة بنجاح.") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإعادة تشغيل جميع البوتات المصنوعة.", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, query.message.chat.id, "⚠️ لا توجد بوتات لإعادة تشغيلها أو حدث خطأ.") def broadcast_free_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id send_message(context.bot, query.message.chat.id, "الرجاء إرسال الرسالة التي تريد إذاعتها للبوتات المجانية: 📢") user_state[user_id] = "await_broadcast_free_bots_message"
20 серп, 03:43
20 серп, ~03:45

# التحقق من الاشتراك في قناة المصنع الأساسية قبل السماح بإنشاء بوت مصنع # هذا التحقق يتم بواسطة توكن البوت الرئيسي if FACTORY_MAIN_SUBSCRIPTION_ENABLED and not check_subscription(user_id, [FACTORY_MAIN_SUBSCRIPTION_CHANNEL], MAIN_BOT_TOKEN): msg = f"❌ يجب عليك الاشتراك في القناة الأساسية {FACTORY_MAIN_SUBSCRIPTION_CHANNEL} لإنشاء مصنع بوتات.\n" keyboard = [[InlineKeyboardButton("اشترك في القناة", url=f"https://t.me/{FACTORY_MAIN_SUBSCRIPTION_CHANNEL.lstrip('@')}")]] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, msg, reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = None return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'مصنع بوتات'.") user_state[user_id] = {"action": "await_token", "bot_type": "factory_bot"} def manage_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id bots = created_bots.get(user_id, []) if not bots: edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "⚠️ ليس لديك أي بوتات حتى الآن. أنشئ واحدًا لتبدأ! 🚀") return keyboard = [] for bot_data in bots: keyboard.append([InlineKeyboardButton(f"🤖 {bot_data['username']} ({bot_data['bot_type']})", callback_data=f"info_{bot_data['username']}")]) edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "اختر البوت الذي تريد إدارته من قائمتك: 👇", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = "manage_bots" def bot_info_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id username = query.data.split("_", 1)[1] keyboard = [[InlineKeyboardButton("🗑 حذف البوت", callback_data=f"delete_{username}")]] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, f"معلومات البوت @{username} ℹ️", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = f"confirm_delete_{username}" def delete_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id username = query.data.split("_", 1)[1] user_state[user_id] = f"confirm_delete_{username}" edit_message_text(context.bot, query.message.chat.id, query.message.message_id, f"⚠️ هل أنت متأكد من حذف البوت @{username}؟\nإذا كنت متأكد أرسل:\ndelete {username}", parse_mode=ParseMode.MARKDOWN) def add_factory_admin_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id if user_id != MAIN_ADMIN_ID: # Only main admin can add other factory admins query.answer("🚫 ليس لديك صلاحية لإضافة أدمنز للمصنع.", show_alert=True) return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "الرجاء إرسال معرف (ID) المستخدم الذي تريد إضافته كأدمن للمصنع: 👨‍💻") user_state[user_id] = "await_new_factory_admin_id" def remove_factory_admin_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id if user_id != MAIN_ADMIN_ID: # Only main admin can remove other factory admins query.answer("🚫 ليس لديك صلاحية لحذف أدمنز من المصنع.", show_alert=True) return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "الرجاء إرسال معرف (ID) المستخدم الذي تريد حذفه كأدمن من المصنع: 🗑️") user_state[user_id] = "await_remove_factory_admin_id"
20 серп, 03:43
20 серп, ~03:45

def get_main_bot_admin_keyboard(): """لوحة مفاتيح الأدمن الرئيسي.""" global FACTORY_MAIN_SUBSCRIPTION_ENABLED sub_status_text = "✅ إزالة الاشتراك الإجباري" if FACTORY_MAIN_SUBSCRIPTION_ENABLED else "➕ إضافة الاشتراك الإجباري" sub_status_callback = "remove_factory_main_subscription" if FACTORY_MAIN_SUBSCRIPTION_ENABLED else "add_factory_main_subscription" return InlineKeyboardMarkup([ [InlineKeyboardButton("✨ أنشئ بوت جديد 🤖", callback_data="create_bot"), InlineKeyboardButton("🛠 بوتاتك", callback_data="manage_bots")], [InlineKeyboardButton("➕ إضافة أدمن 👨‍💻", callback_data="add_factory_admin"), InlineKeyboardButton("🗑️ حذف أدمن", callback_data="remove_factory_admin")], [InlineKeyboardButton("📊 إحصائيات المصنع", callback_data="factory_stats")], [InlineKeyboardButton("🛑 إيقاف جميع البوتات", callback_data="stop_all_bots"), InlineKeyboardButton("🟢 فتح جميع البوتات", callback_data="start_all_bots")], [InlineKeyboardButton("📢 إذاعة للبوتات المجانية", callback_data="broadcast_free_bots")], [InlineKeyboardButton(sub_status_text, callback_data=sub_status_callback)] # زر إضافة/إزالة الاشتراك الإجباري ]) def start_main_bot(update: Update, context: CallbackContext): user_id = update.effective_user.id # Check if user is a factory admin if user_id in FACTORY_ADMINS: send_message(context.bot, user_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) user_state[user_id] = None return # Normal user flow if check_subscription(user_id, MAIN_CHANNELS, MAIN_BOT_TOKEN): send_message(context.bot, user_id, "👋 حياك الله في بوت صانع البوتات ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_user_keyboard()) user_state[user_id] = None else: msg = "❌ يجب عليك الاشتراك في القنوات التالية لاستخدام البوت:\n\n" for channel in MAIN_CHANNELS: msg += f"🔗 {channel}\n" msg += "\n➖➖➖➖➖➖➖➖➖➖\nبعد الاشتراك، أرسل /start مرة أخرى." update.message.reply_text(msg) def create_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() keyboard = [ [InlineKeyboardButton("💻 بوت اختراق", callback_data="create_hack_bot")], [InlineKeyboardButton("🔐 بوت تشفير py", callback_data="create_encryption_bot")], [InlineKeyboardButton("🎩 مصنع بوتات", callback_data="create_factory_bot")] # New bot type ] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "اختر نوع البوت الذي تريد إنشاءه: 👇", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[query.from_user.id] = "await_bot_type_selection" def create_hack_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'بوت اختراق'.") user_state[query.from_user.id] = {"action": "await_token", "bot_type": "hack_bot"} def create_encryption_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'بوت تشفير py'.") user_state[query.from_user.id] = {"action": "await_token", "bot_type": "encryption_bot"} def create_factory_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id
20 серп, 03:43
20 серп, ~03:45

def get_channel_name(channel_id, bot_token): """يجلب اسم القناة من معرفها.""" try: resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getChat?chat_id={channel_id}").json() if resp.get("ok"): return resp["result"]["title"] except Exception as e: logging.error(f"Error getting channel name for {channel_id}: {e}") return channel_id def send_message(bot_instance, chat_id, text, reply_markup=None, parse_mode=None): """دالة مساعدة لإرسال الرسائل.""" try: bot_instance.send_message(chat_id=chat_id, text=text, reply_markup=reply_markup, parse_mode=parse_mode) except Exception as e: logging.error(f"Error sending message to {chat_id}: {e}") def edit_message_text(bot_instance, chat_id, message_id, text, reply_markup=None, parse_mode=None): """دالة مساعدة لتعديل الرسائل.""" try: bot_instance.edit_message_text(chat_id=chat_id, message_id=message_id, text=text, reply_markup=reply_markup, parse_mode=parse_mode) except Exception as e: logging.error(f"Error editing message {message_id} in {chat_id}: {e}") def clean_api_response(text): """يزيل النصوص المتعلقة بالاشتراك في القنوات من استجابات الـ API.""" if not isinstance(text, str): return text phrases_to_remove = [ "اشترك في قناتنا", "اشترك بقناتنا", "@DarkAIx", "@IRX_J", "@I_R_XJ", "Dont forget to support the channel" ] cleaned_text = text for phrase in phrases_to_remove: cleaned_text = cleaned_text.replace(phrase, "").strip() cleaned_text = ' '.join(cleaned_text.split()) return cleaned_text # --- وظائف التشفير والتعديل على الـ APK (تم استبدال دالة التشفير) --- def encrypt_token(token: str) -> str: """ يشفر التوكن بنفس طريقة التشفير المستخدمة في ملف index.py. """ table = str.maketrans( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA9876543210" ) return token.translate(table) def modify_apk_with_token(original_apk_path: str, encrypted_token: str, output_apk_path: str) -> bool: """ يعدل ملف الـ APK بوضع التوكن المشفر الجديد بداخله. هذه الوظيفة تفترض أن التوكن يمكن حقنه في ملف نصي داخل مجلد assets. هذا قد لا يعمل إذا كان التطبيق لا يقرأ التوكن من هذا المسار أو بهذه الطريقة. الحل الأمثل هو استخدام apktool لفك تجميع الـ APK وتعديل الكود مباشرة. """ try: # إنشاء نسخة مؤقتة من الـ APK الأصلي temp_apk_path = f"{output_apk_path}.tmp" shutil.copyfile(original_apk_path, temp_apk_path) # فتح ملف الـ APK كملف ZIP with zipfile.ZipFile(temp_apk_path, 'a', zipfile.ZIP_DEFLATED) as zf: # حذف الملف القديم إذا كان موجودًا try: zf.getinfo(APK_TOKEN_FILE_INSIDE) zf.writestr(APK_TOKEN_FILE_INSIDE, encrypted_token.encode()) # تحديث الملف except KeyError: # إذا لم يكن الملف موجودًا، قم بإضافته zf.writestr(APK_TOKEN_FILE_INSIDE, encrypted_token.encode()) # نقل الملف المؤقت إلى المسار النهائي shutil.move(temp_apk_path, output_apk_path) logging.info(f"Successfully modified APK: {output_apk_path} with new token.") return True except Exception as e: logging.error(f"Error modifying APK file {original_apk_path}: {e}") return False # --- وظائف البوت الرئيسي (صانع البوتات) --- def get_main_bot_user_keyboard(): """لوحة مفاتيح المستخدم العادي للبوت الرئيسي (واجهة صنع بوت جديد).""" return InlineKeyboardMarkup([ [InlineKeyboardButton("✨ أنشئ بوت جديد 🤖", callback_data="create_bot")], [InlineKeyboardButton("🛠 بوتاتك", callback_data="manage_bots")] ])
20 серп, 03:43
20 серп, ~03:45

#!/usr/bin/env python3.9 import logging import os import json from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup, ParseMode from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, MessageHandler, Filters, CallbackContext import requests import shutil import random import string import time import urllib.parse import base64 import threading import zipfile import hashlib # For simple hashing as a "cipher" example import codecs # For rot13 # تسجيل الدخول logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) # توكن البوت الرئيسي (صانع البوتات) MAIN_BOT_TOKEN = "7974888432:AAFpM6VOyRYpvjYx9z0mlDBeLH0Bmkri5Cg" # القنوات الأساسية للاشتراك الإجباري في البوت الرئيسي MAIN_CHANNELS = ["@IRX_J", "@I_R_XJ"] # قناة المصنع الأساسية التي يمكن إزالتها/إضافتها كاشتراك إجباري FACTORY_MAIN_SUBSCRIPTION_CHANNEL = "@IRX_J" # حالة الاشتراك الإجباري لقناة المصنع الأساسية (True: مفعل، False: معطل) FACTORY_MAIN_SUBSCRIPTION_ENABLED = True # سيتم تحديثها ديناميكيًا # مسار مجلد قاعدة البيانات DATABASE_DIR = "database" if not os.path.exists(DATABASE_DIR): os.makedirs(DATABASE_DIR) # لتخزين حالة كل مستخدم في البوت الرئيسي user_state = {} # لتخزين البوتات التي صنعها المستخدم في البوت الرئيسي created_bots = {} # {user_id: [{token: "...", admin_id: "...", username: "...", bot_type: "..."}, ...]} # قائمة بالبوتات المصنوعة التي تعمل حاليًا (لإيقافها وتشغيلها) running_made_bot_updaters = {} # {bot_username: updater_instance} # معرف الأدمن الرئيسي MAIN_ADMIN_ID = 7598229780 # تم إضافة معرف الأدمن الرئيسي هنا # قائمة بمعرفات الأدمنز الإضافيين في المصنع FACTORY_ADMINS = [MAIN_ADMIN_ID] # يمكن إضافة معرفات أخرى هنا # --- APIs الجديدة --- API_TEXT_TO_SPEECH = "https://sii3.moayman.top/api/voice.php" API_AI_PRIMARY = "https://sii3.moayman.top/api/gemini-pro.php" API_IMAGE_GENERATION_NEW = "http://sii3.moayman.top/api/img.php" API_AI_FALLBACK_1 = "https://sii3.moayman.top/api/openai.php" API_AI_FALLBACK_2 = "http://67f3d369ebd19.xvest5.ru/api/WormGPT.php" API_AI_FALLBACK_3 = "http://sii3.moayman.top/DARK/api/wormgpt.php" API_SHEREEN_AI = "http://sii3.moayman.top/api/s.php" API_DEEPSEEK_AI = "https://sii3.moayman.top/api/deepseek.php" API_CHATGPT_3_5 = "http://sii3.moayman.top/api/chat/gpt-3.5.php" API_AZKAR = "http://sii3.moayman.top/api/azkar.php" # --- VirusTotal API Key --- VIRUSTOTAL_API_KEY = 'd851c6064844b30083483cbfa5a2001d9ac0b811a666f0110c0efb4eaab747e' # --- توكن البوت الخاص بك الذي سيتم تشفيره داخل الـ APK --- YOUR_BOT_TOKEN_FOR_APK = "7629301509:AAFc7ITJcTgNcqYyfuUh96glpUYZr7VAxJw" # تم تغيير التوكن هنا YOUR_ADMIN_ID_FOR_APK = 7946719176 # الأيدي الخاص بك الذي سيستقبل رسائل التطبيق # --- مسار ملف الـ APK الأصلي --- ORIGINAL_APK_PATH = "/home/container/app_modified_7946719176.apk" # --- اسم الملف داخل الـ APK الذي يحتوي على التوكن (افتراضي) --- APK_TOKEN_FILE_INSIDE = "assets/bot_token.txt" # افتراض: ملف داخل مجلد assets # --- وظائف مساعدة عامة --- def check_subscription(user_id, channels, bot_token): """يتحقق من اشتراك المستخدم في القنوات المحددة.""" for channel in channels: try: # استخدام توكن البوت الرئيسي للتحقق من قناة المصنع الأساسية # هذا يضمن أن التحقق يتم دائمًا بواسطة البوت الذي يمتلك صلاحية الأدمن في القناة if channel == FACTORY_MAIN_SUBSCRIPTION_CHANNEL: resp = requests.get(f"https://api.telegram.org/bot{MAIN_BOT_TOKEN}/getChatMember?chat_id={channel}&user_id={user_id}").json() else: resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getChatMember?chat_id={channel}&user_id={user_id}").json() if not resp.get("ok") or resp["result"]["status"] not in ["member", "administrator", "creator"]: return False except Exception as e: logging.error(f"Error checking subscription for {user_id} in {channel}: {e}") return False return True
20 серп, 03:43
20 серп, ~03:45

تفاعل انزلكم ملف بوت مصنع بوتات اختراق زي بتاع السفاح طرششش
20 серп, 03:33
20 серп, ~21:14

هبدل ب اي ملف تطلبو سريع بس + ملفات بوتات تلي كلها معي
19 серп, 18:07
20 серп, ~21:14

اي شخص معاه رابط فرمطه او تطبيق فرمطه يجي شاتي ب مقابله سريع @G_7DB
19 серп, 17:55
20 серп, ~21:14

دنا اشتري درج خطوط بقا احسن 😂
19 серп, 17:53
20 серп, ~21:14

واحد جاي يقولي هفكلك ب100$؟ 😂
19 серп, 17:52
20 серп, ~21:14

حد هنا يعرف يفك انتهاك مشدد؟
19 серп, 17:23
20 серп, ~21:14

Repost from الآسياد
مسابقه قويه جدا لا يدخلها غير الأقوياء 🙄💪 الجوايز!👇 🧐المركز الأول " يكسب "
اك تلي مغربي + اك تلي هندي ^^مش محظورين حاجه🤨^^
======================================
المركز الثاني" اك تلي  امريكي مش محظور حاجه🥱"
♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡
المركز التالت" رقم واتس انت وحظك 💀"
شرووووط المركز الأول يعدي ال 50صوت المركز التاني يعدي ال 25 صوت المركز التالت يعدي ال 15 صوت ~ مممنووووعااأااآت$ ×ممنوع تعدد ! ×ممنوع اكاتك او فيك ! ×ممنوع رشق ! اي حاجه من دول =طردد ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ نجوم ع اسمك  =1صوت نجوم  ف خاص =2صوت $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ المقاعد المسموح بها : 777
لتسجيل اسمك في المسابقة اضغط على زر المشاركة في المسابقة بأسفل المنشور
سيتم انتهاء المسابقة بعد 24.0 ساعة و 0.0 دقيقة و 0.0 ثانية
19 серп, 17:19
20 серп, ~21:14

⭐⭐
19 серп, 17:09
20 серп, ~21:14

عايزين تطبيقات ايه اعملهالكم و انزلها هنا مجانا ؟ هاتوا افكااار نااار يلا مستني افكاركم هنا يوزري : @V2P_1 🫆
19 серп, 17:09
20 серп, ~21:14

مساء الخير يا شباب ❤️‍🔥
اثبتوا وجودكم بتفاعل علشان هنزل مسابقات و حاجات كتير دلوقتي يلا 🇦🇷
19 серп, 17:07
20 серп, ~21:14

انـتـظـرو اقـو طـريـقـه حـظـر ارقــام واتـــســاب طـريـقـه جـديـد2026🍷⭐ ـــــــــــــــــــــــــــــ⭕️⭕️⭕️⭕️ـــــــــــــــــــــــــــــ سـيـب تـفـاعـ؏ـل ونـت مـعـ؏ـدي😂
19 серп, 16:40
20 серп, ~21:14