国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

壓縮包密碼破解示例分享(類似典破解)

2020-02-23 05:05:58
字體:
來源:轉載
供稿:網友

昨天翻硬盤,找到一個好東西,可惜自己加了密碼自己不記得了。試了幾個常用的沒試出來,于是寫了這么個小腳本來替我嘗試。。呵呵,還真給解出來了。
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)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 东乡族自治县| 凌海市| 台南县| 赞皇县| 泗洪县| 凤台县| 景德镇市| 伽师县| 金川县| 乌苏市| 荣昌县| 海阳市| 会泽县| 杭州市| 大安市| 台前县| 忻州市| 锡林郭勒盟| 永川市| 绵阳市| 长葛市| 广河县| 古浪县| 大姚县| 周至县| 永昌县| 梁平县| 民乐县| 固原市| 泰顺县| 和平县| 得荣县| 大城县| 大化| 乌苏市| 祁阳县| 丽水市| 甘谷县| 任丘市| 安义县| 四会市|