Question: Problem 3 The variables hash 4 and hash 5 contain two mystery hashes. I'll give you a hint: they are constructed by taking a word
Problem
The variables hash and hash contain two mystery hashes. I'll give you a hint: they are constructed by taking a word from the rockyou list and appending a single digit. For example, morgan or shadow This is a common thing people to do choose "good" passwords. But they are easy to crack because it's such a predictable pattern.
Write a function to solve this problem for you. Paste your solutions into the word and word variables, respectively. You can name the function whatever you want; the function itself won't be checked.
hashcebdccddab
hashfbfefcbeccd
# You may need this to help solve the problem
digits b b b b b b b b b b
def crackhashwithdigitsuffixtargethash:
digits b b b b b b b b b b
for word in crackhashwithdigitsuffix:
for digit in digits:
plaintext word.encode digit
hashed mdplaintexthexdigest
if hashed targethash:
return plaintext
return None
# Paste your solution here
word crackhashwithdigitsuffixhash
word crackhashwithdigitsuffixhash
TypeError Traceback most recent call last
in
# Paste your solution here
word crackhashwithdigitsuffixhash
word crackhashwithdigitsuffixhash
in crackhashwithdigitsuffixtargethash
def crackhashwithdigitsuffixtargethash:
digits b b b b b b b b b b
for word in crackhashwithdigitsuffix:
for digit in digits:
plaintext word.encode digit
TypeError: 'function' object is not iterable
# Run this cell to check your answers
from functools import reduce
import operator
assert reduceoperatormul, wordxffffe
assert reduceoperatormul, wordxffffe
NameError Traceback most recent call last
in
from functools import reduce
import operator
assert reduceoperatormul, wordxffffe
assert reduceoperatormul, wordxffffe
NameError: name 'word is not defined
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
