The fail_safe.py file works fine for me, but the other thing doesn't. It's actually two problems.
None
Traceback (most recent call last):
File "lock.py", line 1, in <module>
from Physical2FA import decrypt
File "C:\Python38-32\lib\site-packages\Physical2FA\decrypt.py", line 47, in <module>
decrypt(i, pubkey)
File "C:\Python38-32\lib\site-packages\Physical2FA\decrypt.py", line 31, in decrypt
f = Fernet(key)
File "C:\Python38-32\lib\site-packages\cryptography\fernet.py", line 37, in __init__
raise ValueError(
ValueError: Fernet key must be 32 url-safe base64-encoded bytes.
lock.py
you will encrypt the following files: ['aa', 'bb', 'key.key', 'lock.py', 'System Volume Information', 'WhatsAppImage.png']. Are you sure you want to continue? y/n: y
['aa', 'bb', 'key.key', 'lock.py', 'System Volume Information', 'WhatsAppImage.png']
None
None
['a.png', 'b.png', 'c.png', 'd.png', 'e.png', 'f.png', 'g.png']
['a.png', 'b.png', 'c.png', 'd.png', 'e.png', 'f.png', 'g.png']
[]
Traceback (most recent call last):
File "D:\lock.py", line 1, in <module>
from Physical2FA import encrypt
File "C:\Python38-32\lib\site-packages\Physical2FA\encrypt.py", line 46, in <module>
os.chdir(i)
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado: 'bb'
from Physical2FA import write_key
write_key
from Physical2FA import encrypt
encrypt
from Physical2FA import decrypt
decrypt