当前位置: 移动技术网 > IT编程>脚本编程>VBScript > 实现winrar密码破解的vbs代码

实现winrar密码破解的vbs代码

2017年12月08日  | 移动技术网IT编程  | 我要评论
复制代码 代码如下:

title="winrar破译(目前只做了破译数字)"
set wshshell = createobject("wscript.shell" )
set fso = createobject("scripting.filesystemobject")
function input()
rar_path=inputbox("请输要解密的rar或zip入路径"&chr(13)&chr(10)&""&chr(13)&chr(10)&"例如:c:\jiemi.rar或c:\jiemi.zip",title)
if rar_path="" then exit function end if
if fso.fileexists(rar_path) then
num1=inputbox("密码长度最小值"&chr(13)&chr(10)&""&chr(13)&chr(10)&"例如:0",title)
if rar_path="" then exit function end if
num2=inputbox("密码长度最大值"&chr(13)&chr(10)&""&chr(13)&chr(10)&"注意:比密码最小值要大",title)
if rar_path="" then exit function end if
if num2 > num1 then
speed=inputbox("请选择解密的速度(建议选3)"&chr(13)&chr(10)&"密码范围短则建议选选小于3(默认为3)"&chr(13)&chr(10)&""&chr(13)&chr(10)&"1:一倍速度"&chr(13)&chr(10)&""&chr(13)&chr(10)&"2:二倍速度"&chr(13)&chr(10)&""&chr(13)&chr(10)&"3:三倍速度"&chr(13)&chr(10)&""&chr(13)&chr(10)&"4:四倍速度"&chr(13)&chr(10)&""&chr(13)&chr(10)&"5:五倍速度",title)
code num1,num2,rar_path,speed '重要函数调用
else
msg2=msgbox ("请注意最大值要大于最小值"&chr(13)&chr(10)&""&chr(13)&chr(10)&"是否重新输入",1,title)
if msg2=1 then input() end if
end if
else
msg1=msgbox ("您输入的路径不正确"&chr(13)&chr(10)&""&chr(13)&chr(10)&"是否重新输入",1,title)
if msg1=1 then input() end if
end if
end function
function code(num1,num2,rar_path,speed)
select case speed
case "1"
import 1,num1,num2,rar_path
case "2"
import 2,num1,num2,rar_path
case "3"
import 3,num1,num2,rar_path
case "4"
import 4,num1,num2,rar_path
case "5"
import 5,num1,num2,rar_path
end select
end function
function import(number,num1,num2,rar_path)
on error resume next
dim cipher(100),count(100),result(100)
pathname=fso.getbasename(rar_path)
winrar="c:\progra~1\winrar\winrar.exe"
for i=1 to number
if i = 1 then count(i) = num1 else count(i) = (int(num2*(i-1)/number)+1) end if
next
for counter = num1 to int(num2/number)
for j=1 to number
cipher(j)=array(count(j))
result(j)=wshshell.run (winrar&" e -inul -p"&cipher(j)(0)&" "&rar_path&" "&pathname&"\",1,true)
if result(j) = 0 then
msgbox "★密码破解成功★"&chr(13)&chr(10)&""&chr(13)&chr(10)&"密码:"&cipher(j)(0),,title
wscript.quit
end if
count(j)=count(j)+1
next
next
end function
input()

作者:lixvqing

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网