python暴力破解wps,Word,excel等文件

首先有个test.doc文件

题目:密码由12到18位字符组成。字符由每3个一组的固定单词组成,共6组,分别是“123”,“qwe”,“zxc”,“0-=”,“[]\”,“,./”。
请编写密码字典,并破解test.doc

 

1.首先生成密码字典

2.读取字典并暴力破解

 

生成密码字典:

import os
import sys
import itertools as its
words=['123','qwe','zxc','0-=','[]\\',',./']
r1 =its.product(words,repeat=4)
dic = open("pass1.txt","a")
for i in r1:
    i=list(i)
    temp="";
    for k in i:
        temp=temp+k;
    dic.write(temp+'\n');
r2 =its.product(words,repeat=5)
for i in r2:
    i=list(i)
    temp="";
    for k in i:
        temp=temp+k;
    dic.write(temp+'\n');
r3 =its.product(words,repeat=6)
for i in r3:
    i
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值