Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

=+ What is the role of government in bargaining?

Answered: 1 week ago

Question

=+ Who is the negotiation partner at company level?

Answered: 1 week ago

Question

=+Which associations exist?

Answered: 1 week ago