Thanks,
Bob
Of course you could base it on the time which you can query using some VimL
functions as well.
It all depends on your security requirements.
Marc Weber
One should be able to gin up a password generator with it and nr2char().
Regards,
Chip
Just wondering if anyone has done a password generator using a
vimscript function?
The best passwords include the most character possibilities. This
crazy notion websites/software have of restricting them to certain
characters or counts only means less security because they are more
easily guessed.
But one can always use a random generator to replace the
"non-acceptable" characters one by one, looping until you get one that
"fits".
--
Steve Hall [ digitect dancingpaper com ]
Part of it was curiosity that it could be done. Also, like vim, I am
on multiple OS platforms and it would be nice just to have.
Bob
* lith <mini...@gmail.com> [2011-12-16 12:32]:
> Is there a reason why you don't want to use a specialized
> app that gives you more options with respect to which
> characters the password should include etc.?
> :r !pwgen
speaking of which:
Password Generators: apg, gpw, pwgen, makepasswd
on some systems there's $PROGRAM - but the
user has no power to install other programs.
that's usually a case for asking whether
$PROGRAM also has $FOO installed somehow.
still, when there is a connection to the world
then you should probably use an ssh or vpn client
to escape the hell of the local jail and simply
do your stuff on your own account/machine. :)
Sven
It's true that larger character sets diminish the ability to
brute-force the password, but length is also a factor. And
there's the ability to remember that password without writing it
down. A password that has 25 alphanumeric characters beats the
pants off an 8-character mixed-printable in terms of time to
complete. Steve Gibson (security guy) goes so far as to suggest
keeping some secret thing you can repeat to pad out your length,
such as adding 15 ampersands or 8 period-followed-by-comma pairs
after your password to give it extra length.[1]
That said, if you run vim with +python built in, you can use this
one-liner:
:python import random as r, string as s, vim as v; v.command('let
@"="'+(''.join([r.choice(s.printable.replace('"', '')) for i in
range(10)]))+'"')
which will preload the scratch register with a random password of
length 10 (in this case) chosen from printable-characters (minus
the double-quote for simplicity instead of escaping). You can
then paste that just as you would anything you've yanked.
-tim
[1] https://www.grc.com/haystack.htm
Regards,
Chip Campbell
Off topic for Vim, but it's worth knowing that length
compensates for the use of a small character set.
One of the best systems is Diceware where you use a random
number generator (a set of dice) to pick a word from a publicly
available list of 7776 words. Your only decision is how many
words to pick. Each word is equivalent to 12.9 random bits, so
five words is the same as picking 8 random characters, each of
which ranges from 0 to 255 (64 random bits).
The five words are longer than 8 characters, but easier to
remember and to type.
http://en.wikipedia.org/wiki/Diceware
John
The best passwords include the most character possibilities. This
But one can always use a random generator to replace the
"non-acceptable" characters one by one, looping until you get one that
"fits".
Some more sophisticated password generators can generate passwords that are somewhat pronounceable and thus easier to remember. One could of course ask whether that is an advantage or not.
--
Joan Miquel Torres__________________________________
Linux Registered User #164872
http://www.mallorcaweb.net/joanmiquel
BULMA: http://bulma.net http://breu.bulma.net/?l2301
If you don't use a US keyboard it's best to avoid characters that differ
on your keyboard. I've been caught out a couple of times like that, when
an upgrade changed my default keyboard and I found my password no longer
worked. I now avoid using, for example, # and @.
--
Anthony Campbell - a...@acampbell.org.uk
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell