Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Crack the Passphrase! Each group has been assigned a unique passphrase. Visit th

ID: 665415 • Letter: C

Question

Crack the Passphrase!

Each group has been assigned a unique passphrase. Visit this page:

http://cgi.soic.indiana.edu/~johfdunc/password.html

The page links to a word list and explains how the passphrases were generated. You’ll need to write code similar to the Safe Cracker (Lecture 24) to discover your group’s passphrase. When each group guesses their passphrase, it will be recorded here:

http://cgi.soic.indiana.edu/~johfdunc/pw_guesses.txt

You’ll need to write a program to load the word list (use a local copy OR the online version) (10 points), search all possible combinations (30 points), and print out a message to alert you to when the correct passphrase is found (10 points).

(10 point BONUS) Find the correct passphrase for your group. You don’t need to submit it – we’ll see it in the log file if your group guesses the passphrase correctly. I don’t recommend trying this search randomly! There are enough words that if you can check 10 words per second, searching the entire space (without duplication) will take a single program up to 1 day.

Should be written in Python

Explanation / Answer

import itertools from multiprocessing import Process, Manager dictionary_file = '/usr/share/dict/words' letter_list = ['t','b','a','n','e','a','c','r','o'] control_letter = 'e' manager = Manager() word_list = manager.list() def new_combination(i, dictionary): comb_list = itertools.permutations(letter_list,i) for item in comb_list: item = ''.join(item) if(item in dictionary): word_list.append(item) return def make_dictionary(): my_list = [] dicts = open(dictionary_file).readlines() for word in dicts: if control_letter in word: if(len(word) >3 and len(word)