Excel VBA Project password cracking program (can be cracked)

Source: Internet
Author: User

Create an Excel Workbook, ALT + F11 open the VBA Editor, create a module, and copy the followingCodeNote: If the prompt variable is undefined, delete the option explicit line. The test has passed.

'Remove VBA encoding Protection
Sub moveprotect ()
Dim filename as string
Filename = application. getopenfilename ("Excel file (*. xls & *. xla), *. xls; *. xla", "VBA cracking ")
If filename = CSTR (false) then
Exit sub
Else
Vbapassword filename, false
End if
End sub

'Sets VBA encoding Protection
Sub setprotect ()
Dim filename as string
Filename = application. getopenfilename ("Excel file (*. xls & *. xla), *. xls; *. xla", "VBA cracking ")
If filename = CSTR (false) then
Exit sub
Else
Vbapassword filename, true
End if
End sub

Private function vbapassword (filename as string, optional protect as Boolean = false)
If Dir (filename) = "" then
Exit Function
Else
Filecopy filename, filename & ". Bak"
End if

Dim getdata as string * 5
Open filename for binary as #1
Dim cmgs as long
Dim dpbo as long
For I = 1 to lof (1)
Get #1, I, getdata
If getdata = "CMG =" "Then cmgs = I
If getdata = "[host" then dpbo = I-2: exit
Next
If cmgs = 0 then
Msgbox "please first set a protection password for VBA encoding...", 32, "prompt"
Exit Function
End if
If protect = false then
Dim st as string * 2
Dim S20 as string * 1
'Get a 0d0a hexadecimal string
Get #1, cmgs-2, St
'Get a hex string
Get #1, dpbo + 16, S20
'Replace the encrypted part of the server code
For I = cmgs to dpbo Step 2
Put #1, I, St
Next
'Add an unpaired symbol
If (dpbo-cmgs) mod 2 <> 0 then
Put #1, dpbo + 1, S20
End if
Msgbox "the file is successfully decrypted...", 32, "prompt"
Else
Dim mms as string * 5
MMS = "DPB = """
Put #1, cmgs, MMS
Msgbox "special file encryption is successful...", 32, "prompt"
End if
Close #1
End Function

Original address: http://www.excelba.com/showart.asp? Art_id = 81

This code is very strong ...!!

You can copy the code to VBA by yourself. I will not provide any information on cracking the file. If you have any questions, please leave a message below. Thank you.

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.