Когда я набираю python cracked.py, чтобы открыть файл, файл не открывается и переходит на новую строку.Почему он это делает?это код, который я пытаюсь запустить: import crypt
def testPass(cryptPass):
salt = cryptPass[0:2]
dictFile = open('dictionary-1.txt', 'r')
for word in dictFile.readlines():
word = word.strip('\n')
cryptWord = crypt.crypt(word,salt)
if (cryptWord == cryptPass):
print "[+] Found Password: "+word+"\n"
return
print "[-] Password Not Found.\n"
return
def main():
passFile = open('/root/homework/HomeworkW8.zip')
for line in passFile.readlines():
if ":" in line:
user = line.split(':')[0]
cryptPass = line.split(':')[1].strip(' ')
print "[*] Crackin Password For: "+user
testPass(cryptPass)
if __name__ == "__main__":
main()