当前位置:网站首页>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位密码,每个小写字母最多连续出现两个
边栏推荐
- 奔赴山海之前,毕业季一定要做的那些事情
- PostgreSQL varchar[] 数组类型操作
- web开发常用的开源框架的开源协议整理
- Case sharing: basic networking configuration of QinQ
- Chinese and English instructions human soluble advanced glycation end products receptor (sRAGE) ELISA Kit
- Lake Shore - crx-em-hf low temperature probe station
- 241. Different Ways to Add Parentheses
- ffmpeg 音频相关命令
- [info() method in org.slf4j.logger]
- 商业智能BI开发和报表开发有什么本质区别?
猜你喜欢

奔赴山海之前,毕业季一定要做的那些事情

Summary of SQL query de duplication statistics methods

Bao, que se passe - t - il si le serveur 100 + O & M a mal à la tête? Utilisez le majordome xingyun!

Solidity - truncated and checked modes of arithmetic operations - new features of 0.8.0

Chinese and English instructions human soluble advanced glycation end products receptor (sRAGE) ELISA Kit

Lake Shore低温恒温器的氦气传输线

GB28181之SIP协议

Getting started with kubernetes command (namespaces, pods)

sql查询去重统计的方法总结

XML语法、约束
随机推荐
白盒加密技术浅理解
Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference
Go Language Advanced
【pytorch记录】模型的分布式训练DataParallel、DistributedDataParallel
【org.slf4j.Logger中info()方法】
Collation of open source protocols of open source frameworks commonly used in Web Development
从零开始学 MySQL —数据库和数据表操作
Extensive reading of the paper [film: visual reasoning with a general condition layer]
nacos启动失败问题解决与总结
[English grammar] Unit1 articles, nouns, pronouns and numerals
Facebook聊单,SaleSmartly有妙招!
What must be done in graduation season before going to Shanhai
寶,運維100+服務器很頭疼怎麼辦?用行雲管家!
线程的并行、并发、生命周期
Chaos engineering platform chaosblade box new heavy release
为什么一定要从DevOps走向BizDevOps?
使用环信提供的uni-app Demo,快速实现一对一单聊
正则表达式=Regex=regular expression
Thesis reading [distinctive late semantic graph for video capturing]
研究了11种实时聊天软件,我发现都具备这些功能…