From c8e54cef43aaf589ca1e187b67598e2bb93de96d Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 15 May 2023 13:43:46 -0400 Subject: [PATCH] sshyp-mfa - Use printf for X11 clipboard --- sshyp-mfa/lib/sshyp-mfa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshyp-mfa/lib/sshyp-mfa.py b/sshyp-mfa/lib/sshyp-mfa.py index f087d90..98a9f99 100755 --- a/sshyp-mfa/lib/sshyp-mfa.py +++ b/sshyp-mfa/lib/sshyp-mfa.py @@ -87,7 +87,7 @@ if __name__ == '__main__': elif Path("/data/data/com.termux").exists(): # Termux (Android) clipboard detection run(('termux-clipboard-set', _mfa_key)) else: # X11 clipboard detection - run(('xclip', '-sel', 'c'), stdin=Popen(('echo', '-n', _mfa_key), stdout=PIPE).stdout) + run(('xclip', '-sel', 'c'), stdin=Popen(('printf', _mfa_key), stdout=PIPE).stdout) sleep(1) except KeyboardInterrupt: print('\n')