import os
import sys
import time
import random
import ctypes
import logging
from typing import List, Optional
Цвета ANSI (оптимизированы для скорости)
COLORS = {
'red': "\033[31m",
'white': "\033[37m",
'cyan': "\033[36m",
'purple': "\033[35m",
'green': "\033[32m",
'reset': "\033[0m"
}
Предварительно скомпилированный баннер
PRECOMPILED_BANNER = r"""
| __ ) _ _ ___ | |_ |_ || |
| _ | | | |/ _ \ | __| | |/ | ' \
| |) | || | / | | | |_ \ | | |
|/ _,|_| _| |||__/| |_|
""".strip()
Настройки консоли
CONSOLE_WIDTH = 80
SIMULATION_MODE = True
BANNER_CACHE = {}
def set_console_title(title: str):
"""Установка заголовка консоли (только Windows)"""
try:
if os.name == 'nt':
ctypes.windll.kernel32.SetConsoleTitleW(title)
except Exception as e:
logging.error(f"Ошибка установки заголовка: {e}")
def clear_console():
"""Оптимизированная очистка консоли"""
try:
os.system('cls' if os.name == 'nt' else 'clear')
except Exception as e:
logging.error(f"Ошибка очистки консоли: {e}")
def fast_print(text: str = "", end: str = "\n"):
"""Мгновенный вывод с обработкой ошибок"""
try:
sys.stdout.write(text + end)
sys.stdout.flush()
except Exception as e:
logging.error(f"Ошибка вывода: {e}")
def generate_banner(font: str = 'slant') -> str:
"""Генерация баннера с обработкой ошибок"""
if font in BANNER_CACHE:
return BANNER_CACHE[font]
try:
from pyfiglet import Figlet
f = Figlet(font=font)
banner = f.renderText("Boost Tool")
except ImportError:
banner = "Boost Tool"
except Exception as e:
banner = "Boost Tool"
logging.error(f"Ошибка генерации баннера: {e}")
BANNER_CACHE[font] = banner
return banner
def print_title():
"""Максимально быстрый вывод баннера"""
clear_console()
try:
console_width = CONSOLE_WIDTH
if os.name == 'nt':
try:
console_width = ctypes.windll.kernel32.GetSystemMetrics(0)
except:
pass
banner = PRECOMPILED_BANNER
lines = banner.split('\n')
half = len(lines) // 2
for i, line in enumerate(lines):
color = COLORS['white'] if i < half else COLORS['cyan']
fast_print(color + line.center(console_width) + COLORS['reset'])
fast_print(COLORS['white'] + "v1.0.0".center(console_width) + COLORS['reset'])
fast_print(COLORS['white'] + "© Your Name 2024".rjust(console_width) + COLORS['reset'])
fast_print()
except Exception as e:
logging.error(f"Ошибка вывода заголовка: {e}")
def validate_url(url: str) -> bool:
"""Проверка URL формата"""
return url.startswith("https://discord.gg/")
def get_tokens() -> List[str]:
"""Ввод и валидация токенов"""
try:
input_str = input(COLORS['white'] + "Введите токены (через пробел): " + COLORS['reset']).strip()
return input_str.split() if input_str else ["fake_token"]
except Exception as e:
logging.error(f"Ошибка ввода токенов: {e}")
return []
def check_token(token: str) -> str:
"""Оптимизированная проверка токена"""
if SIMULATION_MODE or "fake" in token:
return "valid_nitro"
try:
import requests
response = requests.get(
"https://discord.com/api/v9/users/@me",
headers={"Authorization": token},
timeout=5
)
return "valid_nitro" if response.status_code == 200 else "invalid"
except Exception as e:
logging.error(f"Ошибка проверки токена: {e}")
return "error"
def process_boosts(tokens: List[str], count: int, action: str):
"""Универсальная функция для буста/анбуста"""
valid_tokens = [t for t in tokens if check_token(t) == "valid_nitro"]
if not valid_tokens:
fast_print(COLORS['red'] + " Нет валидных токенов с Nitro!" + COLORS['reset'])
return
action_text = "Буст" if action == "boost" else "Снятие буста"
fast_print(COLORS['white'] + f" Найдено {len(valid_tokens)} валидных токенов." + COLORS['reset'])
fast_print(COLORS['white'] + f" Начинаем {action}..." + COLORS['reset'])
for token in valid_tokens:
for _ in range(count):
if random.random() < 0.1:
fast_print(COLORS['red'] + f" Ошибка при {action} токеном {token[:6]}..." + COLORS['reset'])
else:
fast_print(COLORS['green'] + f" Успешно {action} токеном {token[:6]}..." + COLORS['reset'])
def main_menu():
"""Меню с анимированным заголовком"""
print_title()
menu_items = [
(f"{COLORS['purple']}1.{COLORS['reset']} {COLORS['white']}Boost Tool{COLORS['reset']}", ""),
(f"{COLORS['purple']}2.{COLORS['reset']} {COLORS['white']}Unboost{COLORS['reset']}", ""),
(f"{COLORS['purple']}0.{COLORS['reset']} {COLORS['white']}Выход{COLORS['reset']}", "")
]
for item, emoji in menu_items:
fast_print(f"{emoji} {item}")
fast_print()
def main():
"""Основной цикл программы"""
set_console_title("Boost Tool")
while True:
try:
main_menu()
choice = input(COLORS['white'] + "🔘 Выберите действие: " + COLORS['reset']).strip()
if choice == "1":
fast_print(COLORS['white'] + " Введите URL сервера: " + COLORS['reset'])
url = input().strip()
if not validate_url(url):
fast_print(COLORS['red'] + " Неверный формат URL!" + COLORS['reset'])
continue
fast_print(COLORS['white'] + " Введите количество бустов: " + COLORS['reset'])
try:
count = int(input())
process_boosts(get_tokens(), count, "boost")
except ValueError:
fast_print(COLORS['red'] + " Введите число!" + COLORS['reset'])
elif choice == "2":
fast_print(COLORS['white'] + " Введите количество снятий: " + COLORS['reset'])
try:
count = int(input())
process_boosts(get_tokens(), count, "unboost")
except ValueError:
fast_print(COLORS['red'] + " Введите число!" + COLORS['reset'])
elif choice == "0":
fast_print(COLORS['white'] + " Выход из программы..." + COLORS['reset'])
break
else:
fast_print(COLORS['red'] + " Неверный выбор!" + COLORS['reset'])
time.sleep(1)
except KeyboardInterrupt:
fast_print("\n Выход из программы...")
break
except Exception as e:
fast_print(COLORS['red'] + f" Критическая ошибка: {e}" + COLORS['reset'])
logging.error(f"Критическая ошибка: {e}")
time.sleep(5) # Пауза для чтения ошибки
break
if name == "main":
try:
main()
except Exception as e:
fast_print(COLORS['red'] + f" Фатальная ошибка: {e}" + COLORS['reset'])
logging.error(f"Фатальная ошибка: {e}")
finally:
input(COLORS['white'] + "\nНажмите Enter для выхода..." + COLORS['reset'])
измени баннер на другой текст Boost Tool
ццвет баннера краснобелый
title - Boost Tool I Version: 1.5