Password cracker

Tell us what’s happening:
iv been trying to figure out where im going wrong with this one . iv changed everything so many times , iv went back to our practice and still not sure .

Your code so far

import hashlib
from hashlib import sha1

def crack_sha1_hash(hash):

password = open('r'\'top-10000-passwords.txt')

top_1000= open(top)

for i in range(len(top_1000)):
   if password == password_c:
    return password
  print("Password not found")

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.68.

Challenge: SHA-1 Password Cracker

Link to the challenge:

my output error :

Traceback (most recent call last):
  File "", line 2, in <module>
    import password_cracker
  File "/home/runner/boilerplate-SHA-1-password-cracker-2/", line 7
    password = open('r'\'top-10000-passwords.txt')
IndentationError: expected an indented block

to have stuff inside the function it needs all to be more indented than the line with def

thank you , I appreciate the help . if you have any suggestions or examples i would really appreciate that .

it’s basic python syntax, you may want to review on that. indentation is really important for python syntax

1 Like