MUSTAFA733737

kaka

Dec 9th, 2023
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.28 KB | None | 0 0
  1.  
  2. import os
  3. try:
  4.     import requests
  5. except:
  6.     os.system("pip install requests")
  7. try:
  8.     import base64
  9. except:
  10.     os.system("pip install base64")
  11. try:
  12.     import marshal
  13. except:
  14.     os.system("pip install marshal")
  15. try:
  16.     import zlib
  17. except:
  18.     os.system("pip install zlib")
  19. try:
  20.     import telebot
  21.     from telebot import *
  22.     from telebot import util
  23.     from telebot import types
  24. except:
  25.     os.system("pip install telebot")
  26. print(' ادخل توكن بوتك')
  27. tokin = '6712132097:AAEGrEzrA1RznWiAaqd3Kd15yc0f_-eG7Rs'
  28. bot = telebot.TeleBot(tokin)
  29.  
  30. def encode_files(name, file_name):
  31.     if name == "marshal":
  32.         en = marshal.dumps(compile(open(file_name, "r").read(), '<mostafa>', 'exec'))
  33.         return (f"#https://t.me/x778l
  34. import marshal
  35. exec(marshal.loads({en}))")
  36.     elif name == "base64":
  37.         en = base64.b64encode(open(file_name, "r").read().encode('UTF-8')).decode('ascii')
  38.         return (f"#https://t.me/x778l
  39. #x778l
  40. import base64
  41. exec(base64.b64decode('{en}'))")
  42.     elif name == "lambda":
  43.         en = repr(zlib.compress(open(file_name, "r").read().encode('utf-8')))
  44.         return (f"#https://t.me/x778l
  45. #@x778l
  46. exec((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 122, 108, 105, 98, 34, 41, 46, 100, 101, 99, 111, 109, 112, 114, 101, 115, 115],chr))(_____),'<https://t.me/N_9_N_6','exec'))({en},compile))")
  47.     elif name == "zlib":
  48.         en = str(base64.b64encode(zlib.compress(marshal.dumps(compile(open(file_name, "r").read(), "ru", 'exec')))))
  49.         return (f"#https://t.me/x778l
  50. #import zlib
  51. exec(marshal.loads(zlib.decompress(base64.b64decode('{en}'))))")
  52.  
  53. @bot.message_handler(commands=['start'])
  54. def welcome(message):
  55.     channel = types.InlineKeyboardButton(text=" قناتي ", url=f"https://t.me/x778l")
  56.     start = types.InlineKeyboardButton(text=" اضغط هنا لتشفير", callback_data="Encryption")
  57.     programmer = types.InlineKeyboardButton(text=" المطور ", url=f"https://t.me/O_C_O_Q153BOT")
  58.     Keyboards = types.InlineKeyboardMarkup()
  59.     Keyboards.row_width = 1
  60.     Keyboards.add(start, programmer, channel)
  61.     bot.send_message(message.chat.id, text=f"🌹| مرحبا {message.from_user.first_name}
  62. ✅ بوت تشفير ادوات بايثون
  63. 🔰| المطور DEKO", reply_to_message_id=(message.message_id), reply_markup=Keyboards)
  64.  
  65. def Encryption(message):
  66.     Button1 = types.InlineKeyboardButton(text="base64 🔒", callback_data='base64')
  67.     Button2 = types.InlineKeyboardButton(text="lambda 🔒", callback_data='lambda')
  68.     Button3 = types.InlineKeyboardButton(text="marshal 🔒", callback_data='marshal')
  69.     Button4 = types.InlineKeyboardButton(text="zlib 🔒", callback_data='zlib')
  70.     Keyy = types.InlineKeyboardMarkup()
  71.     Keyy.row_width = 1
  72.     Keyy.add(Button1, Button2, Button3, Button4)
  73.     bot.send_message(message.chat.id, text=f"🔰| اختار نوع التشفير ", parse_mode="markdown", reply_markup=Keyy)
  74.  
  75. def file_encode(message, name):
  76.     bot.send_message(message.chat.id, text=f"📥| قم بارسال الملف لتشفيره  {name} ")
  77.     @bot.message_handler(content_types=['document'])
  78.     def save(message):
  79.         file_input = bot.download_file(bot.get_file(message.document.file_id).file_path)
  80.         file_name = f"تـم تشفيـر.py"
  81.         with open(file_name, 'wb') as f:
  82.             f.write(file_input)
  83.         en = encode_files(name, file_name)
  84.         with open(file_name, 'w') as f:
  85.             f.write(en)
  86.         file_document = open(file_name, 'rb')
  87.         bot.send_document(message.chat.id, file_document)
  88.         os.system(f"rm -f {file_name}")
  89.  
  90. @bot.callback_query_handler(func=lambda call: True)
  91. def callbacks_data(call):
  92.     if call.data == "Encryption":
  93.         Encryption(call.message)
  94.     elif call.data == "base64":
  95.         file_encode(call.message, "base64")
  96.     elif call.data == "lambda":
  97.         file_encode(call.message, "lambda")
  98.     elif call.data == "marshal":
  99.         file_encode(call.message, "marshal")
  100.     elif call.data == "zlib":
  101.         file_encode(call.message, "zlib")
  102. while True:
  103.     try:
  104.         print(" تـم التشغـيل بنـجاح")
  105.         bot.polling(True)
  106.         break
  107.     except Exception as ex:
  108.         print(f"Error polling : {ex}")
  109.         telebot.logger.error(ex)
  110.         continue
Add Comment
Please, Sign In to add comment