python编写的弱口令生成工具

0、简介

根据企业或者单位生成针对性的弱密码,提高成功几率。

1、代码

1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/python3
import itertools

def result(password):
result = open('password.txt', 'a+')
result.write(password+'\n')
result.close()
#关键字
prefix = ['baidu', 'Baidu', 'BAIDU']
for x in [''.join(x) for x in list(itertools.product(prefix, ['@', '@@', ''], ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '123', '1234', '123456'], ['!' , '#', '' , '.' , '..' , '...']))] :
print(x)
result(x)

2、截图

img