473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to hide password

Hi All,
I would like to get the passwordf from the user,
I need to hide the password , replace it with '*' or not type user input,
I don't want to use a package such as 'ReadKey' or any other
How can I get the password and hide it?

Thanks,
Ronen
May 13 '07 #1
4 16232
miller
1,089 Expert 1GB
Hello Ronen,

Look into the following cpan module:
cpan Term::InKey

Even if you don't want to use a package, you can still download the module and look at it's source to determine a way that you could code it all yourself.

- Miller
May 13 '07 #2
system('stty','-echo');
chop($password=<STDIN>);
system('stty','echo');
May 28 '07 #3
ketanm
8
Hi all,
I also want to hide password.i tried below solution in winxp but i got the error "'stty' is not recognized as an internal or external command,operable program or batch file.".

how could i avoid this error?

Thanks.
Sep 7 '10 #4
hi ketanm,

Maybe more than a bit too late a reply for you, but you can use the Term::ReadKey module for this. Here is how:

use strict;
use warnings;
use Term::ReadKey;

ReadMode = 'noecho';
my $password = <>;
Jan 15 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kona | last post by:
Hello, I'm new with Oracle JDBC connection. Is it a way to crypt, hide the password string into a Oracle JDBC connection string ? The goal is to hide the password within script file. Thank's...
1
by: william cline | last post by:
Hi, I am a beginner and below I have code for a long in form. My goal is for the form to read a file of a list of users and thier passwords ....compare the text box inputs to the file and either...
12
by: Sharon | last post by:
I wrote an assembly in C#/.NET that includes some personal information. But this information can be revealed by opening the assembly in tools like the ‘Microsoft .NET Framework IL DASM’ and...
1
by: Jurij P | last post by:
Did anyone tried to hide a password on client side before sending it over net (MD5 - like yahoo mail client)? thank you, Jure
2
by: emerth | last post by:
Hi, I have a command line PHP script that logs into a network service with a user name specified on the command line. The script then prompts for a password. Currently the password is echoed...
7
by: cefrancke | last post by:
I have a few tables with sensitive user information (passwords, etc.) and I would like to prevent someone from opening a blank database and importing those tables. Is there a way to "hide" or...
0
by: hindsy | last post by:
I'm writing a script for CLI on a windows server that needs the password characters hidden or masked from the user. I've found information on how to do it in a Unix Shell but not in a Windows MS-DOS...
0
by: atencorps | last post by:
Hello I have the following code but need some help on it. The idea of the code is the main sections ie Service Management are viewable when the page is loaded and by clicking on the main...
4
by: rkyakkala | last post by:
Hi, In my webapplication i am opening new window by passing some parameters.i am passing password also as parameter.But i need to hide it or encode it. how can i do this.Following is my code: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.