This is a direct implementation of an Idea from John Graham-Cuming, plus a few improvements.
I found that a naive random character generator generate special characters too often. That makes passwords typing really tedious. So, I took the liberty to skew the probabilities. Of course, that hurts entropy, but not much.
How to use it
Download the C file, compile it, then run the executable. It reads the random seed from the standard imput, and writes a nice square of random characters to the standard output.
$ gcc passgen.c -o passgen.out $ ./passgen.out </dev/random
/dev/random often runs out of entropy, so this may take a
while. You can accellerate the processus by… launching lots of
others, to feed the random seed. If you're in a real hurry, you can
/dev/urandom. The result comes right away, but isn't truly
random. I don't know whether it's safe (I'm no expert), so be