[英]Python CGI script: Mail Sender
I'm always getting this error while executing my py script 执行py脚本时总是出现此错误
File "mof.py", line 25 for passwd in dictionary.read().split('\\n'): ^ IndentationError: unindent does not match any outer indentation level
文件“ mof.py”,dictionary.read()。split('\\ n')中passwd的第25行:^ IndentationError:unindent与任何外部缩进级别都不匹配
Python Script Python脚本
try: sha1 = raw_input("\\t\\n\\nsha1 Hash:") 尝试:sha1 = raw_input(“ \\ t \\ n \\ nsha1哈希:”)
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"
Why? 为什么?
else:
行需要进一步缩进。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.