python 暴力破解 excel加密文件

2021-01-14 14:38:12 浏览数 (1)

python 暴力破解 excel加密文件

  • ‘wordlist.txt’ 为待测试的密码列表
代码语言: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

0 人点赞