Thursday, December 3, 2015

Automating Password Management

I have a password that I don't particularly need to be super secret, but I don't really want to memorize another password either.

I  put together a script that will automatically copy the password to the clipboard (essentially a Control + C command of text). I threw this into a project folder and I can run the script quickly by double clicking it.

For the sake of slight security, I named the file something boring and unrelated.

Code

from Tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append('password')
r.destroy()


Setup

  • Install Python if it's not already installed
  • Copy the code above
  • Paste into Notepad or another text editor
  • Replace the highlighted password with your own password
  • Save as type: All Files (*.*)
  • File Name: "SomeFileName.py"
    • Wrapping the filename in quotes ensures the file type will be set to .py - a python script file
  • Double click on the file to run it. A Python window will briefly open and close automatically
  • Navigate to a text area and hit Ctrl+V or use some other paste command

1 comment:

Anonymous said...

Hi,
what is your opinion to use KeePass combined with other tools?

http://www.matusbankovic.com/keepass-combined-with-other-tools/