python 暴力破解 excel加密文件
代码语言:javascript
复制fdd
ddd
eeee
5e5e5
58d85d5e
d2d4d5d
4d4d4d3
dfdf,d;
lskdfldf
123
sd'fd'f
code
代码语言:javascript
复制from win32com.client import Dispatch
import sys
file = input('Path: ')
wordlist = 'wordlist.txt'
word = open(wordlist, 'r')
allpass = word.readlines()
word.close()
for password in allpass:
password = password.strip()
print ("Testing password: " password)
instance = Dispatch('Excel.Application')
try:
instance.Workbooks.Open(file, False, True, None, password)
print ("Password Cracked: " password)
break
except:
pass