Expect Script....encrypt password and use

Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the password from that encrypted file...

Thank you for your help :slight_smile:

I am looking for this too,
Could someone help ?

I hope that this Secure expect answer your questions.
@fongthai : i remember your case, sadly, I'm not familiar with md5-crypt-grub, i believe you might get an idea from the link above.