Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
58.1k stars 3.35k forks source link

add show password in vault #7194

Open jackfong66 opened 1 year ago

jackfong66 commented 1 year ago

after open vault , i want find my password , i cant

Funding

Fund with Polar

lietblue commented 1 year ago

If you want to get your password from the vault. Here is a temporary walkaround: You need to get your IV ,salt and encrypted vault at bottom of the config. Derive your passphrase into the encryption key using Python:

import hashlib
import os

passphrase = "Your passphrase"
salt = "Vault salt"

salt_bytes = bytes.fromhex(salt)

key = hashlib.pbkdf2_hmac("sha512", passphrase.encode(), salt_bytes, 100000)
hex_key = bytes.hex(key[:32])
print(hex_key)

After this you can feed your key into the openssl command below:

cat vault.raw | base64 -d | openssl enc -d -aes-256-cbc \
-K "Your encryption key" \
-iv "Your IV" > vault.json

Reply this commit if you need more help.