digininja/pipal — pull request #9 by odd-meta (2013-05-31 01:18:24+00:00)
Title: password list read in optimizations, etc

Modified to read the password list in entirety into an array at the start of the main loop. Running on a 18 million password list this seemed to cut run time in half, from about twenty hours to a little less than ten hours. This does increase the memory usage of the the script, but for me the run time improvement was worth on large lists. For an anchor of comparison, the 18 million password list caused ruby's process to eat up one gig of ram immediately as it loaded the list into memory. As analysis progressed memory usage got up to around three gigs.

Also changed the method of line counting for time estimation, since we have the array there already; added a run time measure for the main loop.