已阅读5页,还剩30页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Excel 加密保护解锁拿到一份 Excel 文件,由于有些内容加了保护,修改不了,于是到网上搜索了一下解密方法,找到一种试了一下有效,有大家吧!1打开文件2工具-宏-录制新宏-输入名字如:aa3停止录制(这样得到一个空宏)4工具-宏-宏,选 aa,点编辑按钮5删除窗口中的所有字符(只有几个),替换为下面的内容你复制吧)Option ExplicitPublic 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-XX (Version 1.1) Modified XX-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 McGimpseyConst HEADER As String = AllInternalPasswords User MessageConst VERSION As String = DBLSPACE Version 1.1.1 XX-Apr-04Const REPBACK As String = DBLSPACE _to the gramming 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. Dont stuff up crucial formulas _or data. DBLSPACE Access and use of some data _may be an offense. If in doubt, dont.Const MSGNOPWORDS1 As String = There were no passwords on _sheets, or workbook structure or windows. AUTHORS VERSIONConst MSGNOPWORDS2 As String = There was no protection to _workbook structure or windows. DBLSPACE _AUTHORS VERSIONConst 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 computers 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 future use in other workbooks by _the same person who 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 _future use in other workbooks by same person who _set this password. DBLSPACE Now to check and clear _other passwords. AUTHORS VERSIONConst MSGONLYONE As String = Only structure / windows _protected with the password that was 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 StringDim 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 MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126With 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 GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In WorksheetsAttempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In WorksheetsChecks for all 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 = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 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, HEADERleverage finding Pword by trying on 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 GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR AUTHORS VERSION REPBACK, vbInformation, HEADEREnd Sub6关闭编辑窗口7工具-宏-宏,选AllInternalPasswords,运行,确定两次,等 2 分钟,再确定.OK,没有密码了!拿到一份 Excel 文件,由于有些内容加了保护,修改不了,于是到网上搜索了一下解密方法,找到一种试了一下有效,有大家吧!1打开文件2工具-宏-录制新宏-输入名字如:aa3停止录制(这样得到一个空宏)4工具-宏-宏,选 aa,点编辑按钮5删除窗口中的所有字符(只有几个),替换为下面的内容你复制吧)Option ExplicitPublic 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-XX (Version 1.1) Modified XX-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 McGimpseyConst HEADER As String = AllInternalPasswords User MessageConst VERSION As String = DBLSPACE Version 1.1.1 XX-Apr-04Const REPBACK As String = DBLSPACE _to the gramming 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. Dont stuff up crucial formulas _or data. DBLSPACE Access and use of some data _may be an offense. If in doubt, dont.Const MSGNOPWORDS1 As String = There were no passwords on _sheets, or workbook structure or windows. AUTHORS VERSIONConst MSGNOPWORDS2 As String = There was no protection to _workbook structure or windows. DBLSPACE _AUTHORS VERSIONConst 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 computers 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 future use in other workbooks by _the same person who 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 _future use in other workbooks by same person who _set this password. DBLSPACE Now to check and clear _other passwords. AUTHORS VERSIONConst MSGONLYONE As String = Only structure / windows _protected with the password that was 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 StringDim 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 MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126With 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 GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In WorksheetsAttempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In WorksheetsChecks for all 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 = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 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, HEADERleverage finding Pword by trying on 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 GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR AUTHORS VERSION REPBACK, vbInformation, HEADEREnd Sub6关闭编辑窗口7工具-宏-宏,选AllInternalPasswords,运行,确定两次,等 2 分钟,再确定.OK,没有密码了!拿到一份 Excel 文件,由于有些内容加了保护,修改不了,于是到网上搜索了一下解密方法,找到一种试了一下有效,有大家吧!1打开文件2工具-宏-录制新宏-输入名字如:aa3停止录制(这样得到一个空宏)4工具-宏-宏,选 aa,点编辑按钮5删除窗口中的所有字符(只有几个),替换为下面的内容你复制吧)Option ExplicitPublic 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-XX (Version 1.1) Modified XX-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 McGimpseyConst HEADER As String = AllInternalPasswords User MessageConst VERSION As String = DBLSPACE Version 1.1.1 XX-Apr-04Const REPBACK As String = DBLSPACE _to the gramming 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. Dont stuff up crucial formulas _or data. DBLSPACE Access and use of some data _may be an offense. If in doubt, dont.Const MSGNOPWORDS1 As String = There were no passwords on _sheets, or workbook structure or windows. AUTHORS VERSIONConst MSGNOPWORDS2 As String = There was no protection to _workbook structure or windows. DBLSPACE _AUTHORS VERSIONConst 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 computers specification. DBLSPACE _Just be patient! Make me a coffee! AUTHORS VERSIONConst MSGPWORDFO
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 碳综合知识练习题及答案
- 2026年科普知识普及竞赛题库
- 2026年心理疾病识别与预防测试
- 2026年中华传统礼仪文化测试
- 2026年消防安全与防火知识测试卷
- 2026网络安全应急响应与处置模拟试题
- 2026年管理学原理核心考点习题
- 2026年政治考研核心考点解析与习题
- 2026年北京市消防设施操作员基础测试题
- 2026年环境保护与可持续发展战略实践试卷
- 玉盘二部合唱简谱
- 中医基础理论脾课件
- GB/T 44876-2024外科植入物骨科植入物的清洁度通用要求
- 牧场物语-矿石镇的伙伴们-完全攻略
- DB12T 1347-2024 沥青混合料理论最大相对密度试验规程+浸渍法
- DL∕T 2032-2019 计量用低压电流互感器
- 医学影像技术可研报告-南阳医学高等专科学校
- 2024年陕西国防工业职业技术学院单招职业技能测试题库附答案
- 葡萄酒wset二级复习题及葡萄酒考试题-初级
- 糖尿病的健康风险评估与个体化治疗策略
- 试模模具和设备确认表
评论
0/150
提交评论