LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2010, 02:56 PM   #1
android2009
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Rep: Reputation: 0
[Perl] Is there a way to encrypt command-line input when user enter a password ?


I need user to input a password through command line in Windows cmd prompt. Is there a way to encrypt the input (such as put it into ......) when user is typing ?
 
Old 11-04-2010, 03:20 PM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Look at the Data::Encrypted module at CPAN. There may be other mods you can use to encrypt.

http://search.cpan.org/~amackey/Data...7/Encrypted.pm
 
Old 11-05-2010, 02:13 PM   #3
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
if you use powershell there is a function called encrypted-string that will store the variable in an encrypted string so that if it is printed, or echo'ed you get the encrypted string. but if you pass it as an argumrnt to a command or anything like that it prints the unecrypted string. Also you get *****'s when its entered into the console.

$mypassword = encrypted-string "please enter your password"

I havent used it in a while, but its something like the above.
 
  


Reply



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
Bash - Read user input: URLs without the enter key stroke make Programming 2 09-23-2010 04:29 PM
I can't input my password in command line (ubuntu) !? reza17 Linux - Newbie 2 09-20-2010 05:07 AM
crypt() perl function to encrypt Password in shell scripts or How Encrypt passwords ? balakrishnay Linux - General 13 01-14-2010 09:35 AM
perl UTF8 command line input nadroj Programming 5 08-31-2008 09:05 PM
Perl password input jonlake Programming 4 02-27-2006 03:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration