批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程
[批处理文件精品]批处理版照片整理器[批处理文件精品]纯批处理备份&还原驱动在线第三方下载
返回列表 发帖

[转贴] VBS代码实现WinRAR密码破解

  1. title="WinRaR破译(目前只做了破译数字)"
  2. set WshShell = CreateObject("WScript.Shell" )
  3. set fso = CreateObject("scripting.filesystemobject")
  4. Function input()
  5. rar_path=InputBox("请输要解密的rar或zip入路径"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"例如:C:\jiemi.rar或C:\jiemi.zip",title)
  6. If rar_path="" Then Exit Function End If
  7. If fso.fileExists(rar_path) Then
  8. num1=InputBox("密码长度最小值"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"例如:0",title)
  9. If rar_path="" Then Exit Function End If
  10. num2=InputBox("密码长度最大值"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"注意:比密码最小值要大",title)
  11. If rar_path="" Then Exit Function End If
  12. If num2 > num1 Then
  13. 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)
  14. code num1,num2,rar_path,speed '重要函数调用
  15. Else
  16. msg2=MsgBox ("请注意最大值要大于最小值"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"是否重新输入",1,title)
  17. If msg2=1 Then input() End If
  18. End If
  19. Else
  20. msg1=MsgBox ("您输入的路径不正确"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"是否重新输入",1,title)
  21. If msg1=1 Then input() End If
  22. End If
  23. End Function
  24. Function code(num1,num2,rar_path,speed)
  25. Select Case speed
  26. Case "1"
  27. import 1,num1,num2,rar_path
  28. Case "2"
  29. import 2,num1,num2,rar_path
  30. Case "3"
  31. import 3,num1,num2,rar_path
  32. Case "4"
  33. import 4,num1,num2,rar_path
  34. Case "5"
  35. import 5,num1,num2,rar_path
  36. End Select
  37. End Function
  38. Function import(number,num1,num2,rar_path)
  39. On Error Resume Next
  40. Dim cipher(100),count(100),Result(100)
  41. pathname=fso.getbasename(rar_path)
  42. winrar="C:\PROGRA~1\WinRAR\WinRAR.exe"
  43. For i=1 To number
  44. If i = 1 Then count(i) = num1 Else count(i) = (Int(num2*(i-1)/number)+1) End If
  45. Next
  46. For counter = num1 To Int(num2/number)
  47. For j=1 To number
  48. cipher(j)=Array(count(j))
  49. Result(j)=WshShell.Run (winrar&" e -inul -p"&cipher(j)(0)&" "&rar_path&" "&pathname&"\",1,true)
  50. if Result(j) = 0 Then
  51. MsgBox "★密码破解成功★"&Chr(13)&Chr(10)&""&Chr(13)&Chr(10)&"密码:"&cipher(j)(0),,title
  52. wscript.quit
  53. end If
  54. count(j)=count(j)+1
  55. Next
  56. Next
  57. End Function
  58. input()
复制代码

失败了…………

TOP

怎么一闪,就没了

TOP

返回列表