Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Programming Language Your Assignment Write a Python program that: 1. Ask the user to enter a password with length of 4 . 2. Crack
Python Programming Language
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 ( !@#$%^&*0) 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: Password Strength Number of Tries Lowercase Upper + Lowercase 21382 Upper + Lowercase, digits, 4892873 symbols Time Elapsed 0.2s 15s 4m30s How do I calculate time elapsed in Python? Sample program: 1 #!/usr/bin/python 3 # Import the datetime library to use its functions from datetime import datetime now = datetime.now() 00 vai ############################### # your password cracking program # ################################## 11 12 13 14 15 16 # Get the current time after your program runs, subtract it from the initial time later = datetime.now() diff - (later - now).total_seconds() # 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started