Excel工作表保护密码破解方法:SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
1\打开文件SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
2\工具---宏----录制新宏---输入名字如:aaSñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
3\停止录制(这样得到一个空宏)SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
4\工具---宏----宏,选aa,点编辑按钮SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
6\关闭编辑窗口SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!内容如下:Public Sub AllInternalPasswords() SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' Breaks worksheet and workbook structure passwords. Bob McCormick SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' probably originator of base code algorithm modified for coverage SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' of workbook structure / windows passwords and for multiple passwords SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' Modified 2003-Apr-04 by JEM: All msgs to constants, and SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' eliminate one Exit Sub (Version 1.1.1) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
' Reveals hashed passwords NOT original passwords SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const DBLSPACE As String = vbNewLine & vbNewLine SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const AUTHORS As String = DBLSPACE & vbNewLine & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Adapted from Bob McCormick base code by" & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Norman Harker and JE McGimpsey" SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const HEADER As String = "AllInternalPasswords User Message" SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const REPBACK As String = DBLSPACE & "Please report failure " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"to the microsoft.public.excel.programming newsgroup." SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"now be free of all password protection, so make sure you:" & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
DBLSPACE & "Also, remember that the password was " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"put there for a reason. Don't stuff up crucial formulas " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"or data." & DBLSPACE & "Access and use of some data " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"may be an offense. If in doubt, don't." SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGNOPWORDS1 As String = "There were no passwords on " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"sheets, or workbook structure or windows." & AUTHORS & VERSION SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGNOPWORDS2 As String = "There was no protection to " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"workbook structure or windows." & DBLSPACE & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Proceeding to unprotect sheets." & AUTHORS & VERSION SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGTAKETIME As String = "After pressing OK button this " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"will take some time." & DBLSPACE & "Amount of time " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"depends on how many different passwords, the " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"passwords, and your computer's specification." & DBLSPACE & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Just be patient! Make me a coffee!" & AUTHORS & VERSION SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Structure or Windows Password set." & DBLSPACE & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Note it down for potential future use in other workbooks by " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"the same person who set this password." & DBLSPACE & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"Now to check and clear other passwords." & AUTHORS & VERSION SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"password set." & DBLSPACE & "The password found was: " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"future use in other workbooks by same person who " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"set this password." & DBLSPACE & "Now to check and clear " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"other passwords." & AUTHORS & VERSION SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Const MSGONLYONE As String = "Only structure / windows " & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"protected with the password that was just found." & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
ALLCLEAR & AUTHORS & VERSION & REPBACK SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim w1 As Worksheet, w2 As Worksheet SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim i As Integer, j As Integer, k As Integer, l As Integer SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim PWord1 As String SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Dim ShTag As Boolean, WinTag As Boolean SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Application.ScreenUpdating = False SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
With ActiveWorkbook SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
WinTag = .ProtectStructure Or .ProtectWindows SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End With SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
ShTag = False SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For Each w1 In Worksheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
ShTag = ShTag Or w1.ProtectContents SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next w1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If Not ShTag And Not WinTag Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox MSGNOPWORDS1, vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Exit Sub SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox MSGTAKETIME, vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If Not WinTag Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox MSGNOPWORDS2, vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Else SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error Resume Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Do 'dummy do loop SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
With ActiveWorkbook SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
.Unprotect Chr(i) & Chr(j) & Chr(k) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If .ProtectStructure = False And _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
.ProtectWindows = False Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox Application.Substitute(MSGPWORDFOUND1, _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"$$", PWord1), vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Exit Do 'Bypass all for...nexts SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End With SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next: Next: Next: Next: Next: Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next: Next: Next: Next: Next: Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Loop Until True SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error GoTo 0 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If WinTag And Not ShTag Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox MSGONLYONE, vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Exit Sub SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error Resume Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For Each w1 In Worksheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
'Attempt clearance with PWord1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
w1.Unprotect PWord1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next w1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error GoTo 0 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
ShTag = False SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For Each w1 In Worksheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
'Checks for all clear ShTag triggered to 1 if not. SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
ShTag = ShTag Or w1.ProtectContents SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next w1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If ShTag Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For Each w1 In Worksheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
With w1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If .ProtectContents Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error Resume Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Do 'Dummy do loop SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
.Unprotect Chr(i) & Chr(j) & Chr(k) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
If Not .ProtectContents Then SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox Application.Substitute(MSGPWORDFOUND2, _ SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
"$$", PWord1), vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
'leverage finding Pword by trying on other sheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
For Each w2 In Worksheets SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
w2.Unprotect PWord1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next w2 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Exit Do 'Bypass all for...nexts SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next: Next: Next: Next: Next: Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next: Next: Next: Next: Next: Next SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Loop Until True SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
On Error GoTo 0 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End With SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
Next w1 SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End If SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER SñÜùEíßS
bbs.3c3t.comÖOý=u(Óz
End SubSñÜùEíßS
bbs.3c3t.comÖOý=u(Óz