Mauro Stettler wrote:
> hi together

Hello,

> im writing a perlscript which should be able to create a cryptoloop
> onto a device. the console command to do this is losetup /dev/loo0
> /dev/sdb1 -e twofish-256, then i am asked for a password... the
> problem is, this password is requested by the function getpass(), i
> don't know how i can enter it from a perl script.
> 
> it seems to only listen to the keyboard, how can i enter the password
> from a script?

That is a security feature that requires the program input/output be connected
to a TTY (terminal).  To do what you want from perl you have to connect the
program to a pseudo TTY.

perldoc Expect


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to