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

Kuerbis
 2013-01-16 19:30
#165004 #165004
User since
2011-03-20
947 Artikel
BenutzerIn
[default_avatar]
Jetzt habe ich versucht, alles zusammenzutragen, damit alle Dumps etwas ähnliches ausgeben.

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
29
30
#!/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 );
use Encode qw(decode_utf8);
$b = decode_utf8( $b );

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

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

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


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(0x27a2610) at 0x2902628
REFCNT = 1
FLAGS = (PADMY,POK,pPOK,UTF8)
PV = 0x2618c60 "\303\220"\0 [UTF8 "\x{d0}"]
CUR = 2
LEN = 80
SV = PV(0x26fead0) at 0x29005d8
REFCNT = 1
FLAGS = (PADMY,POK,pPOK,UTF8)
PV = 0x2aae310 "\303\220"\0 [UTF8 "\x{d0}"]
CUR = 2
LEN = 16
SV = PV(0x26fe910) at 0x2900548
REFCNT = 1
FLAGS = (PADMY,POK,pPOK,UTF8)
PV = 0x2929dd0 "\303\220"\0 [UTF8 "\x{d0}"]
CUR = 2
LEN = 16
Ð
Ð
Ð

View full thread Frage zu Password und Kodierung