当前位置:网站首页>Crunch简介、安装,使用Crunch制作密码字典
Crunch简介、安装,使用Crunch制作密码字典
2022-07-01 18:45:00 【51CTO】
一、Crunch简介
Crunch是一款运行在linux中的字典生成工具,可以灵活的定制自己的密码字典文件。
密码字典能干吗?懂的都懂!
二、Crunch安装
kali系统中默认安装有Crunch工具。
下载地址: https://sourceforge.net/projects/crunch-wordlist/

1)解压源码包
[[email protected] ~]
# tar zxvf crunch-3.6.tgz
[[email protected] ~]
# cd crunch-3.6/
[[email protected] ~]
# ls
c
h
a
r
s
e
t
.
l
s
t
C
O
P
Y
I
N
G
c
r
u
n
c
h
.
1
c
r
u
n
c
h
.
c
M
a
k
e
f
i
l
e
u
n
i
c
o
d
e
_
t
e
s
t
.
l
s
t
- 1.
- 2.
- 3.
- 4.
进入crunch的安装目录下面可以看到里面有一个charset.lst文件,里面定义了一些名词用于简写用于制作字典的字符如:
- numeric 表示0123456789
- lalpha表示26位小写字母
- ualpha表示26为大写字母
2)安装
[[email protected] ~]
# gcc -Wall -lm -pthread -std=c99 -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 crunch.c -o crunch -lm
[[email protected] ~]
# make install
- 1.
- 2.
三、Crunch使用语法及参数
在安装完成后,就开始学习如何使用Crunch工具了。
语法
crunch min-len max-len [opention]
参数
min-len:开始的最小长度字符串(这个选项是必须的)
max-len:结束的最大长度字符串(这个选项是必须的)
charset string 要生成密码包含的字符集(小写字符、大写字符、数字、符号),这个选项是可选的,如果你不写这个选项,将使用默认字符集(默认为小写字符)。如果你想生成的密码包含空格字符,你可以使用来代替,你可以把带有空格的字符集放在双引号“”中,如“123abc ”
选项
- -o 输出生成的密码到指定的文件;
- -z 压缩生成的字典文件,有效的参数是gzip, bzip2, lzma, and 7z,其中gzip压缩最快,bzip2压缩速度比gzip慢单压缩效率比gzip好,7z压缩速度最慢,但是压缩效率最高。
- -f 调用密码库文件,例如:/usr/share/crunch/charset.lst;
- -t 定义密码输出格式(@代表插入小写字母、,代表插入大写字母、%代表插入数字、^代表插入符号)
- -b:按指定的大小单位分割字典文件成若干个指定的大小的字典,避免一个字典文件过大,
例子:按每个文件20mib分割字典文件
说明:
单位有 kb, mb, gb, kib, mib, gib ,前三个单位是以1000单位计算的,后三个是以1024计算的。
注意数字和单位之间没有空格,例如:500mb 是正确的, 500 mb 格式是不对的(中间有空格),-b参数必须和-o START结合使用
- -c 指定要写入字典文件中的行数,只在有 -o START参数时才生效,单个字典超过指定的行数会被分割成两个或多个字典文件。例如: -c 5000
- -d 限制同一字符连续出现的数量, -d 2 表示限制一个字符最多连续出现2次如 aabd,ccda。aaab就表示超过了2个字符连续的限制了。
- -e 定义到那个字符串就停止生成密码,例如: -e 999999 就表示在生成密码到99999时就停止生成密码
- -i 改变输出格式,例如: 原本输入为aaa,aab,aac,aad再使用了-i之后,就会变成aaa,baa,caa,daa的格式了
- -p 定义密码元素
- -q 读取密码元素
- -r 定义从某一个地方重新开始
- -s 第一个密码,从自己定义的密码xxx开始
- -u:禁用printpercentage线程。这应该是最后一个选择
四、使用案例
- 生成一个8位包含大小写字母、数字、常见字符的字典,并导出到文件中
[[email protected] ~]
# crunch 8 8 -f /root/crunch-3.6/charset.lst mixalpha-numeric-all-space -o mima-8wei.txt
输
出
结
果
:
C
r
u
n
c
h
w
i
l
l
n
o
w
g
e
n
e
r
a
t
e
t
h
e
f
o
l
l
o
w
i
n
g
a
m
o
u
n
t
o
f
d
a
t
a:
5
9
7
0
7
8
3
8
8
1
6
0
1
5
6
2
5
b
y
t
e
s
5
6
9
4
1
8
3
2
3
6
6
M
B
5
5
6
0
7
2
5
8
G
B
5
4
3
0
3
T
B
5
3
P
B
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
数据量54303TB,文件太大。
2、生成10位密码,格式为“三个小写字母+一个符号+四个数字+两个符号”,限制每个小写字母最多连续出现2次,数字最多连续出现3次
3、生成8位密码,每个小写字母最多连续出现两个
边栏推荐
- GB28181之SIP协议
- uni-app微信小程序一键登录获取权限功能
- How to redraw the header of CListCtrl in MFC
- Flutter 实战-快速实现音视频通话应用
- 241. Different Ways to Add Parentheses
- 见证时代!“人玑协同 未来已来”2022弘玑生态伙伴大会开启直播预约
- XML语法、约束
- How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?
- Transform + ASM data
- GetMessage底层机制分析
猜你喜欢

正则表达式=Regex=regular expression

Solution of intelligent supply chain management platform in aquatic industry: support the digitalization of enterprise supply chain and improve enterprise management efficiency

Parallelism, concurrency and life cycle of threads

Lumiprobe phosphide hexaethylene phosphide specification

Shell高级进阶

Lake shore optimag superconducting magnet system om series

精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会

Lumiprobe free radical analysis h2dcfda instructions

Native JS creates a calendar - supports mouse wheel scrolling to select months - and can be ported to any framework

Solidity - 合约结构 - 错误(error)- ^0.8.4版本新增
随机推荐
[info() method in org.slf4j.logger]
OpenCV视频质量诊断----视频遮挡诊断
研究了11种实时聊天软件,我发现都具备这些功能…
【Go ~ 0到1 】 第四天 6月30 defer,结构体,方法
下载(导出)pdf模板文件(比如:审批单),报错:Invalid nested tag *** found, expected closing tag ***
Facebook聊单,SaleSmartly有妙招!
混沌工程平台 ChaosBlade-Box 新版重磅发布
Introduction to relevant processes and functions of wechat official account development
GB28181之SIP协议
ubuntu14安装MySQL并配置root账户本地与远程访问
Contos 7 set up SFTP to create users, user groups, and delete users
Download (export) PDF template file (such as approval form), and report error: invalid nested tag * * * found, expected closing tag***
宝,运维100+服务器很头疼怎么办?用行云管家!
How to redraw the header of CListCtrl in MFC
Enabling "new Chinese enterprises", SAP process automation landing in China
Flutter 实战-快速实现音视频通话应用
H264编码profile & level控制
为什么一定要从DevOps走向BizDevOps?
记一次 .NET 差旅管理后台 CPU 爆高分析
The use of subplot function in MATLAB