Created
September 1, 2016 19:21
-
-
Save zoffixznet/ec574e21aae6e86ac35211c3888a8cd7 to your computer and use it in GitHub Desktop.
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
use strict; | |
use warnings; | |
use 5.020; | |
use IO::Pty; | |
my $pty = IO::Pty->new; | |
chomp (my $pass = readline); | |
my $tty = $pty->ttyname; | |
unless ( fork ) { | |
$pty->make_slave_controlling_terminal; | |
exec "gpg --use-agent --armor -b foo.txt"; | |
} | |
say $pty $pass; | |
sleep 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment