excel表格忘记密码怎么破解
发布时间:2022-02-13 17:18:56
一些有着重要的excel文件,工作表肯定会添加密码,但是有时会忘记密码,这是该如何破解呢?其实设置方法不难,小编有简单暴力的方法,下面随小编一起来看看excel表格破解工作表密码的方法,欢迎大家来到学习。
excel表格破解工作表密码的方法
打开excel工作表。
然后在Excel表中找到【视图】。
点开【宏】。
然后选择【录制宏】。
接着会弹出一个窗口,点击【确定】。
在此点开【宏】,点击【停止录制】。
然后再点击【宏】,弹出窗口点击【编辑】。
然后点击【模板1】,并清空右边红框里的代码,如下图。
然后把破解代码复制粘贴进入空白处(破解代码小编将在文章最底部分享给大家)。
然后在打开【查看宏】,点击执行破解代码。
会弹出一个框,是英文的,看不懂没关系,点击确定,解密需要一段时间。
12破解代码:
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
猜你感兴趣:
1.excel忘记密码怎么破解
2.excel如何破解工作表密码
3.excel表设置密码后忘记了如何打开
4.Excel中出现密码忘记利用破解工具的操作方法
猜你喜欢
- 时隔61天,iOS15.6共推出了五个测试版,今天终于等来了iOS 15.6 RC版!iOS 15.6 RC版怎么样?苹
- Office 2013和Office 2010是最新两代的Office产品,它们相比目前多数人使用的Office 2007或者更古老的200
- 电脑出现故障,一般会采取系统重装的方法来解决。有用户反映自己重装完win10系统之后fps很低,这是怎么回事?小编认为应该是系统设置出现了问
- 升级iOS 16后可以编辑或取消发送 iMessage了,这对于容易出现拼写错误、向错误的人发送信息或引发他们以后可能会后悔的想法的人来说简
- 为区分不同类型的工作表,用户可以设置excel2003工作表标签的颜色,这样可以把不同类型的工作表设置为不同的标签颜色,用来区分。1、右击要
- 现在我们经常会用word文档记录一些重要的事情,很多时候为了安全起见,都会想给word文档加密,保护起来,那么怎么给word文档加密呢?下面
- 有部份用户在使用WIN10专业版系统的过程中,遇到了2004显卡驱动不兼容的现象不知道该如何解决,那么Win10 2004显卡驱动不兼容的问
- 在Word文档中,边框和底纹对文字都有一种修饰的作用,如果运用得当,不仅可以增加美观性也可以突出文档中的重点内容。接下来小编举例简单的例子告
- 如何将word文档中的图片转换成jpg格式呢?其实设置呢图片格式不难,小编今天就把自己在生活中总结的这方面经验介绍给您,这种方法不一定是最好
- win10系统并不是很完善,所以经常会出现些小问题,比如用户在运行应用程序的时候,无法正常启动并提示错误代码0xc0000018,那这个问题
- excel提示打印标题应为连续区域并且是整行怎么办?请看下面方法。方法1、打开Excel,点击页面布局。2、点击工作表选项右下角。3、清除顶
- 当你每次都使用一个格式写文档时,就会用到模板,用模板创建一个新的文档,可以按照这个模板的样式进行写文档,这样就不用每次都做格式了,那么我们怎
- excel怎么批量提取工作表名称?excel中有很多工作表,但是现在需要知道有多少个工作表,名称分别是什么,该怎么办呢?今天我们就来给大家分
- lnk格式的文件是不能转变成word格式的文件的1、lnk是什么格式?lnk文件是用于指向其他文件的一种文件。 这些文件通常称为“快捷方式文
- 在日常生活中,我们在EXCEL中做好了Excel表格,需要插入到WORD中。那么word怎么插入表格?下面小编就为大家介绍word中插入表格
- 智能手机越来越强大,我们在移动设备上可以随时随地通过各种方式收发文件。但收发便利并不意味着可以即时处理。为了阅读同事发过来的 Office
- 在使用电脑的过程中,明明一开始还很顺利流畅,但是鼠标偶尔会出现间歇性卡顿的情况,鼠标一卡一卡地很影响用户的使用,这主要是核心显卡和nvidi
- Excel中经常需要使用到保护功能进行保护数据,但需要取消保护的时候具体该如何操作呢?接下来是小编为大家带来的excel表格取消保护的方法,
- excel中使用下拉菜单可以方便我们日常的工作,在这的基础上为不同的内容设置不同的颜色这样就更好了。下面我们就来操作一下怎么给下拉菜单设置颜
- Word2007文档中的回车符怎么去掉方法一1、单击Word窗口左上角的Office按钮,然后在打开的面板中选择“Word选项”。 &nbs