Vbs code for winrar password cracking

Source: Internet
Author: User

Copy codeThe Code is as follows: title = "WinRaR deciphering (only deciphering numbers are currently supported )"
Set WshShell = CreateObject ("WScript. Shell ")
Set fso = CreateObject ("scripting. filesystemobject ")
Function input ()
Rar_path = InputBox ("Enter the rar or zip path to be decrypted" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) & "Example: C: \ jiemi.rar or C: \ jiemi.zip", title)
If rar_path = "" Then Exit Function End If
If fso. fileExists (rar_path) Then
Num1 = InputBox ("Minimum Password Length" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) &" Example: 0 ", title)
If rar_path = "" Then Exit Function End If
Num2 = InputBox ("Maximum password length" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) &" Note: larger than the minimum password value ", title)
If rar_path = "" Then Exit Function End If
If num2> num1 Then
Speed = InputBox ("select the decryption speed (3 recommended)" & Chr (13) & Chr (10) & "if the password range is short, we recommend that you select less than 3 (3 by default)" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) & "1: doubled speed" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) &" 2: 2x speed "& Chr (13) & Chr (10) &" "& Chr (13) & Chr (10) &" 3: Triple Speed "& Chr (13) & Chr (10) & "" & Chr (13) & Chr (10) & "4: quad speed" & Chr (13) & Chr (10) & "" & Chr (13) & Chr (10) & "5: five times faster", title)
Code num1, num2, rar_path, speed' important function call
Else
Msg2 = MsgBox ("Please note that the maximum value must be greater than the minimum value" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) & "whether to re-enter", 1, title)
If msg2 = 1 Then input () End If
End If
Else
Msg1 = MsgBox ("the path you entered is incorrect" & Chr (13) & Chr (10) & "& Chr (13) & Chr (10) & "whether to re-enter", 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"★Password cracked★"& Chr (13) & Chr (10) &" "& Chr (13) & Chr (10) &" Password: "& cipher (j) (0), title
Wscript. quit
End If
Count (j) = count (j) + 1
Next
Next
End Function
Input ()

Author: lixvqing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.