Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Fri, Nov 28, 2008 at 22:21, John W. Krahn <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: >> >> On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: >> snip >>> >>> perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' >> >> snip >> >> Perl Golf time: >> >>

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread John W. Krahn
Chas. Owens wrote: On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: snip perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' snip Perl Golf time: perl -le'print map chr+(33..126)[rand 94],1..8' $ perl -le'print map chr+(33..126)[rand 94],1..8' Wa

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Fri, Nov 28, 2008 at 10:28, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8' snip Perl Golf time: perl -le'print map chr+(33..126)[rand 94],1..8' -- Chas. Owens wonkden.net The most important skill a programmer can have

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread Chas. Owens
On Thu, Nov 27, 2008 at 15:04, Yimin Rong <[EMAIL PROTECTED]> wrote: > wget -q -O - "http://random.org/integers/? > num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne > 'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"' > > wget reads web pages > random.org generates rand

Re: One liner to generate truly random passwords from command line

2008-11-28 Thread John W. Krahn
Yimin Rong wrote: wget -q -O - "http://random.org/integers/? num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne 'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"' You can simplify the perl part to: perl -lane'print map chr hex, @F' Or just using perl: perl -MLWP::