最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

压缩包密码破解示例分享(类似典破解)

来源:动视网 责编:小采 时间:2020-11-27 14:38:55
文档

压缩包密码破解示例分享(类似典破解)

压缩包密码破解示例分享(类似典破解):昨天翻硬盘,找到一个好东西,可惜自己加了密码自己不记得了。试了几个常用的没试出来,于是写了这么个小脚本来替我尝试。呵呵,还真给解出来了。python脚本内容如下,跑跑自己加密的压缩包还不错 代码如下:# -*- coding: utf-8 -*-import s
推荐度:
导读压缩包密码破解示例分享(类似典破解):昨天翻硬盘,找到一个好东西,可惜自己加了密码自己不记得了。试了几个常用的没试出来,于是写了这么个小脚本来替我尝试。呵呵,还真给解出来了。python脚本内容如下,跑跑自己加密的压缩包还不错 代码如下:# -*- coding: utf-8 -*-import s


昨天翻硬盘,找到一个好东西,可惜自己加了密码自己不记得了。试了几个常用的没试出来,于是写了这么个小脚本来替我尝试。呵呵,还真给解出来了。
python脚本内容如下,跑跑自己加密的压缩包还不错

代码如下:


# -*- coding: utf-8 -*-

import sys,os

def IsElementUniq(list):
"""
判断list中的元素是否为唯一的
"""
for word in list:
if list.count(word)>1:
return False

return True

def GenPswList():
"""
要求用户输入词,并根据单词组合密码,只尝试四个单词来组合,并限制密码长度为20。写的比较挫
"""
psw=raw_input('input a word>')
wordlist = []
while psw:
wordlist.append(psw)
psw=raw_input('input a word>')
print wordlist

global g_pswlist
g_pswlist = []
for word in wordlist:
g_pswlist.append(word)

for word1 in wordlist:
for word2 in wordlist:
locallist = [word1, word2]
if IsElementUniq(locallist):
tmp = word1 + word2
if len(tmp) < 20:
g_pswlist.append(tmp)

for word1 in wordlist:
for word2 in wordlist:
for word3 in wordlist:
locallist = [word1, word2, word3]
if IsElementUniq(locallist):
tmp = word1 + word2 + word3
if len(tmp) < 20:
g_pswlist.append(tmp)

for word1 in wordlist:
for word2 in wordlist:
for word3 in wordlist:
for word4 in wordlist:
locallist = [word1, word2, word3, word4]
if IsElementUniq(locallist):
tmp = word1 + word2 + word3 + word4
if len(tmp) < 20:
g_pswlist.append(tmp)

print 'gen psw is:', g_pswlist

def TestUnZipPack(filename):
"""
尝试用密码来解压压缩包
"""

command = ""
for psw in g_pswlist:
command = "7z e -p%s -y %s" %(psw,filename)
print command
ret = os.system(command)
if ret == 0:
print 'right psw is ', psw
break

def main(filename):
GenPswList()
TestUnZipPack(filename)

if __name__ == '__main__':
if len(sys.argv) != 2:
print 'argv error'
print 'example:test_7z_psw.py 1.7z'
sys.exit(1)

main(sys.argv[1])

文档

压缩包密码破解示例分享(类似典破解)

压缩包密码破解示例分享(类似典破解):昨天翻硬盘,找到一个好东西,可惜自己加了密码自己不记得了。试了几个常用的没试出来,于是写了这么个小脚本来替我尝试。呵呵,还真给解出来了。python脚本内容如下,跑跑自己加密的压缩包还不错 代码如下:# -*- coding: utf-8 -*-import s
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top