Python CGI脚本:邮件发送者
我在执行py脚本时总是遇到这个错误 文件mof.py,第25行 对于字典中的passwd.read.split'\n': ^ 缩进错误:未缩进与任何外部缩进级别不匹配 Python脚本 尝试: sha1=原始\u输入\t\n\nsha1哈希:Python CGI脚本:邮件发送者,python,sha1,Python,Sha1,我在执行py脚本时总是遇到这个错误 文件mof.py,第25行 对于字典中的passwd.read.split'\n': ^ 缩进错误:未缩进与任何外部缩进级别不匹配 Python脚本 尝试: sha1=原始\u输入\t\n\nsha1哈希: try: dictionary = open("dictionary.txt","r") except(IOError): print "dictionary.txt not found!" for passwd in dictionary
try:
dictionary = open("dictionary.txt","r")
except(IOError):
print "dictionary.txt not found!"
for passwd in dictionary.read().split('\n'):
if hashlib.sha1(passwd).hexdigest() == sha1:
print("\n\t[OK]"+sha1+" : "+passwd+"\n")
raw_input("Decrytion Success; Press Enter To Exit")
else:
print "\n\tFailed; Password not found in dictionary"
except (KeyboardInterrupt):
print "\n\t[+] Terminated by user"
为什么?其他:行需要进一步缩进。Thnx和顺便说一句,您可能已经知道标题是错误的:p,这是sHA1解密程序脚本,不是邮件发件人