紫水晶编程技术论坛 - 努力打造成全国最好的编程论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 4861|回复: 2

WinRaR破译.vbs

[复制链接]

96

主题

254

帖子

4

精华

核心会员

Rank: 20Rank: 20Rank: 20Rank: 20

积分
6513
发表于 2012-6-6 06:08:01 | 显示全部楼层 |阅读模式
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()

详细出处参考:http://www.jb51.net/article/26392.htm

7

主题

421

帖子

1

精华

铂金会员

Rank: 5

积分
2173
发表于 2013-4-10 15:46:48 | 显示全部楼层
要來試看看是否真的能破譯, 不知是否有版本限制

30

主题

723

帖子

0

精华

钻石会员

Rank: 6Rank: 6

积分
2815
发表于 2015-4-10 10:36:30 | 显示全部楼层
很好玩 谢谢分享
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

手机版|Archiver|紫水晶工作室 ( 粤ICP备05020336号 )

GMT+8, 2024-4-30 00:00 , Processed in 0.022112 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表