Last active
November 2, 2021 13:30
-
-
Save hon1nbo/f041c326a2b0da60dcfd95a694c36f8d to your computer and use it in GitHub Desktop.
If you have to call fidelity over the phone you have to do this stupid thing where you enter your password as numbers on the phone pad. This negates the value of most special characters (other than '*') and capital letters. Hopefully it's monitored like crazy. For those of us with complex passwords where entering them in will take longer to proc…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import sys | |
# script only works with python 3.x | |
if sys.version_info[0] < 3: | |
raise Exception("Must be using Python 3") | |
# Convert a character to a phone keypad number | |
def getNumber(character): | |
key_alph='abcdefghijklmnopqrstuvwxyz' | |
key_num= '22233344455566677778889999' | |
if character.isalpha(): | |
return key_num[key_alph.index(character)] | |
else: | |
if character.isdigit(): | |
return character | |
else: | |
return '*' | |
print("This generates a phone password for a Fidelity password") | |
password = input("Enter your Fidelity Password:") | |
teleOut = '' | |
# Make all letters lowercase for lookup table compare | |
password = password.lower() | |
for i in range(0,len(password)): | |
teleOut += getNumber(password[i]) | |
print(teleOut) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment