标题: 高手进来看看
[打印本页]
作者: lena
时间: 2008-4-16 12:09
标题: 高手进来看看
@echo off
title Password guess Solutions
color 4e
set rar="%ProgramFiles%\WinRAR\Rar.exe"
if exist "%ProgramFiles%\WinRAR\Rar.exe" (goto fbian) else goto lena
:fbian
set /p rarfile=Please specify the need to crack RAR documents:
set /p Dictionary=Please specify dictionary:
for /F %%i IN (%Dictionary%) DO (
%Rar% e -p%%i %rarfile%>nul
)
goto end
:lena
set /p unrar=Winrar procedures do not exist, please re-designated the program path:
set /p rarfile=Please specify the need to crack RAR documents:
set /p Dictionary=Please specify dictionary:
for /F %%i IN (%Dictionary%) DO (
%unrar% e -p%%i %rarfile%
goto end
:End
exit
___________________________________________________________
注:假如正确密码位于密码文件pass.dic文件的中间位置,此批处理会按顺序按个进行尝试,当尝试到正确密码时,他会把文件解压出来,然后它继续进行尝试,如果后面的密码不正确,刚才解压的文件又被其删除掉。
请问各位大侠,如何使其猜出正确密码的时候将信息输出到一个特定的文件内,然后终止该批处理的继续运行.
[
Last edited by lena on 2008-4-16 at 12:41 PM ]
作者: bat-zw
时间: 2008-4-16 12:35
又一个不知所云
作者: plp626
时间: 2008-4-16 12:40
%Rar% e -p%%i %rarfile%>nul&&(title 密码为:%%i&pause&exit)
作者: lena
时间: 2008-4-16 13:02
假如我还需要把密码%%i输出到一个文件,后续应该使用&&还是|呢。。太复杂了。。
将代码修改为
:fbian
set /p rarfile=Please specify the need to crack RAR documents:
set /p Dictionary=Please specify dictionary:
for /F %%i IN (%Dictionary%) DO (
%Rar% e -p%%i %rarfile%>nul&&(echo %%i>pass.txt)&&(title 密码为:%%i&pause&exit)
它直接就不执行了。。
[
Last edited by lena on 2008-4-16 at 01:05 PM ]
作者: plp626
时间: 2008-4-16 13:05
少了for的最后一个括号
要搞破解我网盘里有,劝你别用p弄,太差劲了。YY可以
[
Last edited by plp626 on 2008-4-16 at 01:09 PM ]
作者: lena
时间: 2008-4-16 13:08
他不执行。
作者: bat-zw
时间: 2008-4-16 13:31
楼主现在总算说明白了,代码就不写了,给个思路吧:
当密码正确时,程序将RAR文件解压到一个空文件夹中,马上加个if exit 或 if 判断,如发现文件夹不为空则结束程序,如为空继续猜测密码。
作者: moniuming
时间: 2008-4-16 18:50
%Rar% e -p%%i %rarfile%
if %errorlevel%==0 goto :eof