Question: Here is a dictionary that contains 5 sha1 hash values. These hash values were created by hashing hex values (as strings) as provided in the

Here is a dictionary that contains 5 sha1 hash values. These hash values were created by hashing hex values (as strings) as provided in the example. All originated from numbers smaller then 1,000,000. 1. Can you complete the dictionary and replace the ?? by the original values? If so, create a function "get_hash_dict()" that returns the completed dictionary. 2. Can you create a second function named "get_integer_values()" that returns a list (ordered from small to large) of the integer values instead of the hex values?

import hashlib

d = {}

d['208f1a0c208342372b75d914b6c098d626becf07'] = "??"

d['61fc7fbf6b24ff258633dad73f13f9bd66a2477f'] = "??"

d['8a57a79d7a9921cd2344e7295dc72359780e9f9d'] = "??"

d['bba1db3a9d5ba9f72b91312e730a9612dfdea053'] = "??"

d['350d5bf1074e5557367a24ae9e07ab65aacfc031'] = "??"

#here is an example on how to use hashlib

value = "0x5FA"

value = value.encode("utf-8")

print(hashlib.sha1(value).hexdigest())

def bruteforce(): #here goes your code but this function should be never called on the #system here

return []

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!