zoukankan      html  css  js  c++  java
  • python 密码字典生成器

    python 密码字典生成器

    1.准备工作pycharm 设定

    help-->Change Memory setting -->20GB

    Help-->Edit customer properties -->idea.max.intellisense.filesize=9999999

    2,以下是生成8位数字密码的字典,生成大概1GB的密码文件

    import itertools
    import datetime
    import time
    def generatelibary(library, length=6):
    
        libararys =itertools.product(library,repeat=length)
    
        with open("paswordlirbarys.txt","a",encoding='utf-8') as dic:
            for i in libararys:
                dic.write("".join(i))
                dic.write("".join("
    "))
    
    if __name__ == "__main__":
    
        lowercase = 'abcdefghijklmnopqrstuvwxyz'
        uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
        digits = '0123456789'
        special = """!"#$%&'( )*+,-./:;<=>?@[]^_`{|}~"""
        word = lowercase + uppercase + digits + special
    
        starttime = datetime.datetime.now()
        print(time.strftime("%Y%m%d%H%M%S", time.localtime(time.time())))
        generatelibary(digits,length=8)  #生成8位数字字典
        endtime = datetime.datetime.now()
        print(time.strftime("%Y%m%d%H%M%S", time.localtime(time.time())))
        print('The time cost: ')
        print(endtime - starttime)

    运行结果

    20200525155740
    20200525155842
    The time cost:
    0:01:01.910324
    
    Process finished with exit code 0
  • 相关阅读:
    jchdl
    jchdl进展
    Verilog缺少一个复合数据类型,如C语言中的结构体
    jchdl-GSL-实例
    硬件建模-几个观点
    非阻塞赋值(Non-blocking Assignment)是个伪需求
    jchdl
    jchdl
    HDU 2686 (双线程) Matrix
    LA 3602 DNA Consensus String
  • 原文地址:https://www.cnblogs.com/tingxin/p/12957382.html
Copyright © 2011-2022 走看看