0
I'm a big user of https://www.grc.com/passwords.htm to get strong passwords. However, having to go to the site and manually copy the password every time gets old fast, so I decided to do a little script to do it for me. Every time you reload the page, it presents you with new passwords in plain text, so this is the script.
curl 'https://www.grc.com/passwords.htm' | grep '63 random printable ASCII characters:' | sed 's/^.*size=2>//' | sed 's/<\/font>.*$//' | pbcopy
Since there's no identifying classes or IDs, I get the page through curl
, pipe it to grep
to get the line I want ("63 random printable ASCII characters:"), and then I use sed
to delete everything up to the password, as well as everything after it, finally copying to the clipboard with pbcopy
.
This all works fine, except for one small detail. The string I get in the end should always be 63 characters long, but it's not. It usually varies between 64, 67, 70 and 73 and I have no idea why.
Can anyone shed any light on this?
I seriously wouldn't trust a server-side generated password. – Dennis – 2012-12-29T20:02:35.633
That is of course your choice, but we're not talking about amateurs here, we're talking about extensive knowledge and research. Just read the first few lines on the page, and you'll see why it's safe. – user137369 – 2012-12-29T20:14:37.210
The design seems sound. The problem is that the server generated the password. That means they know it. – Dennis – 2012-12-29T20:16:15.283
@user137369 The danger is in the remote provider storing the generated passwords (for any reason) or someone intercepting network traffic (again, for any reason). No matter how clever the generation algorithm is in getting really random bits, you're opening yourself to e.g. "dictionary" ("all passwords generated by GRC in 2012") attacks. – Daniel Beck – 2012-12-29T20:16:17.970
Please read the website (most of it is interesting for this subject), but again, even the first lines answer those concerns. Cracking 63 characters is not even realistically feasible by today's standards, and even if you could get "all passwords generated by GRC in 2012" (which you cannot), since they're used in different websites that themselves hash it, you'd need impossibly long rainbow tables and combinations to do it. Furthermore, the page can only be shown if a secure connection is available. – user137369 – 2012-12-29T20:35:18.000
Has for them storing it, that would serve no purpose, but even if they did, they'd still be incredibly though to crack, it's the same as trusting a service like LastPass to generate secure passwords, they could also keep those if they wanted, but it'd be pretty useless. Most of us are not the president of a nation, and there's no reason to be specific targets. Most website password attacks in 2012 were possible due to the website's lack of security, and there's enough weak passwords to go around, no one bothers with the incredibly strong ones, there's no return on time/resources invested. – user137369 – 2012-12-29T20:35:52.760