EXCEL VBAProject密码破解 工作表密码破解

news/2024/11/27 23:44:38/

1.      VABProject密码

a.      下载hex editor二进制编辑器,使用查找功能定位到DPB=”…….上


b.      把DPB更改成DPx保存

c.      重新打开EXCEL会提示错误未找到关键字DPx是否继续加载工程,选择 是

d.      Alt+F11打开VBA工程,右键顶节点,VBAProject属性,保护,重新输入一个新密码,保存excel

e.      再次打开就可以用新密码解锁VBA工程

 

2.      解锁工作表密码

简单来说:把以下VBA代码放到被加密的EXCEL的VBA工程中执行即可


 1、新建一个EXCEL文件“BOOK1”,在工具栏空白位置,任意右击,选择Visual Basic项,弹出Visual Basic工具栏:

   2、在Visual Basic工具栏中,点击“录制”按钮,弹出“录制新宏”对话框,选择“个人宏工作簿”: 

 3、选择“个人宏工作簿”后按确定,弹出如下“暂停”按钮,点击停止: 

 4、在Visual Basic工具栏中,点击“编辑”按钮: 

 5、点击“编辑”按钮后,弹出如下图的编辑界面: 
      
找到“VBAProject(PERSONAL.XLS)-模块-模块1(也可能是模块N-其他数字)” 
      
双击模块1-将右边代码内容清空  

6、复制“工作保护密码破解”代码到右边框中,点保存,然后关闭“BOOK1 

7、运行需要解密的“EXCEL文件”,在Visual Basic工具栏中,点击“运行”按钮 

8、点击“运行”按钮后,弹出“宏”对话框, 
     
点击运行“PERSONAL.XLS!工作保护密码破解”这个宏 

 9、运行“PERSONAL.XLS!工作保护密码破解”这个宏后, 
     
如下图示意就可以 解除工作表的密码保护了 

10.  (这个图,如果工作表中有多组不同密码, 
   
每解开一组,就会提示一次,也就说可能会出现几次)


工作表保护密码破解(代码)

=========请复制以下内容=============

Public Sub 工作表保护密码破解()
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"
作者:McCormick   JE McGimpsey "
Const HEADER As String = "工作表保护密码破解"
Const VERSION As String = DBLSPACE & "版本Version 1.1.1"
Const REPBACK As String = DBLSPACE & ""
Const ZHENGLI As String = DBLSPACE & "                  hfhzi3—戊冥 整理"
Const ALLCLEAR As String = DBLSPACE & "该工作簿中的工作表密码保护已全部解除!!" & DBLSPACE & "请记得另保存"_
& DBLSPACE & "注意:不要用在不当地方,要尊重他人的劳动成果!"
Const MSGNOPWORDS1 As String = "该文件工作表中没有加密"
Const MSGNOPWORDS2 As String = "该文件工作表中没有加密2"
Const MSGTAKETIME As String = "解密需花费一定时间,请耐心等候!" & DBLSPACE & "按确定开始破解!"
Const MSGPWORDFOUND1 As String = "密码重新组合为:"& DBLSPACE & "

" & DBLSPACE & _ 
"如果该文件工作表有不同密码,将搜索下一组密码并修改清除" 
Const MSGPWORDFOUND2 As String = "密码重新组合为:"& DBLSPACE & "
" & DBLSPACE & _ "如果该文件工作表有不同密码,将搜索下一组密码并修改清除" Const MSGPWORDFOUND2 As String = "密码重新组合为:"& DBLSPACE & "
" & DBLSPACE & _
"如果该文件工作表有不同密码,将搜索下一组密码并解除"
Const MSGONLYONE As String = "确保为唯一的?"
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
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 & ZHENGLI,vbInformation, HEADER
End Sub


http://www.ppmy.cn/news/136000.html

相关文章

Excel·VBA破解密码

上一篇文章《ExcelVBA数组排列函数》,实现了VBA排列功能,而排列重要应用就是破解密码 目录 Excel密码破解zip、rar密码破解 Excel密码破解 支持破解纯数字、数字字母混合、纯字母等形式的密码 因破解速度不快,支持排列分段破解 Sub excel破…

【WIN】超简单的Excel密码破解

新开一Excel,同时按AltF11,进入VBA界面,点菜单上的插入,模块,在新出来的窗口粘贴一下代码: Sub crack() Dim i As Long Dim FileName As String i 0 FileName Application.GetOpenFilename("Excel文…

Excel 各种密码的破解,各种大全值得收藏!(亲测有效)

本文介绍在 Excel 的多个文件版本中破解各类密码,包含文件的查看、只读密码,工作表、工作簿的保护密码,以及 VBA 工程密码。内容非常全面,建议你收藏。文件作者加密码是防止数据被查看,修改,所以&#xff0…

Excel 各种密码的破解,大全建议收藏!

本文介绍在 Excel 的多个文件版本中破解各类密码,包含文件的查看、只读密码,工作表、工作簿的保护密码,以及 VBA 工程密码。内容非常全面,建议你收藏。文件作者加密码是防止数据被查看,修改,所以&#xff0…

excel文件管理:如何进行密码保护和破解? 上篇

对于一个公司,或者个人来说,有时候我们的数据往往需要加密。比如公司的经营状况和缴纳的税收有关系,人事档案中有每位员工的个人信息和工资组成说明,这些都是不需要无关人员知道的。微软对于EXCEL的设计就比较人性化,考…

忘记文档密码,教你破解WORD/EXECL/PPT文件加密密码

“ 大家办公时,有设置密码习惯,并且容易忘记密码,今天给大家提供一款超好用得小工具,。不定时更新软件、高效率工具小福利!!!” 软件:Advanced OfficePassword Recovery 今天给大家…

C#,码海拾贝(30)——求“广义逆”的“奇异值分解法SVD”C#源代码,《C#数值计算算法编程》源代码升级改进版

using System; namespace Zhou.CSharp.Algorithm { /// <summary> /// 矩阵类 /// 作者&#xff1a;周长发 /// 改进&#xff1a;深度混淆 /// https://blog.csdn.net/beijinghorn /// </summary> public partial class Matrix {…

新型UVC+UVA紫外线口罩消毒器-疫情防护+环境保护

疫情不知不觉已爆发了两年&#xff0c;两年内&#xff0c;疫情反反复复&#xff0c;这两年大家经历了太多太多&#xff0c;有好的有坏的&#xff0c;有泪水也有欢笑&#xff01;面对疫情&#xff0c;我们从一开始的不知所措&#xff0c;到现在的坦然应对。我们在保护自己的同时…