Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

xkcd-style password generation

by Tanktalus (Canon)
on Feb 01, 2012 at 20:27 UTC ( #951297=CUFP: print w/ replies, xml ) Need Help??

To create a password a la xkcd:

perl -le '@w=<>;chomp@w;print join" ",map{$w[rand@w]}1..4'</usr/share/ +dict/words
But then I get bizarre combinations like "revolutionizer ananda Pleurobrachiidae squaller" - I don't care what xkcd says, I'm not remembering that one. :)

Update: Slightly better, though a bit nasty to whoever owns the domain...

perl -MLWP::Simple -lE '@w=get("http://jbauman.com/gsl.html")=~/^\d+\s ++\d+\s+([a-z]+)/xmsg;say join" ",map{$w[rand@w]}1..4'
which gets me, as an example, "rather weight decay punctual". Much easier to memorise. I think I might keep this one :-)

Comment on xkcd-style password generation
Select or Download Code
Re: xkcd-style password generation
by BrowserUk (Pope) on Feb 01, 2012 at 20:30 UTC
    I don't care what xkcd says, I'm not remembering that one. :)

    It might be worth the effort. I can't imagine anyone guessing or brute forcing that one :)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Just think of a sea creature riding multiple dinosaurs, named Amanda, starting a revolution in the slums. Then apply the corrective tweaks to each element :)
Re: xkcd-style password generation
by JavaFan (Canon) on Feb 01, 2012 at 22:36 UTC
    With a little adaption:
    perl -le '@w=grep{length()>5&&length()<8&&/^[a-z]+$/}<>;chomp@w;print +join" ",map{$w[rand@w]}1..4'</usr/share/dict/words
    Some samples:
    octyl forrad ruble smoked unlit stamp finish stumpy baring pattu helium place tiptop sundri alumni anilla dodge blout spurl fasher lownly setal untar nuchal
    There are 23560 entries in my /usr/share/dict/words that match, giving 308106701416960000 different potential pass phrases. If an attacker can test 1 billion pass phrases per second, it takes almost 10 years to check the entire key space.

    I consider that secure enough for my Perlmonks password.

      > I consider that secure enough for my Perlmonks password.

      perlmonk's password is restricted to 8 characters.

      Cheers Rolf

      Hahaaaa... ++ just for saying "secure" and "Perlmonks password" in the same sentence with a straight face. :-P :-) Plaintext passwords? Hahaha... thanks for that :-)

        Plaintext passwords?

        Someone remind me again; why is it so hard to change that?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: xkcd-style password generation
by ww (Bishop) on Feb 02, 2012 at 13:12 UTC
    But just think how secure that would be if one used a comprehensive dictionary of non-words...
    which dictionary included numbers and symbols as legitimate chars in the aforesaid non-words
    and in another language, perhaps...

      But there is some problem with non-words ... but I just can't seem to remember ... quite what it is ... um ...


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

Re: xkcd-style password generation
by tobyink (Abbot) on Feb 02, 2012 at 15:07 UTC

      Randall Munroe is awesome! A Google search for the phrase "inspired by xkcd" returns over 50,000 hits (including mine).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://951297]
Approved by marto
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2014-09-03 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls