mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Replaced use of system-provided 'ls' with 'os.listdir'
Former-commit-id: cbd6302ec15624381303d1181861d3c2792475a6 [formerly 31a4c7b8e7]
Former-commit-id: acd4d9db5d557793aca4662e48ca88320b7a3bfa
This commit is contained in:
+2
-1
@@ -554,7 +554,8 @@ def whitelist_verify(_port, _username_ssh, _ip, _client_device_id):
|
|||||||
except CalledProcessError:
|
except CalledProcessError:
|
||||||
_i, _full_password = 0, ''
|
_i, _full_password = 0, ''
|
||||||
_server_whitelist = run(['ssh', '-i', expanduser('~/.ssh/sshyp'), '-p', _port, f"{_username_ssh}@{_ip}",
|
_server_whitelist = run(['ssh', '-i', expanduser('~/.ssh/sshyp'), '-p', _port, f"{_username_ssh}@{_ip}",
|
||||||
'ls ~/.config/sshyp/whitelist'], stdout=PIPE, text=True).stdout.rstrip().split('\n')
|
f'python -c \'from os import listdir; print(*listdir("/home/{_username_ssh}'
|
||||||
|
f'/.config/sshyp/whitelist"))\''], stdout=PIPE, text=True).stdout.rstrip().split(' ')
|
||||||
for _device_id in _server_whitelist:
|
for _device_id in _server_whitelist:
|
||||||
if _device_id == _client_device_id:
|
if _device_id == _client_device_id:
|
||||||
_quick_unlock_password = input('\nquick-unlock passphrase: ')
|
_quick_unlock_password = input('\nquick-unlock passphrase: ')
|
||||||
|
|||||||
Reference in New Issue
Block a user