LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to write encrypt form of password in pexpect script? (http://www.linuxquestions.org/questions/linux-software-2/how-to-write-encrypt-form-of-password-in-pexpect-script-912563/)

Richard.Yang 11-08-2011 08:58 PM

how to write encrypt form of password in pexpect script?
 
Hi, all

I write a script like this


telnet_cmd = "telnet %s" %(host_name)

child = pexpect.spawn(telnet_cmd)
child.logfile = sys.stdout
child.expect('Username: ')
child.sendline('wizard')
child.expect('Password:')
child.sendline('password')


while the password is seen by everyone. I am wondering any method to replace this?

I tried base64, but definitely, everyone also could decode the base64 password.

So, any other method to do this?

Richard.Yang 11-09-2011 07:47 AM

would someone give me some hint?


All times are GMT -5. The time now is 07:32 AM.