Загрузка данных


import sys
import winsound
import random
from PyQt6.QtWidgets import QApplication, QLabel, QVBoxLayout, QWidget, QTextEdit
from PyQt6.QtCore import Qt, QTimer
from PyQt6.QtGui import QFont, QPalette, QColor, QPainter, QBrush

class UltimateWinlocker(QWidget):
    def __init__(self):
        super().__init__()
        self.log_counter = 0
        self.initUI()
        
    def initUI(self):
        self.showFullScreen()
        self.setCursor(Qt.CursorShape.BlankCursor)
        
        palette = self.palette()
        palette.setColor(QPalette.ColorRole.Window, QColor(0, 0, 0))
        self.setPalette(palette)
        
        # --- БЕГУЩИЕ СТРОКИ СВЕРХУ СЛЕВА (ТИКТОК СТИЛЬ) ---
        self.log_text = QTextEdit(self)
        self.log_text.setGeometry(20, 20, 600, 350)
        self.log_text.setReadOnly(True)
        self.log_text.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
        self.log_text.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
        self.log_text.setFont(QFont("Courier New", 11, QFont.Weight.Bold))
        self.log_text.setStyleSheet("background-color: transparent; color: #880000; border: none;")
        
        self.log_timer = QTimer(self)
        self.log_timer.timeout.connect(self.add_hacker_logs)
        self.log_timer.start(100)
        
        # --- ТЕКСТ ПО ЦЕНТРУ ---
        self.center_widget = QWidget(self)
        self.center_widget.setGeometry(0, 0, self.width(), self.height())
        
        self.layout = QVBoxLayout(self.center_widget)
        self.layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addSpacing(300)
        
        self.text_label = QLabel("ВАС ЗАМЕТИЛИ", self)
        self.text_label.setFont(QFont("Arial", 48, QFont.Weight.Bold))
        self.text_label.setStyleSheet("color: white; letter-spacing: 2px; background: transparent;")
        self.text_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        self.layout.addWidget(self.text_label)
        
        # Включаем резкий бесконечный звук критической ошибки Windows
        try:
            winsound.PlaySound("SystemHand", winsound.SND_ALIAS | winsound.SND_ASYNC | winsound.SND_LOOP)
        except:
            pass

        QTimer.singleShot(4000, self.show_lock)
        QTimer.singleShot(11000, self.show_prank)

    # Этот метод сам рисует глаза, файлы фото больше не нужны!
    def paintEvent(self, event):
        if hasattr(self, 'prank_over') and self.prank_over:
            return
        painter = QPainter(self)
        painter.setRenderHint(QPainter.RenderHint.Antialiasing)
        
        eye_color = QColor(255, 0, 0) if hasattr(self, 'is_locked') else QColor(255, 255, 255)
        painter.setBrush(QBrush(eye_color))
        painter.setPen(Qt.PenStyle.NoPen)
        
        center_x = self.width() // 2
        center_y = self.height() // 2 - 100
        
        # Рисуем белки глаз
        painter.drawEllipse(center_x - 120, center_y, 70, 40)
        painter.drawEllipse(center_x + 50, center_y, 70, 40)
        
        # Рисуем черные зрачки
        painter.setBrush(QBrush(QColor(0, 0, 0)))
        painter.drawEllipse(center_x - 95, center_y + 10, 20, 20)
        painter.drawEllipse(center_x + 75, center_y + 10, 20, 20)

    def add_hacker_logs(self):
        hex_num1 = hex(random.randint(0x100000, 0xFFFFFF)).upper()
        hex_num2 = hex(random.randint(0x100000, 0xFFFFFF)).upper()
        fake_logs = [
            f"Loading malicious payload...",
            f"Injecting into explorer.exe -> status {hex_num1}",
            f"Crashing memory bank at address [0x{hex_num2}]",
            f"MFT tables corrupted successfully",
            f"CRITICAL ERROR: Windows security bypassed!",
            f"System status: BLOCKED"
        ]
        self.log_text.append(fake_logs[self.log_counter % len(fake_logs)])
        self.log_counter += 1

    def show_lock(self):
        self.is_locked = True
        self.update() # Перекрасит глаза в красный цвет
        self.log_text.setStyleSheet("background-color: transparent; color: #ff0000; border: none;")
        self.text_label.setText("Упс, Windows заблокирован!")
        self.text_label.setStyleSheet("color: #ff0000; font-size: 42px; font-weight: bold;")

    def show_prank(self):
        self.prank_over = True
        self.update()
        self.log_timer.stop()
        self.log_text.hide()
        winsound.PlaySound(None, winsound.SND_PURGE) # Выключит звук
        
        self.setCursor(Qt.CursorShape.ArrowCursor)
        self.text_label.setText("РАССЛАБЬСЯ, ЭТО ПРАНК! ⚡\n\nТы попался. Твой компьютер в безопасности.\n\n(Для выхода нажми кнопку ESC)")
        self.text_label.setStyleSheet("color: #00ff00; font-size: 36px;")

    def keyPressEvent(self, event):
        if event.key() == Qt.Key.Key_Escape:
            winsound.PlaySound(None, winsound.SND_PURGE)
            self.close()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    ex = UltimateWinlocker()
    sys.exit(app.exec())