Avoiding Detection
Malware often tries to stay hidden so it cannot be easily detected. This script will hide the console window when the script is run:
import ctypes #access Windows C functionskernel32 = ctypes.windll.kernel32 #kernel leveluser32 = ctypes.windll.user32 #user leveluser32.ShowWindow(kernel32.GetConsoleWindow(), False) #hide consolewhile True:pass
Because you do not have a console window to close, you can kill this Python process using Task Manager when it is run:

A rudimentary method of hiding a script is to change an icon:


A more sophisticated method of hiding a script is to disable Task Manager (do not try this):

n.b. - exam browsers (such as NAPLAN) work this way