Thread Frage zu Password und Kodierung (8 answers)
Opened by Kuerbis at 2013-01-15 20:33

Kuerbis
 2013-01-16 11:12
#164972 #164972
User since
2011-03-20
947 Artikel
BenutzerIn
[default_avatar]
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env perl
use warnings;
use strict;
use 5.10.1;
use utf8;
use open qw( :encoding(UTF-8) :std );
use Devel::Peek;
use Term::ReadPassword;
use Term::ReadLine;
my $term = Term::ReadLine->new( 'table_watch', *STDIN, *STDOUT );
$term->ornaments( 0 );


print 'Enter: ';
my $a = <>;
chomp $a;

my $b = read_password( 'Enter: ', 0, 1 );

my $c = $term->readline( 'Enter: ' );

Dump $a;
Dump $b;
Dump $c;

say $a;
say $b;
say $c;


Jeder von diesen gibt etwas anderes zurück. Könnte es sein, daß das - ohne weitere Nachbearbeitung - bei einer Passworteingabe zu Problemen führen kann?


Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Enter: ü
Enter:
Enter: ü
SV = PV(0x1294100) at 0x13f4118
REFCNT = 1
FLAGS = (PADMY,POK,pPOK,UTF8)
PV = 0x141b390 "\303\274"\0 [UTF8 "\x{fc}"]
CUR = 2
LEN = 80
SV = PV(0x11f05c0) at 0x13f20c8
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x159f020 "\303\274"\0
CUR = 2
LEN = 16
SV = PV(0x11f0420) at 0x13f1fc0
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x1593100 "\374"\0
CUR = 1
LEN = 16
ü
ü
ü

View full thread Frage zu Password und Kodierung