雨林木风一键重装系统
当前位置:主页 > 系统之家系统教程 > 笔者演示电脑部分excel文件受保护破解的技巧?

笔者演示电脑部分excel文件受保护破解的技巧?

日期:2018-03-07 00:00 作者:系统之家系统 来源:http://www.xitongzijia.com

笔者演示电脑部分excel文件受保护破解的技巧?
?

今天和我们分享excel破解受保护文件,为保护文件安全部分excel文档做了受保护操作,如果需要编辑或者更改,咱们就需要破解受保护模式。那么电脑部分excel文件受保护怎样破解?其实破解办法不难,接下去一起看下电脑部分excel文件受保护的破解办法。

推荐:最新系统下载

?

具体办法如下:

1、打开你需要破解的受保护文件,打开视图,找到宏选项;

2、打开录制宏,如图 ,写入宏名,可以随意写入,但记住不能是数字;

3、打开确定,创建成功以后,再打开停止录制;

4、以后打开查看宏,找到你刚刚创建的宏,然后打开编辑,把原有代码删除。贴入如下代码

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文件受保护的破解办法,虽然步骤比较多,但是操作起来还是比较容易的。

我要分享:

相关系统推荐


Copyright @ 2021 版权所有 系统之家系统