付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、去除 Excel 工作表保护密码 很有用的小工具 :)操作步骤:1. 打开需要破解密码的 Excel;2. Alt+F11,进入 VBA编辑界面;3. 插入 - 模块 (Module) ;4. 在右边 Module 的空白编辑区域,复制粘贴下面所有内容;5. F5,运行该VBA命令;Option ExplicitPublic Sub AllInternalPasswords() Breaks worksheet and workbook structure passwords. Bob McCormick probably originator of base code algorithm m
2、odified for coverage of workbook structure / windows passwords and for multiple passwordsI 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 DBL
3、SPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ Adapted from Bob McCormick base code by & _ Norman Harker and JE McGimpseyConst HEADER As String = AllInternalPasswords User Message Const VERSION As String = DBLSPACE & Version 1.1.1 2003-Apr-04 Const REPBACK
4、 As String = DBLSPACE & Please report failure & _ 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!, BAC
5、KUP!, 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 workboo
6、k 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
7、& Amount of time & _ depends on how many different passwords, the & _ passwords, and your computers 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 pass
8、word 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. & DBL
9、SPACE & 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 & _ pr
10、otected 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 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
11、Integer Dim 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 MSGNOPWO
12、RDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn 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
13、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 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
14、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:
15、 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 a
16、ll 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
17、 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, HEADER leverage finding Pword by trying on other sheets
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年合肥市浩悦环境工程有限公司员工招聘考试备考试题及答案详解
- 2026年眉山青神农商银行暑期实习生招聘考试备考题库及答案详解
- 能源综合行业市场需求分析及能源配置策略研究报告
- 医疗废物处理发展分析及无害化技术革新预测报告
- 中国煤粉产业运行现状分析与前景应用格局建议研究报告
- 旅游业地域特色发展模式文化融合营销策略分析投资评估扩张规划研究报告
- 2026年福建省莆田市中小学编制教师招聘笔试备考试题及答案详解
- 2026重庆垫江县人民政府办公室招聘全日制公益性岗位3人笔试参考试题及答案详解
- 2026年中国邮政储蓄银行陕西省分行社会招聘笔试参考题库及答案详解
- 2026年湖南岳阳市中心医院年中补充人员招聘55人笔试参考题库及答案详解
- 信誉楼老带新客户裂变
- 营养配餐工作室创新创业
- 2026年国家能源集团河南公司校园招聘笔试参考题库及答案解析
- 肝病与凝血教学课件
- 《2026年》高速收费员岗位高频面试题包含详细解答
- GB/Z 43592.2-2025纳米技术磁性纳米材料第2部分:核酸提取用磁珠的特性和测量规范
- 肿瘤学概论课件
- 手法排痰课件
- 养老护理员体位转换课件
- 2025年大学本科(机器人工程)机器人工程概论试题及答案
- 2025年山东能源集团有限公司社会招聘笔试试卷及答案
评论
0/150
提交评论