Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Specifications Develop a python program (please show a picture of your code) that implements the two password cracking methods and allows the user to crack

Specifications

Develop a python program (please show a picture of your code) that implements the two password cracking methods and allows the user to crack .zip (archive) files.

The first task is to implement a driver loop that prompts the user for which file cracking method theyd like to use (brute force, dictionary, or both). After determining which method the user would like to use, call the respective function(s) and show the time each function took to run. The user should be able to quit by typing q. If the attack is both, do a dictionary attack first and do a brute force attack only if the dictionary attack failed.

The second task is to develop a brute force function that generates a strings containing a-z (all lowercase) of length 8 or less as the password to attempt (Hint: start small trying small passwords first). For example ,your string should start out with a, then b, then c, so on and so forth. When you get to z change the first character back to a and append another letter so your string becomes aa then ab. Once the password is cracked you should display the password to the user. Hint: see notes below about itertools.

The third task is to then develop the dictionary function. After you have prompted for the name of the dictionary file and the target .zip file your function should go through every line (one password per line) and try opening the .zip file. If it opens successfully, then again, display the password to the user. If you try all the passwords in the source file, display an appropriate error message. Hint: remember to strip() the word read from the file before trying it as a password!

The fourth and final task for this project is a research question. With this project we are providing you with two password protected .zip files. On behalf of the Computer Science Department you have our full permission to attack these two specific files for demonstration and educational purposes only. Breaking into secure computer systems is illegal in the US. (most other countries have similar laws). Your research question is to find out what US federal law youre breaking if you decide to do this without permission. Your program should warn the user what the name of the law is, and what the maximum penalty is before prompting for input. Assignment Notes You are also not allowed to use sets, lists, tuples, or dictionaries

Test Case 1

Cracking zip files.

Warning cracking passwords is illegal due to law XXXXX

and has a prison term of XXXXX

What type of cracking ('brute force','dictionary','both','q'): dictionary

Dictionary Cracking

Enter dictionary file name: rockyou.txt

Enter zip file name: dictionary_attack.zip

Dictionary password is XXXXXX

Elapsed time (sec): 0.2016

What type of cracking ('brute force','dictionary', 'both', 'q'): q

Test Case 2

Cracking zip files.

Warning cracking passwords is illegal due to law XXXXX and has a prison term of XXXXX

What type of cracking ('brute force','dictionary','both','q'): brute force

Brute Force Cracking

Enter zip file name: brute_force.zip

Brute force password is XXXXXX

Elapsed time (sec): 3.0039

What type of cracking ('brute force','dictionary', 'both', 'q'): q

Test Case 3

Cracking zip files.

Warning cracking passwords is illegal due to law XXXXX and has a prison term of XXXXX

What type of cracking ('brute force','dictionary','both','q'): dictionary

Dictionary Cracking

Enter dictionary file name: xxx

Enter dictionary file name: rockyou.txt

Enter zip file name: xxxx

Enter zip file name: yyyy

Enter zip file name: dictionary_attack.zip

Dictionary password is XXXXXX

Elapsed time (sec): 0.1957

What type of cracking ('brute force','dictionary', 'both', 'q'): q

Test Case 4

Cracking zip files.

Warning cracking passwords is illegal due to law XXXXX and has a prison term of XXXXX

What type of cracking ('brute force','dictionary','both','q'): q

Test Case 5

(In Test Case 5 use the short dictionary and the brute_force.zip file so the dictionary attack fails and doesnt take forever to do soforcing the brute force attack to be needed.)

Cracking zip files.

Warning cracking passwords is illegal due to law XXXXX and has a prison term of XXXXX

What type of cracking ('brute force','dictionary','both','q'): both

Both Brute Force and Dictionary attack.

Enter dictionary file name: short_dict.txt

Enter zip file name: brute_force.zip

No password found.

Dictionary Elapsed time (sec): 0.0188

Brute force password is XXXXXX

Brute Force Elapsed time (sec): 2.9494

What type of cracking ('brute force','dictionary', 'both', 'q'): both

Both Brute Force and Dictionary attack.

Enter dictionary file name: rockyou.txt

Enter zip file name: dictionary_attack.zip

Dictionary password is XXXXXX Dictionary

Elapsed time (sec): 0.2314 What type of cracking ('brute force','dictionary', 'both', 'q'): q

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

13-6 How will MIS help my career?

Answered: 1 week ago