Implementation of winrar password cracking VBS code _VBS

Source: Internet
Author: User
Tags chr rar
Copy Code code as follows:

Title= "WinRAR deciphering (currently only deciphering numbers)"
Set WshShell = CreateObject ("Wscript.Shell")
Set fso = CreateObject ("Scripting.FileSystemObject")
Function input ()
Rar_path=inputbox ("Please enter the RAR or zip path to decrypt" &CHR) &CHR & "" &chr &CHR (a) & "for 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 ("Password length minimum" &chr &CHR (& "" &CHR (A) &CHR (Ten) & "For example: 0", title)
If rar_path= "" Then Exit Function End If
Num2=inputbox ("Password length max" &chr &CHR (a) & "&CHR" &CHR (a) & "NOTE: Greater than password minimum", title)
If rar_path= "" Then Exit Function End If
If num2 > Num1 Then
Speed=inputbox ("Please choose the speed of decryption (3 recommended)" &CHR &CHR & "The short range of passwords is recommended to select less than 3 (default 3)" &CHR (&CHR) & "" &chr &CHR & "1: one-speed" &CHR &CHR (a) & "" &CHR (a) &CHR (a) & "2: Twice Times faster" &CHR (&CHR) & "" &chr &CHR (A) & "3: three times Times Speed" &CHR (a) &CHR (a) & "&CHR (13 ) &CHR & "4: four times times Speed" &CHR &CHR (a) & "&CHR" &CHR (A) & "5: five times Times Speed", title)
Code Num1,num2,rar_path,speed ' Important function call
Else
Msg2=msgbox ("Note that the maximum value is greater than the minimum" &CHR) &CHR & "" &CHR (a) &CHR (a) & "re-enter", 1,title)
If msg2=1 Then input () End If
End If
Else
Msg1=msgbox ("The path you entered is incorrect" &CHR) &CHR & "" &CHR (a) &CHR (a) & "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 (M), COUNT (m), 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 success ★" &CHR (&CHR) & "" &CHR (&CHR) & "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.