`
Johnny_GZ
  • 浏览: 179066 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Excel保护破解

 
阅读更多

打开受保护的Excel表格,按“ALT”+“F11”键,

点击“插入”——“模块”,

复制下面的代码,粘贴到空白区域

点击“F5”运行宏模块,进行密码破解,

此Excel的表格的密码已经自动除去

 

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 passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const 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 be free of all password protection, so make 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 be an offense. If in doubt, don't."
Const MSGNOPWORDS1 As String = "There were no passwords on " & _
"sheets, or workbook structure or windows." & AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "There was no protection to " & _
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will 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 & VERSION
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
"Structure or Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _
"Note it down for potential future use in other workbooks by " & _
"the same person who set this password." & DBLSPACE & _
"Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
"password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
"future use in other workbooks by same person who " & _
"set this password." & DBLSPACE & "Now to check and clear " & _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
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
With 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 Then
PWord1 = 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, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
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
.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 Then
PWord1 = 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 on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub

分享到:
评论

相关推荐

    excel保护破解(宏)

    excel保护破解 Excel保护破解 ,打开文件,启用宏,

    EXCEL密码保护破解

    ### EXCEL密码保护破解知识点详解 #### 一、背景与目的 在日常工作中,我们经常使用Excel来存储和处理各种敏感或重要的数据。为了保护这些数据的安全性,用户可能会为Excel文档设置密码保护。然而,在某些情况下,...

    excel保护密码破解方法

    ### Excel保护密码破解方法 ...通过上述分析可以看出,利用VBA宏来破解Excel保护密码是一种有效的解决方案,但需要注意的是,在实际操作中应遵守相关法律法规,并谨慎处理个人信息和数据安全问题。

    VBA破解EXCEL表格保护

    VBA破解EXCEL表格保护 VBA破解EXCEL表格保护是指使用VBA宏来破解EXCEL工作表的保护密码的过程。这一过程可以帮助用户破解EXCEL工作表的保护密码,从而可以修改工作表的内容。 VBA宏是Visual Basic for ...

    真正有效的Excel工作表保护密码破解

    真正有效的Excel工作表保真正有效的Excel工作表保护密码破解护密码破解真正有效的Excel工作表保护密码破解

    excel保护密码如何破解

    Excel保护密码破解方法 Excel保护密码破解是指对Excel文档中的密码进行破解,以便在不需要...破解Excel保护密码可以通过使用VBA编程来实现,但需要注意一些相关的知识点和注意事项,以确保破解过程的安全和可靠性。

    破解excel表格保护

    破解电子表格保护,破解、excel表格、保护

    excel 保护密码破解

    直接解压,打开源文件就可以了,在excel工具里就有一个破解密码的提示,点击就可以了。

    EXCEL宏保护密码破解

    EXCEL 宏保护密码破解 EXCEL 宏保护密码破解是指使用 VBA 代码来破解 EXCEL 文件中的宏保护密码。这种方法可以帮助用户快速破解 EXCEL 文件中的宏保护密码,免除用户记忆繁琐的密码带来的麻烦。 在 EXCEL 中,宏...

    破解EXCEL保护密码

    1\打开excel文件 2\在工具——宏——-录制新宏——输入名字如:brake 3\停止录制(得到一个空宏) 4\工具——宏——宏,选11,点编辑按钮 5\删除窗口中的所有字符,替换为下面的内容 6\关闭编辑窗口 7\工具——宏...

    Excel工作表保护密码破解

    我的一次任务中,需要用到Excel中隐藏公式及初始化数据, 而工作表加了密码密码保护无法获取, 最终通过该代码获取到了等价的密码,并进行了解锁。 适用于Excel2000/Excel XP/Excel 2003/Excel 2007, 更高级的版本...

    得力打卡机破解Excel工作表保护密码.pdf

    得力打卡机破解Excel工作表保护密码.pdf

    excel 密码保护破解

    绝对迅速,不用几分钟就能完全移除保护密码!

    EXCEL2007工作表密码保护破解.pdf

    以下是一个详细步骤,教你如何通过VBA宏来破解Excel 2007工作表和工作簿的密码保护: 1. **打开文件**:首先,你需要打开那个受密码保护的Excel 2007工作簿。 2. **启用开发者工具**:点击左上角的"Office"按钮,...

    Excel保护密码破解程序

    Excel保护密码破解程序,可以解除excel编辑限制

    EXCEL密码破解工具破解版

    可以破解EXCEL的密码及保护密码。2003 2007均可使用。

    破解EXCEL工作表保护的方法

    ### 破解EXCEL工作表保护的方法 #### 背景与意义 在日常工作中,Excel被广泛用于数据处理、统计分析等场景。为了确保数据的安全性与完整性,Excel提供了工作表保护功能,允许用户为工作表设置密码,防止他人随意...

Global site tag (gtag.js) - Google Analytics