Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

I have a python script that should create 2 files that should have extracted the password and the line the password was on. The yahoo

image text in transcribedI have a python script that should create 2 files that should have extracted the password and the line the password was on. The yahoo algoritham, I just need a way to write to the same line. The Linkedin algoritham doesnt seem to write anything. Can you let me know if it was flawed or just the rockyou.txt doesnt have any password?

import hashlib def dictionarySHAl with open ("xeekvau.txt") as rockyou: temp line.encode () if hashedinput: for line in rockyou: hashed = (hashlib. shal (temp)) .hexdigest() return line else: return 'trying another def yahoo) with open ("password. file") with open("yahoo passwords decrypted.txt", ") as output: as input: # open password file create decrypted file for line in input: # go line by line in the password dump if line.startswith ("328") and ".com" n line: # start from the first line with passwords if ".com" or " .net" or ".org" or ".edu" in line: # check for common email ending and get password comtemp-line[line.find (". com")+5: output . write (line), output .write (contemp) # write to new file output.close() # close new file input .close() #close password.file 27 def linkedin): with open("SHA1.txt") as input: with open("Zinkedin Decrypted.txt","w") as output: for line in input: temp-line.encode () unhashed-dictionarySHA1 (temp) print (unhashed) if unhashed!-'trying another: output.write (line) output.write (unhashed) 38 name main yahoo () linkedin

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_2

Step: 3

blur-text-image_3

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

More Books

Students explore these related Databases questions