一遍就教会你用Python破解压缩包密码
虚幻的羽翼:
用UP主写的代码,windows下修改成功!
#!/usr/bin/env python
# coding: utf-8
import zipfile, os
#修改当前目录
#os.chdir('C:\\') # move to the folder with example.zip
def pwd_file(exampleZip,password):
try:
exampleZip.extractall(pwd=bytes(password,'utf-8'))
print('压缩包密码',password)
except:
pass
def main():
exampleZip = zipfile.ZipFile('example.zip')
pwd_list = open('./password.txt')
for line in pwd_list.readlines():
pwd = line.strip('\n')
pwd_file(exampleZip,pwd)
if __name__ == "__main__":
main()
知识分享官 PYTHON 黑科技 密码 视频教程 破解 信息安全 经验分享 编程开发 打卡挑战