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