Last active
August 27, 2019 20:03
-
-
Save azcoigreach/fb432a15dd30ce78883d40cd6fad6ace to your computer and use it in GitHub Desktop.
Receive message from Tasker. Sign with Keybase PGP. Return signature.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
#am broadcast --user 0 -a net.dinglish.tasker.[task name] -e [variable name] "[value]" > /dev/null | |
#Send passphrase as argument to keybase for PGP SIGN from pgp_input.txt to pgp_output.txt | |
#Uses Tasker, Termux and Keybase | |
set timeout -1 | |
set PGP_PASS [lindex $argv 0]; | |
spawn keybase --standalone pgp sign -c -o pgp_output.txt -i /data/data/com.termux/files/home/storage/shared/pgp_input.txt | |
expect { | |
"re:" { | |
send "$PGP_PASS\r" | |
} | |
} | |
sleep 2 | |
set OUTPUT [exec cat pgp_output.txt] | |
exec am broadcast --user 0 -a net.dinglish.tasker.keybasesignature -e keybase_signature $OUTPUT > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment