主编研习windows10系统下怎样破解excel密码的方案?
发布时间:2013-09-14 作者: 老友win8系统 来源: http://www.win7wim.com
windows10系统下怎么破解excel密码?一位网友反馈自己在win10系统中碰到了无法打开Excel文档的情况,提示需要写入密码才能查看,感觉非常烦恼。接下来,笔记本之家小编将给我们详细详解win10破解excel密码的办法。
推荐:win10系统下载中文
步骤如下:
1、打开加密的 Excel,然后用快捷命令Alt+F8 打开宏命令 窗口,如图所示:
2、在宏名一栏中 写入宏的名字 随意健入,如图:
3、写入完宏名后 创建的按钮就亮了 打开创建 咱们就看到了新界面,如图:
4、将编辑框内的sub knife( )End sub删除 将下列代码 复制 上去:
option Explicit
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
5、关闭【宏窗口】回到Excel,按下ALT+F8组合键重头打开【宏命令窗口】,如图所示:
6、你会发现 你前面写入的宏名 变成了Allinternalpasswords 打开【执行】 会出现全英文的提示框,一直打开【确定】便可;
7、一直点 确定 直到不在 出现对话框为止。
等一段之系统会再次跳出对话框 再点确定 保护就破解成功,重头打开Excel表格即无需写入密码。是不是非常简单呢?若是你也有同样需求的话,不妨参考本教程进行操作!