博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python解开压缩文件6位纯数字密码
阅读量:4041 次
发布时间:2019-05-24

本文共 706 字,大约阅读时间需要 2 分钟。

根据小姐姐的需求,密码是6位纯数字,那就帮我节省了好大一段时间

只对6位纯数字进行尝试就可以了。

三分钟就把脚本搞出来了

-- coding:utf-8 --

import os

import subprocess
import zipfile
def brutecrack():
for a in range(1,10):
for b in range(1,10):
for c in range(1,10):
for d in range(1,10):
for e in range(1,10):
for f in range(1,10):
passwd=str(a)+str(b)+str©+str(d)+str(e)+str(f)
command=‘7z -p’+passwd+’ t F:/三亚相册.zip’ #t 表示test,不进行实际解压,只测试密码
print(passwd)
child=subprocess.call(command)
#os.popen(command)#这个也可以用,但是不好监控解压状态
print(child)
if child==0:
print(“相册密码为:”+passwd)
return
if name == ‘main’:
brutecrack()
————————————————
版权声明:本文为CSDN博主「lexsaints」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_42350212/article/details/115580004

你可能感兴趣的文章
1020. Tree Traversals (25)
查看>>
1066. Root of AVL Tree (25)
查看>>
1086. Tree Traversals Again (25)
查看>>
1043. Is It a Binary Search Tree (25)
查看>>
大数阶乘!
查看>>
1039. Course List for Student (25)
查看>>
1022. Digital Library (30)(字符串分割) 模拟
查看>>
1024. Palindromic Number (25) 回文字符串
查看>>
1051. Pop Sequence (25) 判断出栈序列是否合理
查看>>
判断出栈序列是否合理
查看>>
1026. Table Tennis (30)
查看>>
1028. List Sorting (25) COUT和 cin 超时
查看>>
1064. Complete Binary Search Tree (30)
查看>>
1098. Insertion or Heap Sort (25)
查看>>
1099. Build A Binary Search Tree (30) 给定二叉搜索树插值
查看>>
1083. List Grades (25)
查看>>
1036. Boys vs Girls (25)
查看>>
1094. The Largest Generation (25)
查看>>
1056. Mice and Rice (25)
查看>>
1030. Travel Plan (30)寻找最短路径
查看>>