Password trainer software

I screwed it up again.

I logged into one of my e-mail accounts from a shared computer owned by someone else. This is something I never do (unless there’s a top urgency) because I fear keyloggers. So now, time has come to change the passwords. Next factor of two factor authentication will keep me protected, but still need to fix the first factor.

I know one silly things people would do, especially when password expiry is in place. The first password will be ‘password‘, then after two months it will become ‘passwore‘, next ‘passworf‘, ‘passworg‘, and so on. But this isn’t the time for that game. By any chance if my password has been key-logged, it’s all in bare naked form.

And that’s how I had to compose a new set of passwords. That wasn’t easy. I’m not going to tell how they were constructed but they are lengthy and look like garbage. Now, I need to train my fingers for the new passwords so I won’t forget them easily, and because enough speed will hide it from shoulder surfers. (I never write them down on sticky notes)

So that’s how this idea came along: A JavaScript based password trainer. It’s very simple and all you need is to use your web browser (Chrome/ Firefox).

First, go to the URL ‘about:blank‘. This is important – do not try this while you are in any web page that you can’t trust.

Open your web browser’s developer tools (F12 for Firefox & Chrome), or may be Firebug, and switch to the Console.

Copy-paste the following JS code there, and replace the text ‘mypwd’ in the following JS code with your complex, garbage-like password. Execute it!

If you successfully type in your password more than 25 times and keep success rate above 95%, it will stop looping through.

success = 0;
fail = 0;
while (true) {
  password = "mypwd";
  if (success > 25 && (success/(success+fail)) > 0.95) {
    break;
  }
  match = prompt ('Please enter password\nSuccess: ' + success + '\nFail: ' + fail);
  if (match == password) {
    success = success + 1;
  } else {
    fail = fail + 1;
  }
}
alert ('Your fingers are now trained!');

I wish if I could fix something like this into my cheap acoustic guitar. 🙂

Advertisements

2 thoughts on “Password trainer software

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s