Thread passwortabfrage (5 answers)
Opened by LE at 2009-10-29 12:06

havi
 2009-10-29 12:29
#127524 #127524
User since
2003-08-04
2036 Artikel
BenutzerIn
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl 

use warnings; 
use strict; 
use Term::Getch; 

my ($in, $psw); 
print "Bitte das Passwort\n"; 

while(1) { 
   $in = getch(); 
   if (defined $in) { 
      last if $in =~ /\r/; 
      $psw .= $in; 
      print "*"; 
   }       
} 
print $psw; 

Last edited: 2009-10-29 12:32:38 +0100 (CET)

View full thread passwortabfrage