Phonetic Passwords

Problem

Have you ever had to communicate a password with someone over the phone? Unfortunately, I have and I usually dread it. When I have to communicate passwords over the phone (thankfully not often) I will usually pull up a NATO phonetic alphabet so I don’t have a Brian Regan moment.

Idea

Today, I got to thinking that I could probably just write a script to process each character in a password string and output the phonetic names. Then I realized that someone has probably already done this. To Google I went and did indeed find someone who had written a script for this very thing. Brandon Amos wrote a small python script called phonetic.py that will spit out the phonetic names of characters in a string of text, no matter the size. Here’s an example:phonetic

New Problem

It’s not perfect for my needs as it doesn’t do any special treatments for numbers/special characters and doesn’t differentiate between capital and lowercase letters. See the treatment of ‘yY’ in the image below. phonetic_fail

Solution

So, I forked Brandon Amos’s repo and created a new file to handle capitals, name the ASCII characters found in good passwords, and even spell out the numbers. This may seem silly since you shouldn’t need to see the word for each number but I wanted this to be as uniform and fool-proof as possible. This is what we get running the same string as before through the new phonetic_password.py file.
phonetic_password

Get the Code

Here’s a direct link to the file: phonetic_password.py

P.S.

If you like the nice screenshots in this post, I made them with Carbon.