mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 12:56:28 -04:00
Require _client_device_id as parameter to whitelist_verify (for extension support)
Former-commit-id: 608cd556ac34c6d64a0559398a43c180e41e1510 [formerly 51d99992a5]
Former-commit-id: d0e316a16321a13972be7233c88ffb61d5f5c3f7
This commit is contained in:
+2
-2
@@ -569,13 +569,13 @@ def whitelist_setup(): # takes input from the user to set up quick-unlock passw
|
||||
print(f"\nyour quick-unlock passphrase: {_quick_unlock_password}")
|
||||
|
||||
|
||||
def whitelist_verify(_port, _username_ssh, _ip):
|
||||
def whitelist_verify(_port, _username_ssh, _ip, _client_device_id):
|
||||
# checks the user's whitelist status and fetches the full gpg key password if possible
|
||||
_i, _full_password = 0, ''
|
||||
_server_whitelist = run('ssh -i ' + "'" + path.expanduser('~/.ssh/sshyp') + "' -p " + _port + " " + _username_ssh +
|
||||
'@' + _ip + " 'ls ~/.config/sshyp/whitelist'", shell=True, stdout=PIPE, text=True)
|
||||
for _device_id in _server_whitelist.stdout.rstrip().split('\n'):
|
||||
if _device_id == client_device_id:
|
||||
if _device_id == _client_device_id:
|
||||
_quick_unlock_password = input('\nquick-unlock passphrase: ')
|
||||
_quick_unlock_password_excluded = run(
|
||||
'ssh -i ' + "'" + path.expanduser('~/.ssh/sshyp') + "' -p " + _port + " " + _username_ssh + '@' + _ip +
|
||||
|
||||
Reference in New Issue
Block a user