破解vbaproject密码Word格式.doc
《破解vbaproject密码Word格式.doc》由会员分享,可在线阅读,更多相关《破解vbaproject密码Word格式.doc(3页珍藏版)》请在冰豆网上搜索。
ConstHEADERAsString="
工作表保护密码破解"
ConstVERSIONAsString=DBLSPACE&
"
版本Version1.1.1"
ConstREPBACKAsString=DBLSPACE&
ConstZHENGLIAsString=DBLSPACE&
hfhzi3—戊冥整理"
ConstALLCLEARAsString=DBLSPACE&
该工作簿中的工作表密码保护已全部解除!
!
&
DBLSPACE&
请记得另保存"
&
注意:
不要用在不当地方,要尊重他人的劳动成果!
ConstMSGNOPWORDS1AsString="
该文件工作表中没有加密"
ConstMSGNOPWORDS2AsString="
该文件工作表中没有加密2"
ConstMSGTAKETIMEAsString="
解密需花费一定时间,请耐心等候!
按确定开始破解!
ConstMSGPWORDFOUND1AsString="
密码重新组合为:
$$"
如果该文件工作表有不同密码,将搜索下一组密码并修改清除"
ConstMSGPWORDFOUND2AsString="
如果该文件工作表有不同密码,将搜索下一组密码并解除"
ConstMSGONLYONEAsString="
确保为唯一的?
Dimw1AsWorksheet,w2AsWorksheet
DimiAsInteger,jAsInteger,kAsInteger,lAsInteger
DimmAsInteger,nAsInteger,i1AsInteger,i2AsInteger
Dimi3AsInteger,i4AsInteger,i5AsInteger,i6AsInteger
DimPWord1AsString
DimShTagAsBoolean,WinTagAsBoolean
Application.ScreenUpdating=False
WithActiveWorkbook
WinTag=.ProtectStructureOr.ProtectWindows
EndWith
ShTag=False
ForEachw1InWorksheets
ShTag=ShTagOrw1.ProtectContents
Nextw1
IfNotShTagAndNotWinTagThen
MsgBoxMSGNOPWORDS1,vbInformation,HEADER
ExitSub
EndIf
MsgBoxMSGTAKETIME,vbInformation,HEADER
IfNotWinTagThen
Else
OnErrorResumeNext
Do'
dummydoloop
Fori=65To66:
Forj=65To66:
Fork=65To66
Forl=65To66:
Form=65To66:
Fori1=65To66
Fori2=65To66:
Fori3=65To66:
Fori4=65To66
Fori5=65To66:
Fori6=65To66:
Forn=32To126
.UnprotectChr(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=FalseAnd_
.ProtectWindows=FalseThen
PWord1=Chr(i)&
Chr(l)&
Chr(m)&
Chr(i3)&
Chr(i4)&
MsgBoxApplication.Substitute(MSGPWORDFOUND1,_
PWord1),vbInformation,HEADER
ExitDo'
Bypassallfor...nexts
Next:
Next:
Next
LoopUntilTrue
OnErrorGoTo0
IfWinTagAndNotShTagThen
MsgBoxMSGONLYONE,vbInformation,HEADER
'
AttemptclearancewithPWord1
w1.UnprotectPWord1
ChecksforallclearShTagtriggeredto1ifnot.
IfShTagThen
Withw1
If.ProtectContentsThen
Dummydoloop
IfNot.ProtectContentsThen
MsgBoxApplication.Substitute(MSGPWORDFOUND2,_
leveragefindingPwordbytryingonothersheets
ForEachw2InWorksheets
w2.UnprotectPWord1
Nextw2
MsgBoxALLCLEAR&
AUTHORS&
VERSION&
REPBACK&
ZHENGLI,vbInformation,HEADER
EndSub
4.点保存,然后关闭“BOOK1”
5.点运行,就OK了