Posts

Showing posts from March, 2018

Sunday afternoon Python: Morse code

Image
... That is to say the code was written on a Sunday afternoon. The publish date of this post may vary. A lazy Sunday afternoon reading about Morse code made me hit upon the idea of a Python script that writes plain text into Morse code, and converts Morse code back to plain text. Some time spent mulling over the idea gave me a list of initial requirements: I would need to map plain text letters back to Morse code (and vice versa), let the user of the script choose between converting plain text into Morse code or vice versa, and take input from the user. Mapping text to Morse code with Python Data Structures  Mapping the plain text letters of the alphabet to Morse code can really be thought of as a pair like relationship between two data sets. In Python, dictionaries are a type of data structure that store key/value pairs - perfect! The 'key' in this instance would be a letter of the alphabet and the 'value' of that key would be its corresponding Morse code. The o

501 million 'Pwned Passwords'

Image
'Password strength' is a phrase that almost everyone will be familiar with to some degree. There is no universally agreed upon way to measure the strength of a password (this is somewhat part of a wider problem), which leads to every online service having a different system for gauging whether or not a given password is secure enough to be used. Normally, when discussing password security, the conversation will look something like this: "Make all of your passwords at least 16 characters long and never use them more than once" . I am going to take a different approach: I'm going to show you how not to protect yourself online, how to crack weak passwords with little to no effort, and how to check whether a password is already compromised before you use it online. With any luck, you'll be a little wiser about password security by the end of this post. To achieve all of this I'm going to use data from the recently released "Pwned Passwords" l