mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 08:37:14 -04:00
Fixed failed decryption on excluded.gpg
Former-commit-id: 8bd59bcf06d63daad654f9ddea9e5ccbcf1b2ea5 [formerly 8dd5101c7f]
Former-commit-id: 6b4e01337c3a0a337a558384283a467eb9e7de1c
This commit is contained in:
+3
-3
@@ -544,7 +544,7 @@ def whitelist_setup(): # takes input from the user to set up quick-unlock passw
|
|||||||
# encrypt excluded with the assembly key
|
# encrypt excluded with the assembly key
|
||||||
_shm_folder, _shm_entry = shm_gen()
|
_shm_folder, _shm_entry = shm_gen()
|
||||||
open(f"{tmp_dir}{_shm_folder}/{_shm_entry}", 'w').write(_quick_unlock_password_excluded)
|
open(f"{tmp_dir}{_shm_folder}/{_shm_entry}", 'w').write(_quick_unlock_password_excluded)
|
||||||
encrypt(path.expanduser('~/.config/sshyp/excluded.gpg'), _shm_folder, _shm_entry, gpg, _gpg_id)
|
encrypt(path.expanduser('~/.config/sshyp/excluded'), _shm_folder, _shm_entry, gpg, _gpg_id)
|
||||||
print(f"\nyour quick-unlock passphrase: {_quick_unlock_password}")
|
print(f"\nyour quick-unlock passphrase: {_quick_unlock_password}")
|
||||||
|
|
||||||
|
|
||||||
@@ -557,9 +557,9 @@ def whitelist_verify(): # checks the user's whitelist status and fetches the fu
|
|||||||
_quick_unlock_password = input('\nquick-unlock passphrase: ')
|
_quick_unlock_password = input('\nquick-unlock passphrase: ')
|
||||||
_quick_unlock_password_excluded = run(
|
_quick_unlock_password_excluded = run(
|
||||||
'ssh -i ' + "'" + path.expanduser('~/.ssh/sshyp') + "' -p " + port + " " + username_ssh + '@' + ip +
|
'ssh -i ' + "'" + path.expanduser('~/.ssh/sshyp') + "' -p " + port + " " + username_ssh + '@' + ip +
|
||||||
f"'gpg --pinentry-mode loopback --passphrase '{_quick_unlock_password}' "
|
f" 'gpg --pinentry-mode loopback --passphrase '{_quick_unlock_password}' "
|
||||||
f"-qd ~/.config/sshyp/excluded.gpg'", shell=True, stdout=PIPE, text=True).stdout.rstrip()
|
f"-qd ~/.config/sshyp/excluded.gpg'", shell=True, stdout=PIPE, text=True).stdout.rstrip()
|
||||||
while _i < len(_quick_unlock_password_excluded):
|
while _i < len(_quick_unlock_password_excluded) + len(_quick_unlock_password):
|
||||||
try:
|
try:
|
||||||
_full_password += _quick_unlock_password_excluded[_i]
|
_full_password += _quick_unlock_password_excluded[_i]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
|||||||
Reference in New Issue
Block a user