Home / Expert Answers / Computer Science / create-a-nbsp-python-program-that-can-34-crack-34-a-password-by-guessing-and-checking-all-possible-c-pa658

(Solved): Create a Python program that can "crack" a password by guessing-and checking all possible combi ...



Create a Python program that can "crack" a password by guessing-and checking all possible combinations of letters and numbers (i.e., "strings"). When users run your program, they will input the name of a file that contains one or more username and password hashes (i.e., encrypted passwords). For each hash, your program will generate all possible combinations of letters and numbers (up to 8 characters; upper/lower case letters and numbers) in order to find a string that produces an identical hash value. Your program will save these "cracked" passwords and write them to an output file.

Focus on breaking down the big problem into smaller, more manageable tasks. While you are free to tackle this problem howeverPython \( 3.7 .5 \) (bundled)
>>\% \%Run pex2_solution_v2.py
What is the name of the password file? passwords_easy .txt Where

Focus on breaking down the big problem into smaller, more manageable tasks. While you are free to tackle this problem however you wish, here is one possible set of milestones that will get you from start to finish. - Milestone 1: Open the password file and extract the usernames and password hashes - Chapter 7's content describes how to open and read a file. You must handle the situation where the user enters a file name that does not exist and handle this accordingly. - Remember that the split() function lets you divide a string into components based on a character. What character could you use to extract the username and password values from each line? (HINT: Open the password file with notepad!) - Milestone 2: Create a function that accepts the password hash as a parameter, and returns the string whose hash value matches - Your function needs a list that keeps track all possible password characters (e.g., [' ', 'a', 'b', ... ]). It is highly recommended that you start your list off with the space character. If you do not, your program will start guessing from "aaaaaaa" instead of "a". This will dramatically increase the amount of time it takes for you to crack a password (i.e., you may not get it done this semester). - Look at prior programming exercises to see how we can generate all possible strings using a list. You will need to expand this solution to generate all passwords from \( 0-8 \) characters in length. - Look at the course Python Reference Sheet to show how you can combine characters into a single string (look under Output-it's called concatenation). - Look at the documentation to see how you can calculate the hash of a string - Milestone 3: Call your function for each of the password hashes in the input file - Do NOT try to make a function that can calculate all the passwords at once. Just make one that can crack a single password, and call it for each line in the password file - Milestone 4: Create an output file and print the usernames/passwords to it - Chapter 7's content also describes how to write to a file Python \( 3.7 .5 \) (bundled) >>\% \%Run pex2_solution_v2.py What is the name of the password file? passwords_easy .txt Where should the passwords be listed? passwords_cracked_easy-txt Attempting to crack password hash: c2f7ab46df 3db842040a86a0897a5377 PASSWORD FOUND: aad Attempting to crack password hash: \( 521 f 46 \) fd4a7aee3efec387c31967ba7f PASSWORD FOUND: LTC Attempting to crack password hash: fc79aa9a96e7f005de7dd10e37aa2c8c PASSWORD FOUND: af 1 PROGRAM COMPLETE! Results written to: passwords_cracked_easy-txt


We have an Answer from Expert

View Expert Answer

Expert Answer


please follow the below code to get your solution here is your python code: import random target_password = str(input("Enter the password you wish to
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe