经常内网渗透或者爆破需要生成字典。于是就自己写了个。
# 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 + \'\n\')
for i in password_rule(file):
f.writelines(i + \'\n\')