Skip to content
TheChatArchiveThe Chat Archive
o3-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

import os import sys import time import random import ctypes import logging from typing…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-flash’s answer.
  1. User

    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

  2. Assistant

    Ниже показано, что именно нужно изменить, чтобы:
    • баннер выводил текст «Boost Tool»;
    • строки чередовались КРАСНЫЙ / БЕЛЫЙ;
    • в заголовке окна и в самой «шапке» отображалась версия 1.5.

    💡 Я показал только ключевые места (diff-стиль) —- их достаточно скопировать в ваш файл.

    @@
    -# Предварительно скомпилированный баннер
    -PRECOMPILED_BANNER = r"""
    -  ____               _    _____    _     
    - | __ ) _   _  ___  | |_ |_   _|__| |__  
    - |  _ \| | | |/ _ \ | __|  | |/ __| '_ \ 
    - | |_) | |_| |  __/ | |_   | |\__ \ | | |
    - |____/ \__,_|\___|  \__|  |_||___/_| |_|
    -""".strip()
    +# Предварительно скомпилированный баннер (Boost Tool, сгенерированный figlet-ом «slant»)
    +PRECOMPILED_BANNER = r"""
    + ____                  _     _______          _ 
    +| __ )  ___  ___  ___ | |_  |_   _|__   ___ | |
    +|  _ \ / _ \/ __|/ _ \| __|   | |/ _ \ / _ \| |
    +| |_) | (_) \__ \ (_) | |_    | | (_) | (_) | |
    +|____/ \___/|___/\___/ \__|   |_|\___/ \___/|_|
    +""".strip()
    +
    +# Версия программы
    +VERSION = "1.5"
    
    @@
    -# Настройки консоли
    -CONSOLE_WIDTH = 80
    -SIMULATION_MODE = True
    -BANNER_CACHE = {}
    +# Настройки консоли
    +CONSOLE_WIDTH   = 80
    +SIMULATION_MODE = True
    +BANNER_CACHE    = {}
    
    @@
    -def set_console_title(title: str):
    +def set_console_title(title: str):
    @@
    -        if os.name == 'nt':
    -            ctypes.windll.kernel32.SetConsoleTitleW(title)
    +        if os.name == 'nt':
    +            ctypes.windll.kernel32.SetConsoleTitleW(title)
    

    (функция не поменялась — просто напоминание, что она уже есть)

    @@
    -def print_title():
    +# Красно-белая окраска + версия 1.5
    +def print_title():
    @@
    -        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'])
    +        banner = PRECOMPILED_BANNER
    +        lines  = banner.split('\n')
    +
    +        # Чередуем красный / белый
    +        for i, line in enumerate(lines):
    +            color = COLORS['red'] if i % 2 == 0 else COLORS['white']
    +            fast_print(color + line.center(console_width) + COLORS['reset'])
    +
    +        # ─── версия ───
    +        fast_print(COLORS['white'] + f"v{VERSION}".center(console_width) + COLORS['reset'])
    +        fast_print(COLORS['white'] + "© Your Name 2024".rjust(console_width) + COLORS['reset'])
             fast_print()
    
    @@
     def main():
         """Основной цикл программы"""
    -    set_console_title("Boost Tool")
    +    set_console_title(f"Boost Tool | Version: {VERSION}")
    

    Если хотите, можете также заменить «v1.0.0» на f"v{VERSION}" в других местах, где выводится версия.

    После этих правок баннер будет красно-белым, с текстом «Boost Tool», а заголовок окна — «Boost Tool | Version: 1.5». 🚀

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.