1

So I was basically trying to create a script that would continuously generate keys and hypothetically brute force finding the correct key for the decryption, and running it outputs this:

This is the script:

from cryptography.fernet import Fernet

x = "test"

key = Fernet.generate_key()
f = Fernet(key)

x_encrypted = f.encrypt(x.encode())

while True:

    key = Fernet.generate_key()
    f = Fernet(key)

    print(f.decrypt(x_encrypted))  # decoding variable x until it outputs "test" (hypothetical)

Any information about what's causing this would be greatly appreciated!

0 Answers0