Twitter: @ltzsten2 My Discord Server: discord.gg/svdBA2cg8w
Everything showcased on my channel is meant only for educational and documentary purposes, viewers should not try to infect any machines at all without prior knowlegde, permission and for education and documentation. Keep in mind that sending malicious software to someone is a violation of the law! I'm also not responsible for any damage whatsoever caused by anyone using the scripts I show how to code in some particular videos.
here a modern verison of the code : import ctypes from ctypes.wintypes import BOOL, HANDLE, HDC, DWORD, COLORREF from random import randrange from time import sleep # Define constants PATINVERT = 0x005A0089 HWND_DESKTOP = 0 # Load the user32 and gdi32 libraries user32 = ctypes.WinDLL('user32') gdi32 = ctypes.WinDLL('gdi32') # Define function prototypes user32.GetDC.restype = HDC user32.GetSystemMetrics.argtypes = [ctypes.c_int] user32.GetSystemMetrics.restype = ctypes.c_int gdi32.CreateSolidBrush.restype = HANDLE gdi32.CreateSolidBrush.argtypes = [COLORREF] gdi32.SelectObject.restype = HANDLE gdi32.SelectObject.argtypes = [HDC, HANDLE] gdi32.PatBlt.argtypes = [HDC, ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, DWORD] gdi32.PatBlt.restype = BOOL gdi32.DeleteObject.restype = BOOL gdi32.DeleteObject.argtypes = [HANDLE] user32.ReleaseDC.argtypes = [ctypes.c_int, HDC] # Get the device context for the entire screen desk = user32.GetDC(HWND_DESKTOP) x = user32.GetSystemMetrics(0) # SM_CXSCREEN y = user32.GetSystemMetrics(1) # SM_CYSCREEN try: for i in range(100): # Create a brush with a random color brush_color = (randrange(256) | (randrange(256) << 8) | (randrange(256) << 16)) brush = gdi32.CreateSolidBrush(brush_color) # Select the brush into the device context old_brush = gdi32.SelectObject(desk, brush) # Draw an inverted rectangle with random position and larger size width = randrange(x // 4, x // 2) # Larger width height = randrange(y // 4, y // 2) # Larger height gdi32.PatBlt(desk, randrange(x), randrange(y), width, height, PATINVERT) # Restore the old brush and delete the new brush gdi32.SelectObject(desk, old_brush) gdi32.DeleteObject(brush) # Sleep for 10 milliseconds sleep(0.01) finally: # Release the device context when done user32.ReleaseDC(HWND_DESKTOP, desk)
the notepad text is: why don't you question yours? you made your choice. however, this is the wrong choice. why did you make this choice? shouldn't you be uncomfortable with this choice? question... why don't you?