-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVirus.py
More file actions
36 lines (25 loc) · 943 Bytes
/
Copy pathVirus.py
File metadata and controls
36 lines (25 loc) · 943 Bytes
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
import subprocess
import sys
import random
import time
import os
def matrix_effect():
while True:
# پاک کردن صفحه
os.system('cls')
# دریافت ابعاد ترمینال
columns, rows = os.get_terminal_size()
for _ in range(rows):
# ایجاد یک خط تصادفی از 0 و 1
line = ''.join(random.choice('YOU ARE HAKED ') for _ in range(columns))
# چاپ خط
print(line, end='')
if __name__ == "__main__":
if sys.executable.endswith('pythonw.exe'):
# اگر با pythonw اجرا شده، یک پنجره cmd جدید باز کن
subprocess.Popen(['start', 'cmd', '/k', sys.executable, __file__], shell=True)
else:
try:
matrix_effect()
except KeyboardInterrupt:
print("\nبرنامه متوقف شد.")