本文提供一个 Python 代码,可以生成 8 到 16 位的所有字符和大小写字母数字组合的密码字典,用于 Kali Linux 密码破解。

import itertools

charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
min_length = 8
max_length = 16

with open('dictionary.txt', 'w') as f:
    for length in range(min_length, max_length+1):
        for combination in itertools.product(charset, repeat=length):
            password = ''.join(combination)
            f.write(password + '
')

这段代码使用了 Python 的 itertools 模块,其中的 product 函数可以生成指定长度的所有字符组合。将生成的密码逐行写入文件即可得到字典。

Kali Linux 密码字典生成器 - 8 到 16 位字符组合

原文地址: https://www.cveoy.top/t/topic/o0jd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录