python病毒最终成品

 

我决定了,我这是最后一次搞病毒,再也不弄了!

第一阶段

def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('haha')
    window.geometry("300x50" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='def_marshmello', bg='blue',
             font=('宋体', 17), width=50, height=4).pack()
    window.mainloop()


time.sleep(1)

threads = []
for i in range(40):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0)
    threads[i].start()
time.sleep(1.0)


def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(50):
        t = threading.Thread(target=boom)
        p = threading.Thread(target=lu)
        threads.append(t)
        threads.append(p)
        time.sleep(0.6)
        threads[i].start()

这一阶段会慢慢地折磨人,但是这整个病毒基本也没伤害性,杀毒软件检查不到

也只是折磨一下,可不能触犯法律

第二阶段

 

#第二阶段,铺满全屏
def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('hello')
    window.geometry("30000x50000" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='yhtyrerg', bg='blue',
             font=('宋体', 17), width=10000, height=10000).pack()
    window.mainloop()


time.sleep(1)

这个朴不铺满看运气

第三阶段

#第三阶段,演奏音乐
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(18):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.2)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.3)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.8)
def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('haha')
    window.geometry("300x50" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='关注def_marshmello', bg='blue',
             font=('宋体', 17), width=50, height=4).pack()
    window.mainloop()


time.sleep(1)

threads = []
for i in range(40):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0.01)
    threads[i].start()

def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.2)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='好听', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.54)
while 1:
    def boom():
        window = tk.Tk()
        width = window.winfo_screenwidth()
        height = window.winfo_screenheight()
        a = random.randrange(0, width)
        b = random.randrange(0, height)
        window.title('haha')
        window.geometry("300x50" + "+" + str(a) + "+" + str(b))
        tk.Label(window, text='def_marshmello', bg='blue',
                 font=('宋体', 17), width=50, height=4).pack()
        window.mainloop()


    time.sleep(1)

    threads = []
    for i in range(40):
        t = threading.Thread(target=boom)
        threads.append(t)
        time.sleep(0)
        threads[i].start()

    time.sleep(1.0)


    def lu():
        TK = tk.Tk()
        width = TK.winfo_screenwidth()
        height = TK.winfo_screenheight()
        a = random.randrange(0, width)
        b = random.randrange(0, height)
        TK.title("嘿嘿!")
        TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
        tk.Label(TK, text='好听', bg='red',
                 font=('宋体', 17), width=40, height=4).pack()
        winsound.MessageBeep(winsound.MB_ICONASTERISK)
        TK.mainloop()


    if __name__ == '__main__':
        threads = []
        for i in range(30):
            p = threading.Thread(target=lu)
            threads.append(p)
            threads[i].start()
    time.sleep(0.5)

这个其实挺适合电脑排水,最后的那段是逼你关机的,心软了可以不加

所有代码


import tkinter as tk
import random
import time
import threading
import winsound
#第一阶段,折磨
def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('haha')
    window.geometry("300x50" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='def_marshmello', bg='blue',
             font=('宋体', 17), width=50, height=4).pack()
    window.mainloop()


time.sleep(1)

threads = []
for i in range(40):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0)
    threads[i].start()
time.sleep(1.0)


def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(50):
        t = threading.Thread(target=boom)
        p = threading.Thread(target=lu)
        threads.append(t)
        threads.append(p)
        time.sleep(0.6)
        threads[i].start()
#第二阶段,铺满全屏
def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('hello')
    window.geometry("30000x50000" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='yhtyrerg', bg='blue',
             font=('宋体', 17), width=10000, height=10000).pack()
    window.mainloop()


time.sleep(1)

threads = []
for i in range(10):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0)
    threads[i].start()
time.sleep(1.0)
#第三阶段,演奏音乐
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(18):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.2)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.3)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.8)
def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('haha')
    window.geometry("300x50" + "+" + str(a) + "+" + str(b))
    tk.Label(window, text='关注def_marshmello', bg='blue',
             font=('宋体', 17), width=50, height=4).pack()
    window.mainloop()


time.sleep(1)

threads = []
for i in range(40):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0.01)
    threads[i].start()

def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='hahaha', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.2)
def lu():
    TK = tk.Tk()
    width = TK.winfo_screenwidth()
    height = TK.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    TK.title("嘿嘿!")
    TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
    tk.Label(TK, text='好听', bg='red',
             font=('宋体', 17), width=40, height=4).pack()
    winsound.MessageBeep(winsound.MB_ICONASTERISK)
    TK.mainloop()


if __name__ == '__main__':
    threads = []
    for i in range(30):
        p = threading.Thread(target=lu)
        threads.append(p)
        threads[i].start()
        time.sleep(0.54)
while 1:
    def boom():
        window = tk.Tk()
        width = window.winfo_screenwidth()
        height = window.winfo_screenheight()
        a = random.randrange(0, width)
        b = random.randrange(0, height)
        window.title('haha')
        window.geometry("300x50" + "+" + str(a) + "+" + str(b))
        tk.Label(window, text='def_marshmello', bg='blue',
                 font=('宋体', 17), width=50, height=4).pack()
        window.mainloop()


    time.sleep(1)

    threads = []
    for i in range(40):
        t = threading.Thread(target=boom)
        threads.append(t)
        time.sleep(0)
        threads[i].start()

    time.sleep(1.0)


    def lu():
        TK = tk.Tk()
        width = TK.winfo_screenwidth()
        height = TK.winfo_screenheight()
        a = random.randrange(0, width)
        b = random.randrange(0, height)
        TK.title("嘿嘿!")
        TK.geometry("400x100" + "+" + str(a) + "+" + str(b))
        tk.Label(TK, text='好听', bg='red',
                 font=('宋体', 17), width=40, height=4).pack()
        winsound.MessageBeep(winsound.MB_ICONASTERISK)
        TK.mainloop()


    if __name__ == '__main__':
        threads = []
        for i in range(30):
            p = threading.Thread(target=lu)
            threads.append(p)
            threads[i].start()
    time.sleep(0.5)

如果先看强力的,可以看看 我以前两篇

  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值