zoukankan      html  css  js  c++  java
  • 密码规则生成脚本

    经常内网渗透或者爆破需要生成字典。于是就自己写了个。

    # coding:utf-8
    # author:jwong-2016-12-15
    import sys
    
    rules = ['1', '12', '123', '1234', '12345', '123456', '@123', '8', '88', '888', '999', '666', '2013', '2014', '2015',
             '2016', '@2013', '@2014', '@2015', '!@#']
    # 密码字典生成规则
    passwords = ['123321qaz', '12341qaz', '1314521qaz', '1qaz', '1qaz!QAZ', '1qaz1qaz', '1qaz2WSX', '1qaz2w', '1qaz2wsx',
                 '1qaz2wsx,.', 'qaz2wsx.', '1qaz2wsx3', '1qaz2wsx3e', '1qaz2wsx3edc', '1qaz2wsx3edc4rfv', '1qaz@WSX',
                 '1qazxcvb', '1qazxsw23edc', '1qazxsw23edcvfr4', '!@#$%^123456', 'asd123!@#', 'caonima!@#', 'abc!@#123',
                 '123!@#abc', 'zhang!@#123', '!@#$%^&*(123', '~!@#$%^&*()', '1234!@#', 'yang123!@#', '123zxc!@#',
                 'woaini520!@#', 'qaz123!@#', 'qq123456!@#', 'wangmeng!@#', '123qaz!@#', '!@#$zhangdawei12',
                 '!@#woaini1314',
                 '!@#123!@#']
    file = 'user.txt'
    
    def password_rule(filename):
        word_list = []
        with open(filename, 'r') as f:
            for line in f.readlines():
                for rule in rules:
                    pass_word = line.strip() + str(rule)
                    word_list.append(pass_word)
        return word_list
    
    
    with open('password.txt', 'a') as f:
        for i in passwords:
            f.writelines(i + '
    ')
        for i in password_rule(file):
            f.writelines(i + '
    ')
    

      

  • 相关阅读:
    shell脚本学习001
    Discuz 代码分析 001 forum.php
    Oauth2.0 入门
    第一篇文章
    position的四个属性值: relative ,absolute ,fixed,static
    JQuery中stop([clearQueue],[goToEnd])介绍
    <meta>
    sublime 2中Package control安装和使用
    ios 状态码
    <video>和<audio>标签,对视频和音频的支持
  • 原文地址:https://www.cnblogs.com/whoami101/p/6183310.html
Copyright © 2011-2022 走看看