LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-08-2011, 08:58 PM   #1
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
Smile 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?
 
Old 11-09-2011, 07:47 AM   #2
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
would someone give me some hint?
 
  


Reply

Tags
pexpect, python


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a script which will take in the password automatically? thomas2004ch Linux - Software 1 03-21-2011 11:11 AM
encrypt the password nagavinodh Linux - Security 4 03-15-2010 11:31 AM
crypt() perl function to encrypt Password in shell scripts or How Encrypt passwords ? balakrishnay Linux - General 13 01-14-2010 09:35 AM
How to write to a file from a form with perl, and not leave the form page. OldGaf Programming 3 11-12-2008 07:53 PM
shell script works form command line but not form crontab saifee General 1 10-14-2004 10:27 AM


All times are GMT -5. The time now is 07:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration