Generating Random Passwords 3 – Untypable Characters

In the last post, Generating Random Passwords 2 – Controlling the Character Pool , we were able to customize the character pool for passwords on the fly. Since we are talking about passwords for one piece of software to talk to another software, the character pool does not need to have characters that are on our keyboard.

So, let’s try extending our password generator to be able to generate untypable characters.

So first, let’s make the function that will have the pool of untypable characters in it. This function will go into RandomPassword.php

Those are some sweet untypable characters! I used an ASCII code sheet, the new characters are code points 128-255.

And now to call it, I will just add a flag “–u” to the application.

That is all we need to be able to generate random passwords with the extra untypable characters.

Would you look at that? I do not have most of those characters on my keyboard. I’d be willing to bet that someone trying to crack this password may not try some of these characters.

Note: In some consoles, this will happen.

I have no idea, yet, as to what is causing this. I get the invalid character marker with Windows 8.1 and Ubuntu 17.04, but Windows 7 is fine. It may have something to do with the PHP version, I’m running 7.0 on Windows 7, and 7.1 on both Windows 8.1 and Ubuntu. More experimentation is needed!

The repository for this post can be found on GitHub here .

The repository for this post can be found on GitLab here .

The repository for this post can be found on Lupe Code’s GitLab mirror here .