Question: Your Assignment Write a Python program that: 1. Ask the user to enter a password with length of 4 2. Crack the password using a



Your Assignment Write a Python program that: 1. Ask the user to enter a password with length of 4 2. Crack the password using a brute-force attack A Brute-force attack is one that repeatedly tries every possible password until it succeeds. Test the efficiency of your brute force password cracker with three different strengths of password: Only lowercase letters (ex: aabb) Upper and lowercase letters (ex: AbAe) Upper and lowercase letters, numbers, symbols ( !@#$%^&*() ) Input your findings in a table and save the amount of time taken to crack the password Your Assignment Program Output: The cracked password Number of Tries Length of time taken to crack the password Your code must use Python3 and work on Bluenose Output table example: Number of Tries Time Elapsed 0.25 56 Password Strength Lowercase Upper + Lowercase Upper + Lowercase, digits, symbols 21382 15s 4m30s How do I calculate time elapsed in Python? Sample program: 1 #!/usr/bin/python # Import the datetime library to use its functions from datetime import datetime now = datetime.now() ################################## # your password cracking program # ################################## 10 # Get the current time after your program runs, subtract it from the initial time later = datetime.now() diff = (later - now).total_seconds) 14 15 16 # Output will be the difference in seconds print(diff) **Note: cracking the password, especially the last test, may take a while
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
