Skip to main content

Posts

Showing posts with the label script

The Keymaker: Simplifying Your Personal SSH Key Management

Image from here . Screen shot from film The Matrix Reloaded If you are like myself, and ssh into multiple remote machines, or even simply use Github over ssh this is for you. The Problem SSH has a lot of settings you can use, but when you're a relatively new developer you're not going to go mucking around in a config file you don't need to when there's work to be done! There are also security concerns with some settings, and issues if you have a lot of ssh keys. Also typing long username@domain strings can be annoying. The Solution The Keymaker   o——m , a small script (fewer than 250 lines) to help create ssh keys for remote machines. What does it do? First it helps you create a config file. If one exists already it will rename it with the suffix ".BACKUP". By default all ssh connections will show a randomart image ( VisualHostKey yes ) based on the public key provided by the host. This randomart image can be used to visually identify t...

Script to create full CVS Changelogs

Background CVS Commit histories are saved file-by-file. In my coursework we were required to use a CVS repository to create a group project. Why did I do this? I didn't like having to check individual files to find out what's been changed so I did some looking and found cvs2cl that would create a changelog. How I solved the problem Luckily I have a Raspberry Pi sitting around so I created this script to automatically create full changelogs each time a new commit was found. (Mine checks every 15 minutes for new commits). Several things one would need to do to replicate this setup. 1) Checkout the project from the CVS repo manually 2) Update the regex on line 15 to match the username naming scheme 3) Install cvs2cl 4) Install/setup exim4 (which allows me to send email through my secondary Gmail account) 5) Change YOU@DOMAIN.COM to the email you wish the log to be sent to. 6) Edit crontab to have the script run automatically (or set it up some other way) NOTE...

Offline Password Creator

UPDATE : Please read my update on password security , as this post is no longer good advice but will be left up for archival purposes. Inspired by the xkcd comic Password Strength , I decided to write a python script that will create a password encryption scheme. from xkcd.com The problem I have with idea of choosing four random words is the fact that you still want a different set for each website (in case of attacks). My solution was to create a list with a word associated with each letter from A to Z. The python script takes input from the given word list (aka dictionary) and randomly selects words for each letter and then spits out into a text file. It's quite easy to change the dictionary file just edit the line  filename = "crossword_wordlist.txt" to the file name you want. However the file must contains words that start with each letter (they do not have to be in order though). The seed for the random number generator is based on the current ...