Cracking excel2010 protected workbooks

Source: Internet
Author: User

Today, my colleague encountered an Excel problem. He forgot the password protected by the workbook, so that he could no longer edit the data in the document. So I ran for help. This problem was finally solved, but I personally think it is quite interesting. So I should release this method and take notes for myself.

First, make sure that the version used is the 64-bit English version office2010.

If you do not enter a password for the protected workbook, the following error is returned when you try to edit the workbook.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/F2/wKiom1PM3xCDfsuRAAED4EDAF-c111.jpg "style =" float: none; "Title =" 1.png" alt = "wKiom1PM3xCDfsuRAAED4EDAF-c111.jpg"/>

"The cell or chart you are trying to change is protected and therefore read-only. To modify protected cells or charts, use the 'undo worksheet extension' command (in the 'change' group on the 'review' tab) to cancel protection. You may be prompted to enter the password ".

In this case, we can use the VBA macro code to crack the password protected by the workbook:

1. Open the Excel worksheet to be cracked

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/3F/F2/wKiom1PM3xaxydhAAAGo6Kr6h3o010.jpg "style =" float: none; "Title =" 2.png" alt = "wkiom1pm3xaxydhaaag6kr6h3o010.jpg"/>

The "unprotect sheet" highlighted on the menu shows that the workbook is still protected.

2. press Alt + F11 or find "view code" in "Developer Tools"

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/F2/wKioL1PM4DLx8rvbAAESDS1RfV4139.jpg "style =" float: none; "Title =" 3.png" alt = "wkiol1pm4dlx8rvbaaesds1rfv4139.jpg"/>

3. Then paste all the following code in the white space above, without changing any characters in the code


Sub passwordbreaker ()
'Breaks worksheet password protection.
Dim I as integer, J as integer, K as integer
Dim L as integer, M as integer, N as integer
Dim I1 as integer, I2 as integer, I3 as integer
Dim I4 as integer, I5 as integer, I6 as integer
On Error resume next
For I = 65 to 66: For J = 65 to 66: For k = 65 to 66
For l = 65 to 66: For M = 65 to 66: For I1 = 65 to 66
For I2 = 65 to 66: For I3 = 65 to 66: For I4 = 65 to 66
For I5 = 65 to 66: for I6 = 65 to 66: for n = 32 to 126.
Activesheet. unprotect CHR (I) & CHR (j) & CHR (k )&_
CHR (l) & CHR (m) & CHR (I1) & CHR (I2) & CHR (I3 )&_
CHR (I4) & CHR (I5) & CHR (I6) & CHR (N)
If activesheet. protectcontents = false then
Msgbox "one usable password is" & CHR (I) & CHR (j )&_
CHR (k) & CHR (l) & CHR (m) & CHR (I1) & CHR (I2 )&_
CHR (I3) & CHR (I4) & CHR (I5) & CHR (I6) & CHR (N)
Exit sub
End if
Next: Next
Next: Next
End sub


4. Press F5 or click "run ".

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/F2/wKioL1PM4DfjJkweAARjs14Zm9w358.jpg "style =" float: none; "Title =" 4.png" alt = "wkiol1pm4dfjjkwew.js14zm9w358.jpg"/>

5. OK. The current Excel worksheet has become unprotected. At the same time, a dialog box is displayed, containing a set of passwords, which can be used to crack other worksheets in the same Excel worksheet.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/3F/F2/wKioL1PM4DyzYg6vAAJcnaGLvp8145.jpg "style =" float: none; "Title =" 5.png" alt = "wkiol1pm4dyzyg6vaajcnaglvp8145.jpg"/>

6. Now let's see that the status of the menu on the workbook has changed to "protect sheet"

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/3F/F2/wKiom1PM3yLiX4pcAADDgVBTzcM152.jpg "style =" float: none; "Title =" 6.png" alt = "wkiom1pm3ylix4pcaaddgvbtzcm152.jpg"/>


This article from the "Liu Xiao-Technical Achievement dream" blog, please be sure to keep this source http://pekingsmile.blog.51cto.com/16687/1441045

Cracking excel2010 protected workbooks

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.