From b649ae2c16232abb898ea061d92d99c689980622 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 27 Feb 2023 09:51:33 -0500 Subject: [PATCH] Fixed server index errors and whitelist arguments Former-commit-id: f9c34c4a4f02dfc88934e17ac8b8fa0f2e190f29 Former-commit-id: bd9fa9d1ea95a5092218b21df2d38a105ee5f6e0 --- lib/sshyp.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index 7e96610..871684a 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -901,16 +901,16 @@ if __name__ == "__main__": remove_data() else: # server arguments - if arg_count == 1 and arguments[arg_start_p] == 'setup': - success_flag = True - whitelist_setup() - elif arg_count > 1 and arguments[arg_start] == 'whitelist': - if arguments[arg_start_p] in ('list', '-l'): + if arg_count > 1 and arguments[0] == 'whitelist': + if arguments[1] in ('list', '-l'): success_flag = True whitelist_list() - elif arguments[arg_start_p] in ('add', 'del'): + elif arguments[1] in ('add', 'del'): success_flag = True whitelist_manage() + elif arguments[1] == 'setup': + success_flag = True + whitelist_setup() if success_flag == 0 and arguments[0] != 'sync': if device_type == 'client' and arguments[arg_start] not in ('help', '-h'):