"Reprint" How to hack a protected Excel password

Source: Internet
Author: User
Tags password protection

Tools

1. One computer (Microsoft Excel is installed)

2. Protected Excel One

Steps

1, first, open the protected Excel table, press "ALT" + "F11" key, pop up the following interface.

2, click "Insert"--"module", appears

Add the following code to the empty space:

  

Public Sub allinternalpasswords ()'Breaks Worksheet and Workbook structure passwords. Bob McCormick'probably originator of base code algorithm modified for coverage'of Workbook structure/windows passwords and for multiple passwords"'Norman Harker and JE McGimpsey 27-dec-2002 (Version 1.1)'Modified 2003-apr-04 by Jem:all msgs to constants, and'Eliminate one Exit Sub (Version 1.1.1)'reveals hashed passwords not original passwordsConst Dblspace as String = vbNewLine &vbnewlineconst AUTHORS as String= Dblspace & vbNewLine & _"adapted from Bob McCormick base code by"& _"Norman Harker and JE McGimpsey"Const HEADER as String="allinternalpasswords User Message"Const VERSION as String= Dblspace &"Version 1.1.1 2003-apr-04"Const Repback as String= Dblspace &"Please report failure"& _"To the microsoft.public.excel.programming newsgroup."Const AllClear as String= Dblspace &"The workbook should"& _"Now is free of any password protection, so do sure you:"&_dblspace&"SAVE IT now!"& Dblspace &"and also"&_dblspace&"backup!, backup!!, backup!!!"&_dblspace&"Also, remember that the password was"& _"put there for a reason. Don ' t stuff up crucial formulas"& _"or data."& Dblspace &"Access and use of some data"& _"May is an offense. If in doubt, Don ' t."Const MSGNOPWORDS1 as String="There were no passwords on"& _"sheets, or workbook structure or Windows."& AUTHORS &versionconst MSGNOPWORDS2 as String="there is no protection to"& _"workbook structure or Windows."& Dblspace & _"proceeding to unprotect sheets."& AUTHORS &versionconst Msgtaketime as String="After pressing OK button this"& _"Would take some time."& Dblspace &"Amount of Time"& _"depends on how many different passwords, the"& _"passwords, and your computer ' s specification."& Dblspace & _"Just be patient! Make me a coffee!"& AUTHORS &versionconst MSGPWORDFOUND1 as String="You had a Worksheet"& _"Structure or Windows Password set."& Dblspace & _"The password found was:"& Dblspace &"$$"& Dblspace & _"Note It down for potential the future use of other workbooks by"& _"The same person who is set this password."& Dblspace & _"Now to check and clear other passwords."& AUTHORS &versionconst MSGPWORDFOUND2 as String="You had a Worksheet"& _"password set."& Dblspace &"The password found was:"&_dblspace&"$$"& Dblspace &"Note It down for potential"& _"Workbooks by same"& _"set this password."& Dblspace &"Now to check and clear"& _"Other passwords."& AUTHORS &versionconst Msgonlyone as String="Only structure/windows"& _"protected with the password is just found."&_allclear& AUTHORS & VERSION &Repbackdim W1 As Worksheet, W2 as Worksheetdim I As Integer, J As Integer, K As Integer, L as Integerdim m as Integer , n As Integer, I1 as Integer, i2 as Integerdim i3 as Integer, I4 as Integer, i5 as Integer, I6 as Integerdim PWord1 as St Ringdim Shtag as Boolean, Wintag as Booleanapplication.screenupdating=Falsewith Activeworkbookwintag= . ProtectStructure Or. Protectwindowsend Withshtag=FalseFor each w1 in Worksheetsshtag=Shtag Or W1. Protectcontentsnext w1if not Shtag and not Wintag Thenmsgbox MSGNOPWORDS1, vbinformation, headerexit subend ifmsgbox MSGTA Ketime, vbinformation, Headerif not Wintag thenmsgbox MSGNOPWORDS2, vbinformation, Headerelseon Error Resume nextdo'dummy Do loopFor i = $To the: For j = $To the: For k = $To theFor l= $To the: For M = $To the: For i1 = $To theFor I2= $To the: For i3 = $To the: For i4 = $To theFor i5= $To the: For I6 = $To the: For n = +To126With Activeworkbook.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. ProtectStructure=False and _. Protectwindows=False ThenPWord1= Chr (i) & Chr (j) & Chr (k) & Chr (L) &_CHR (m)& Chr (i1) & Chr (i2) & Chr (i3) &_chr (I4)& Chr (i5) & Chr (I6) &Chr (n) MsgBox Application.Substitute (MSGPWORDFOUND1, _"$$", PWord1), vbinformation, Headerexit do'Bypass all for...nextsEnd ifend WithNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoop Until trueon Error GoTo0End ifif Wintag and not Shtag Thenmsgbox Msgonlyone, vbinformation, headerexit subend ifon Error Resume nextfor each W 1 in Worksheets'attempt clearance with PWord1W1. Unprotect Pword1next w1on Error GoTo0Shtag=FalseFor each w1 in worksheets'Checks for any clear shtag triggered to 1 if not.Shtag =Shtag Or W1. Protectcontentsnext w1if Shtag thenfor each w1 in Worksheetswith w1if. ProtectContents thenon Error Resume nextdo'Dummy Do LoopFor i = $To the: For j = $To the: For k = $To theFor l= $To the: For M = $To the: For i1 = $To theFor I2= $To the: For i3 = $To the: For i4 = $To theFor i5= $To the: For I6 = $To the: For n = +To126. 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 not. ProtectContents ThenPWord1= Chr (i) & Chr (j) & Chr (k) & Chr (L) &_CHR (m)& Chr (i1) & Chr (i2) & Chr (i3) &_chr (I4)& Chr (i5) & Chr (I6) &Chr (n) MsgBox Application.Substitute (MSGPWORDFOUND2, _"$$", PWord1), vbinformation, HEADER'leverage finding Pword by trying in other sheetsFor each W2 in Worksheetsw2.unprotect pword1next w2exit do'Bypass all for...nextsEnd IfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoop Until trueon Error GoTo0End ifend WithNext w1end ifmsgbox allclear& AUTHORS & VERSION &Repback, vbinformation, Headerend Sub

Click "F5" to run the macro module, password cracking, appear as, the password for the circle in the diagram

After the above steps, this Excel table password has been automatically removed, OK, now you can do whatever it takes!

"Reprint" How to hack a protected Excel password

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.