updated hashcracker

Hi Dan, I found your code on EG and really liked it, I updated some stuff in order to make it DRY!