<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: regarding password encryption in perl into ***** in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181962#M91263</link>
    <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for letting me know about the Points.&lt;BR /&gt;&lt;BR /&gt;Regarding the above query i tried using your code .it was working with some abnormality.&lt;BR /&gt; i.e after entering the pwd if we hit "Enter Key" immediatly it will not come out from loop.again we need to hit the key for 3 to 4 times then its coming out from loop.&lt;BR /&gt; please find below chunk of code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use Term::ReadKey;&lt;BR /&gt;my $char;&lt;BR /&gt;my @password;&lt;BR /&gt;print "Enter password: ";&lt;BR /&gt;ReadMode 'noecho';&lt;BR /&gt;ReadMode 'cbreak';&lt;BR /&gt;&lt;BR /&gt;while ( $char = ReadKey 0 ) {&lt;BR /&gt;    if($char eq "\r") {&lt;BR /&gt;    last;&lt;BR /&gt; }&lt;BR /&gt;      push @password, $char;&lt;BR /&gt;      print '*';&lt;BR /&gt;}&lt;BR /&gt;ReadMode 'restore';&lt;BR /&gt;print "\n";&lt;BR /&gt;print "&amp;gt;", @password, "&amp;lt;\n";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;BS.</description>
    <pubDate>Wed, 30 Apr 2008 07:28:02 GMT</pubDate>
    <dc:creator>sowm18</dc:creator>
    <dc:date>2008-04-30T07:28:02Z</dc:date>
    <item>
      <title>regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181956#M91257</link>
      <description>How can I write a program in Perl to prompt a user for his password such that it appears as *** when he enters it at the command line? It will then take in the password as a variable to carry on execution of the program.  Also, the program should be able to execute in DOS. I have tried echo off but it does give the same effect as 'stty' in UNIX.  &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;BS</description>
      <pubDate>Thu, 17 Apr 2008 13:21:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181956#M91257</guid>
      <dc:creator>sowm18</dc:creator>
      <dc:date>2008-04-17T13:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181957#M91258</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Use the 'Term::ReadKey' module.  You will probably need to fetch it from CPAN.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;..JRF...</description>
      <pubDate>Thu, 17 Apr 2008 13:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181957#M91258</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-17T13:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181958#M91259</link>
      <description>Hi james,&lt;BR /&gt;&lt;BR /&gt;Using that CPAN Module we can change the terminal settings but,there is no solution for my Question.&lt;BR /&gt;again my question is, when the user types the password from keyboard ,on the screen it should be encrpted as *****.&lt;BR /&gt;We can disable the display completely by using system("stty -echo"),But i donast want that ,instead it should display as **** form.&lt;BR /&gt;If possible please help me with the line of code which solves my question.&lt;BR /&gt;Thanks in Advance,&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;BS</description>
      <pubDate>Fri, 18 Apr 2008 17:25:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181958#M91259</guid>
      <dc:creator>sowm18</dc:creator>
      <dc:date>2008-04-18T17:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181959#M91260</link>
      <description>&lt;!--!*#--&gt;Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Using that CPAN Module we can change the terminal settings but,there is no solution for my Question.&lt;BR /&gt;&lt;BR /&gt;On the contrary:&lt;BR /&gt;&lt;BR /&gt;# cat ./hidepw&lt;BR /&gt;#@(#)hidepw $ Hide password prompt - JRF $&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use Term::ReadKey;&lt;BR /&gt;$SIG{HUP}  = 'IGNORE';&lt;BR /&gt;$SIG{INT}  = 'IGNORE';&lt;BR /&gt;$SIG{QUIT} = 'IGNORE';&lt;BR /&gt;$SIG{TERM} = sub { ReadMode 'restore'; exit 0 };&lt;BR /&gt;my $char;&lt;BR /&gt;my @password;&lt;BR /&gt;print "Enter password: ";&lt;BR /&gt;ReadMode 'noecho';&lt;BR /&gt;ReadMode 'raw';&lt;BR /&gt;while ( $char = ReadKey 0 ) {&lt;BR /&gt;    last if $char eq "\n";&lt;BR /&gt;    next if ( ord($char) &amp;lt; 040 or ord($char) &amp;gt; 0176 );&lt;BR /&gt;    push @password, $char;&lt;BR /&gt;    print '*';&lt;BR /&gt;}&lt;BR /&gt;ReadMode 'restore';&lt;BR /&gt;print "\n";&lt;BR /&gt;print "&amp;gt;", @password, "&amp;lt;\n";&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./hidepw&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 18 Apr 2008 17:31:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181959#M91260</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-18T17:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181960#M91261</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for ur Immediate reply.&lt;BR /&gt;I got to know.its like reading character by character and displaying as * for every character.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--BS&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Apr 2008 17:54:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181960#M91261</guid>
      <dc:creator>sowm18</dc:creator>
      <dc:date>2008-04-18T17:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181961#M91262</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I got to know. its like reading character by character and displaying as * for every character.&lt;BR /&gt;&lt;BR /&gt;Yes, that is the underlying mechanism using getc().&lt;BR /&gt;&lt;BR /&gt;By the way, welcome to the Forums.  If you are happy with the responses you received, please read the following about assigning points:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 18 Apr 2008 17:59:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181961#M91262</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-18T17:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181962#M91263</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for letting me know about the Points.&lt;BR /&gt;&lt;BR /&gt;Regarding the above query i tried using your code .it was working with some abnormality.&lt;BR /&gt; i.e after entering the pwd if we hit "Enter Key" immediatly it will not come out from loop.again we need to hit the key for 3 to 4 times then its coming out from loop.&lt;BR /&gt; please find below chunk of code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use Term::ReadKey;&lt;BR /&gt;my $char;&lt;BR /&gt;my @password;&lt;BR /&gt;print "Enter password: ";&lt;BR /&gt;ReadMode 'noecho';&lt;BR /&gt;ReadMode 'cbreak';&lt;BR /&gt;&lt;BR /&gt;while ( $char = ReadKey 0 ) {&lt;BR /&gt;    if($char eq "\r") {&lt;BR /&gt;    last;&lt;BR /&gt; }&lt;BR /&gt;      push @password, $char;&lt;BR /&gt;      print '*';&lt;BR /&gt;}&lt;BR /&gt;ReadMode 'restore';&lt;BR /&gt;print "\n";&lt;BR /&gt;print "&amp;gt;", @password, "&amp;lt;\n";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;BS.</description>
      <pubDate>Wed, 30 Apr 2008 07:28:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181962#M91263</guid>
      <dc:creator>sowm18</dc:creator>
      <dc:date>2008-04-30T07:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: regarding password encryption in perl into *****</title>
      <link>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181963#M91264</link>
      <description>&lt;!--!*#--&gt;Hi (again):&lt;BR /&gt;&lt;BR /&gt;Try this version:&lt;BR /&gt;&lt;BR /&gt;# cat ./hidepw&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;#@(#)hidepw $ Hide password prompt - JRF $&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use Term::ReadKey;&lt;BR /&gt;$SIG{HUP}  = 'IGNORE';&lt;BR /&gt;$SIG{INT}  = 'IGNORE';&lt;BR /&gt;$SIG{QUIT} = 'IGNORE';&lt;BR /&gt;$SIG{TERM} = sub { ReadMode 'restore'; exit 0 };&lt;BR /&gt;my $char;&lt;BR /&gt;my @password;&lt;BR /&gt;print "Enter password: ";&lt;BR /&gt;ReadMode 'noecho';&lt;BR /&gt;ReadMode 'raw';&lt;BR /&gt;while ( $char = ReadKey 0 ) {&lt;BR /&gt;    last if ( $char  eq  "\012" or  $char eq "\015" );&lt;BR /&gt;    next if ( ord($char) &amp;lt; 040 or ord($char) &amp;gt; 0176 );&lt;BR /&gt;    push @password, $char;&lt;BR /&gt;    print '*';&lt;BR /&gt;}&lt;BR /&gt;ReadMode 'restore';&lt;BR /&gt;print "\n";&lt;BR /&gt;print "&amp;gt;", @password, "&amp;lt;\n";&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Apr 2008 10:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/regarding-password-encryption-in-perl-into/m-p/4181963#M91264</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-30T10:48:23Z</dc:date>
    </item>
  </channel>
</rss>

