I use different, randomly generated passwords for all my accounts. I have used a website to generate those before, but today I wrote a small script to handle this job. The main idea is based on this StackOverflow question, which I adapted and extended to suit my needs. It’s probably not completely cryptographically safe as pointed out by some reactions in the thread linked above, but it is for sure good enough for my application.
This script can be executed as a command line script and if executed with
-v it will print a password from letters and characters, and a second one also including symbols. Optionally the length can be changed using
More useful, I set a custom keyboard shortcut to execute this script, and the call to
pyperclip.copy() will load the generated password in my clipboard, so I can conveniently paste it, wherever I need it.