cnblogs/dcrenl/Linux使用rarcrack暴力破解RAR,ZIP,7Z压缩包.html
2024-09-24 12:43:01 +08:00

71 lines
4.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>这里使用的软件名称叫rarcrack其官方主页:&nbsp;<a href="http://rarcrack.sourceforge.net/" rel="noopener" target="_blank">http://rarcrack.sourceforge.net</a></p>
<p>rarcrack官方网站已经没有了需要百度自行查找源码编译</p>
<p>链接: https://pan.baidu.com/s/1Jh0tsx5_Amgd0fMzZYMqsQ 提取码: 5sas</p>
<p>该软件用于暴力破解压缩文件的密码但仅支持RAR, ZIP, 7Z这三种类型的压缩包其特点是可以使用多线程而且可以随时暂停与继续(暂停时会在当前目录生成一个xml文件里面显示了正在尝试的一个密码)。这是真正的暴力破解,因为连字典都没用😂</p>
<h3 id="rarcrack安装方法">rarcrack安装方法</h3>
<p>首先从官网下载安装包,然后执行如下命令</p>
<div class="table-container">
<table>
<tbody>
<tr>
<td class="gutter">
<pre><span class="line">1<br /><span class="line">2<br /><span class="line">3<br /></span></span></span></pre>
</td>
<td class="code">
<pre><span class="line">tar -xjf rarcrack-0.2.tar.bz2<br /><span class="line">cd rarcrack-0.2<br /><span class="line">make &amp;&amp; make install<br /></span></span></span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3 id="rarcrack使用方法">rarcrack使用方法</h3>
<p>执行命令:&nbsp;<code>rarcrack 文件名 --threads 线程数 --type rar|zip|7z</code></p>
<p>同时,该软件自带了测试样例,在解压目录里,执行<code>rarcrack test.zip &mdash;threads 4 &mdash;type zip</code>,等待一会儿即可得到结果,其密码是<code>100</code>,很简单。在执行过程中,还会打印当前尝试的速度,比如:</p>
<div class="table-container">
<table>
<tbody>
<tr>
<td class="gutter">
<pre><span class="line">1<br /><span class="line">2<br /><span class="line">3<br /><span class="line">4<br /></span></span></span></span></pre>
</td>
<td class="code">
<pre><span class="line">Probing: 'oB' [527 pwds/sec]<br /><span class="line">Probing: 'Nh' [510 pwds/sec]<br /><span class="line">Probing: '0c3' [512 pwds/sec]<br /><span class="line">Probing: '0AV' [514 pwds/sec]<br /></span></span></span></span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>如果要改变当前密码破解的位置可以直接打开xml修改当前密码到那一行密码即可。xml内容如下:</p>
<div class="table-container">
<table>
<tbody>
<tr>
<td class="gutter">
<pre><span class="line">1<br /><span class="line">2<br /><span class="line">3<br /><span class="line">4<br /><span class="line">5<br /><span class="line">6<br /></span></span></span></span></span></span></pre>
</td>
<td class="code">
<pre><span class="line">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br /><span class="line">&lt;rarcrack&gt;<br /><span class="line"> &lt;abc&gt;0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&lt;/abc&gt;<br /><span class="line"> &lt;current&gt;104&lt;/current&gt;<br /><span class="line"> &lt;good<span class="built_in">_password&gt;100&lt;/good<span class="built_in">_password&gt;<br /><span class="line">&lt;/rarcrack&gt;<br /></span></span></span></span></span></span></span></span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>在执行过程中,如果出现如下错误:</p>
<div class="table-container">
<table>
<tbody>
<tr>
<td class="gutter">
<pre><span class="line">1<br /><span class="line">2<br /><span class="line">3<br /><span class="line">4<br /><span class="line">5<br /><span class="line">6<br /></span></span></span></span></span></span></pre>
</td>
<td class="code">
<pre><span class="line">gcc -pthread rarcrack.cxml2-config --libs --cflags-O2 -o rarcrack <br /><span class="line">/bin/sh: 1: xml2-config: not found <br /><span class="line">In file included from rarcrack.c:21:0: <br /><span class="line">rarcrack.h:25:48: 致命错误: libxml/xmlmemory.h没有那个文件或目录 <br /><span class="line">编译中断。 <br /><span class="line">make: *** [all] 错误 1<br /></span></span></span></span></span></span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>那么可以执行<code>sudo apt-get install libxml2-dev libxslt-dev</code>进行修复或者sudo yum install libxml2-devel libxslt-devel</p>
<p>&nbsp;后台运行可在命令前加nohup</p>
<p>&nbsp;</p>
<p>转自https://haofly.net/linux-brute-force-rar-zip-7z/index.html</p>