Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Something like this produces pseudo-random vaguely memorable char sequences. For default passwords I just tend to pick one that is easy to remember from a dozen options:

#!/usr/bin/perl; srand( time() ^ ($$ + ($$ << 15)) ); my @v = qw ( a e i o u y ); my @c = qw ( b c d f g h j k l m n p q r s t v w x z ); for (1..12) { my ($flip, $str) = (0,''); $str .= ($flip++ % 2) ? $v[rand(6)] : $c[rand(20)] for 1 .. 9; $str =~ s/(....)/$1 . int rand(10)/e; $str = ucfirst $str if rand() > 0.5; print "$str\n"; } __DATA__ Fuco1wipon name5jeweb Vute2tecis Paco8podec wopu3wasig lune2fosuk Same2jamek Qeqy0nebit rizi5muwuj Qone7tatat Daho7cejab fesi2jideq

This algorithm produces 2*20*6*20*6*10*20*6*20*6*20 or around 82 billion permutations so it is quite feasible to brute force it though quite time consuming. 26**8 is around 208 billion so there is similar (order of magnitude) complexity to a random 8 char same case alphabetic string but far more memorability.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Random string generator by tachyon
in thread Random string generator by ibanix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-16 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found