找回密码
 入住遨海湾
搜索
网站解决方案专享优惠-3折上云
查看: 1427|回复: 0

EXCEL工作表保护密码破解ZT

[复制链接]
发表于 2008-7-22 15:58:00 | 显示全部楼层 |阅读模式

登录后查才能浏览下载更多咨询,有问题联系QQ:3283999

您需要 登录 才可以下载或查看,没有账号?入住遨海湾

×
两天前在公司上班网上Q时,见到久违的工作一族的姑姑,她一份重要的工作报表密码遗失...于是我在网上找破解密码的软件,这破解的软件倒是很多,但都不适用,于是...继续搜索。想想念了三年的计算机,学到了什么...真是惭愧无言... 我的工作大部份也是做报表,是公司车辆的信息报表。重要的报表时常有密码保护,与报表密切联系的工作一族很需要知道这些知识,无疑这可以给我们的工作带来方便。 在网上找到了这份破解代码,成功破解了,但不能找到原表的密码,这是最遗憾的。还有破解的表的安全系数会低点。对工作报表一族超级无敌有用!! 方法: ' T% U5 B9 `+ S1\打开文件 0 s$ E" w; s: S+ ^7 i/ U t& l2\工具---宏----录制新宏---输入名字如:aa , l1 s4 d7 V( A! z7 F3\停止录制(这样得到一个空宏) 6 h4 \, k! q+ M9 Q5 X" H4\工具---宏----宏,选aa,点编辑按钮1 R; n$ k- x" k2 p1 R/ {; I 5\删除窗口中的所有字符(只有几个),替换为下面的内容复制吧) & G8 J" y2 m; E6\关闭编辑窗口' G& u- ^9 Y" O 7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!7 Y3 ?* d5 D% l: J0 p- ?* x; | 内容如下: 1 ~2 T) X" F: U9 s' w/ ePublic Sub AllInternalPasswords() ! w6 {. } H4 R0 L7 |& f ' Breaks worksheet and workbook structure passwords. Bob McCormick ) s# o8 m, g7 g6 |+ D! |% u ' probably originator of base code algorithm modified for coverage 4 q: E4 y! B& c# E+ t- S, x' of workbook structure / windows passwords and for multiple passwords * z5 V- W8 x+ J: h2 ?% g- b3 V ' 6 o. A- W& m; J0 ] ' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) . E: f/ I4 T* \( o% l; Y/ `% r, d ' Modified 2003-Apr-04 by JEM: All msgs to constants, and 3 m# t) n: b9 q6 B c n% f& k' eliminate one Exit Sub (Version 1.1.1) ! |- q3 j7 O) Q' Reveals hashed passwords NOT original passwords + |+ f/ z# [6 t% n8 a Const DBLSPACE As String = vbNewLine & vbNewLine ) d) m* m* ?: _- ~* ^+ t6 E( }Const AUTHORS As String = DBLSPACE & vbNewLine & _ : D. _) D0 ^4 {2 ~" _ "Adapted from Bob McCormick base code by" & _ ( ~5 ?8 U4 Y6 g "Norman Harker and JE McGimpsey" $ c+ d1 T# N/ p0 r; w, l" z1 { Const HEADER As String = "AllInternalPasswords User Message" " A" a: q/ A( s. rConst VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" + u( M( ^3 M1 ^0 v4 |, iConst REPBACK As String = DBLSPACE & "lease report failure " & _ $ N& W0 {( g9 a* w# M) X2 h4 z( a"to the microsoft.public.excel.programming newsgroup." . R7 [/ Q1 T% c5 [8 C6 w5 x0 t Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ , w0 _0 R: e1 P2 M1 A( w- r "now be free of all password protection, so make sure you:" & _ " l8 b9 x! r4 X. f3 A( t; @/ }5 ]% vDBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ $ j: X+ M8 K: J8 A( n! R8 _/ sDBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _ % O$ G* k. f" e& O. m DBLSPACE & "Also, remember that the password was " & _ - A+ n" Q- m% E1 B+ I* K1 G4 d "put there for a reason. Don't stuff up crucial formulas " & _ . Q3 t. t9 _0 u( v# F+ |/ z"or data." & DBLSPACE & "Access and use of some data " & _ 7 o9 A: j# N, U6 G( c"may be an offense. If in doubt, don't." 6 A" V# l2 T% T4 p' s Const MSGNOPWORDS1 As String = "There were no passwords on " & _ 3 Q7 L2 Q+ T" \" u I |"sheets, or workbook structure or windows." & AUTHORS & VERSION 4 s# \. B8 D' A5 l% ?: A- ZConst MSGNOPWORDS2 As String = "There was no protection to " & _ ) |: ]: c5 Y' U' D- I7 H ]"workbook structure or windows." & DBLSPACE & _ 7 n' h/ j& I0 H+ A" j! v"roceeding to unprotect sheets." & AUTHORS & VERSION 5 B" P! [! M' j; b# mConst MSGTAKETIME As String = "After pressing OK button this " & _ : X: g b* j' ?$ U, A- e"will take some time." & DBLSPACE & "Amount of time " & _ 8 Y4 _7 N) Q& ~, [ "depends on how many different passwords, the " & _ $ ~3 ]+ r# K7 S. b"passwords, and your computer's specification." & DBLSPACE & _ + n% o% ?/ ^% S% f! E5 L# W"Just be patient! Make me a coffee!" & AUTHORS & VERSION / p* O9 c1 m/ L; y, A5 bConst MSGPWORDFOUND1 As String = "You had a Worksheet " & _ 0 a# L1 i0 b2 _8 v' k2 V1 ] "Structure or Windows Password set." & DBLSPACE & _ 0 y$ p; Z- @" v"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ $ N/ h5 c$ U7 @ s8 N "Note it down for potential future use in other workbooks by " & _ / ~# y. V+ T" b: a0 B( T8 c% L3 _1 C"the same person who set this password." & DBLSPACE & _ 1 R0 r( W" H. L9 [$ g& b& q$ w' j/ Y "Now to check and clear other passwords." & AUTHORS & VERSION 5 f1 v Z9 Y+ a' x8 s Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ 9 c1 B4 M3 A* b! J "password set." & DBLSPACE & "The password found was: " & _ U! J: ]. d {* l4 ]: DDBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _ 4 D$ k( m Y- H R( b" ^"future use in other workbooks by same person who " & _ . P3 p1 H7 F) c0 ?+ y5 V "set this password." & DBLSPACE & "Now to check and clear " & _ % ]7 h: @. _, {* i; i5 V"other passwords." & AUTHORS & VERSION $ u" h1 b7 n& e) M. i Const MSGONLYONE As String = "Only structure / windows " & _ # i6 N- Q' F3 d# u+ E) ~- m "protected with the password that was just found." & _ 9 m- N; ~9 K: t1 F" f ALLCLEAR & AUTHORS & VERSION & REPBACK 2 ~4 w# q& @7 [1 I Dim w1 As Worksheet, w2 As Worksheet & n2 ^9 M4 r3 z, Z. S: L5 }5 DDim i As Integer, j As Integer, k As Integer, l As Integer - u1 C3 d/ k* r5 P6 FDim m As Integer, n As Integer, i1 As Integer, i2 As Integer 4 J u) Q; v1 V3 F$ n! }" O& m; oDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer " w5 U0 a8 U: O* G2 N9 ^Dim PWord1 As String ) w+ m- V( U0 ^3 a: R2 IDim ShTag As Boolean, WinTag As Boolean ( y( A4 B$ B4 t5 D) }9 {5 ]- z+ m4 `) f Application.ScreenUpdating = False # |8 k. z" F, G( d3 L$ e With ActiveWorkbook " r8 _' R) a/ z- _ |. ~ WinTag = .ProtectStructure Or .ProtectWindows ' H; ?, U8 p, I% NEnd With # g0 h$ r/ E6 i1 e ShTag = False : b1 p$ l1 b! T5 V For Each w1 In Worksheets 5 x% w/ m1 g; C ShTag = ShTag Or w1.ProtectContents . ~ H- S. s0 Q+ u6 Z( ? Next w1 5 f0 ^, ? M, N" l2 a7 E- _/ l If Not ShTag And Not WinTag Then 7 G- A M4 b! zMsgBox MSGNOPWORDS1, vbInformation, HEADER 8 r) E: Z# p6 a- _8 ~Exit Sub N! q- a/ n% R& U) S; l3 [$ Q9 ~ End If 1 {5 ]# o6 v/ M' q% _, S MsgBox MSGTAKETIME, vbInformation, HEADER * @8 z( t+ q+ {; Y" J# g If Not WinTag Then ' }% \, u! T: G9 F0 _MsgBox MSGNOPWORDS2, vbInformation, HEADER ! v( W9 O7 p `/ sElse 0 d# m* n! M6 w: h! j, e On Error Resume Next 8 x1 r% r$ o# t9 ^) b3 q7 r6 C2 RDo 'dummy do loop . A) U& Z! y& [6 T# F) f4 J+ PFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66 . l. x! b- N3 V! {: tFor l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 1 m% R3 o8 e3 I$ yFor i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 8 q" U2 y4 u1 y* D& I7 Q! ~ For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 - q9 J) N0 H* Y- N% P% B With ActiveWorkbook + @7 \1 s, A1 j. ? .Unprotect Chr(i) & Chr(j) & Chr(k) & _ 4 t. M& o0 d2 R6 W$ h2 O Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ . b& {7 n1 ]/ r9 W5 z+ ~( q( L Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) 7 _$ e3 ^1 u1 X0 @: fIf .ProtectStructure = False And _ + u c( x3 c. i" X3 I( D9 l .ProtectWindows = False Then ! [: v4 q7 f( s8 n0 u0 h( e- A! i PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ $ L6 Y. n# P- L+ [: _; X7 K Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ + |% m/ L3 C( }2 c; l: iChr(i4) & Chr(i5) & Chr(i6) & Chr(n) ! Z3 w$ I i( AMsgBox Application.Substitute(MSGPWORDFOUND1, _ 9 T( W% `8 i1 I, A "$$", PWord1), vbInformation, HEADER ( g4 v+ u- }0 P5 b Exit Do 'Bypass all for...nexts / k! m4 e+ R; p: v End If 7 n( L' k: j4 F ~. F% ZEnd With . i) u5 G8 _- E7 O0 C8 c$ N* hNext: Next: Next: Next: Next: Next 7 V/ { C% D f: P: g( Z" J% O H7 g Next: Next: Next: Next: Next: Next 1 S0 ~) B1 @, g0 g$ n Loop Until True ' R% }8 z, h- q8 }, U6 R6 DOn Error GoTo 0 / D6 s- j4 i. R/ t8 a End If & I, A. G4 ]- A+ y+ R( `5 nIf WinTag And Not ShTag Then ( ?$ e c/ U( D7 g% [, V2 TMsgBox MSGONLYONE, vbInformation, HEADER 3 U/ C6 Q u# i8 x: g2 J8 u4 t. `( [Exit Sub ! I; {4 \4 H. r; d8 xEnd If \( t, U# E5 kOn Error Resume Next $ ?2 S* D# R# ~0 }( W2 |& f8 H For Each w1 In Worksheets / a; n# G3 O! ~'Attempt clearance with PWord1 ; `, E' n/ U5 _! c# T' x0 e w1.Unprotect PWord1 " L( \$ C4 Y. b; [* P2 {" n7 t9 R1 D Next w1 6 @& r+ X& s: W! Q+ z/ } On Error GoTo 0 ' [; q2 E; [" H8 m% hShTag = False % n W6 m* f4 c8 \; K# h For Each w1 In Worksheets ' T: ]3 r3 G2 ^4 _7 r) {! U( k'Checks for all clear ShTag triggered to 1 if not. 0 U2 j2 \1 l" ]0 U& r8 n' mShTag = ShTag Or w1.ProtectContents 3 e0 y, N8 R2 V* l- U7 N; G0 P Next w1 ; P# u z% L+ w% b# U' R% M If ShTag Then . h: z: a' ^' s: N0 o% y8 NFor Each w1 In Worksheets * s1 l4 ~! u1 K* QWith w1 / r1 r; X% Z t, b% r. ^) IIf .ProtectContents Then # [9 ~7 R, R4 G9 h3 k- p# v0 V On Error Resume Next % K5 x* r$ R; O Do 'Dummy do loop ' E5 p( L4 j( b& W* l2 G, NFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66 : M. G1 ] f; I/ S) t- G1 P. SFor l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 $ ?; Y8 X `* S6 UFor i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 . d! A# j0 f! e3 \# _! e; _, \ For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 . a( I P; g+ S$ X) T. i: q.Unprotect Chr(i) & Chr(j) & Chr(k) & _ , M2 {( u( u+ A' A; T/ _1 @, @Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ 0 o) g, i, y6 j0 p0 U" xChr(i4) & Chr(i5) & Chr(i6) & Chr(n) % V2 k- p9 c# `0 W9 W) `If Not .ProtectContents Then & u' a L6 ?% ] K2 sPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ 2 h, k8 B2 G& a& _" z Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ ' f( ?9 U# B4 _. t; tChr(i4) & Chr(i5) & Chr(i6) & Chr(n) $ M# K! x1 {3 H4 t. i MsgBox Application.Substitute(MSGPWORDFOUND2, _ : w H8 H; O; ?. m5 L- z+ w$ I "$$", PWord1), vbInformation, HEADER e# U" k$ E, o* y/ g3 Q. R# Y- U 'leverage finding Pword by trying on other sheets $ n- `- V$ [" G4 l3 v, a For Each w2 In Worksheets 2 p0 O* _% A* X& J6 \6 N) b2 {w2.Unprotect PWord1 6 \: k; r, o5 p5 C+ dNext w2 : F9 Q* j/ m$ |4 b# p% [ Exit Do 'Bypass all for...nexts ( i( U* m0 Z( ~: m- O1 B4 W End If / ^- B% x" y/ b- ?6 d$ aNext: Next: Next: Next: Next: Next " \4 _+ w8 a# S8 ^+ u Next: Next: Next: Next: Next: Next ( a# K/ F- n% ?/ @) @Loop Until True + w9 x ~7 {7 i/ S9 q& N! g3 m On Error GoTo 0 9 q7 p `! `( V- O EEnd If * k6 { L/ D% v& c4 x' C3 IEnd With ' p; \5 p4 ?; |! M( N0 q0 q& ~& a; ]Next w1 " w8 [( k7 b% p0 @9 ]- m" ] End If ; J- U: z. J' [/ B& e' jMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER ! \. j6 B9 {, \. KEnd Sub 4 S' v7 @! z: n) b. f4 p1 B' T8 I 今天解决的大问题!!
遨海湾-心灵的港湾 www.aosea.com
您需要登录后才可以回帖 登录 | 入住遨海湾

本版积分规则

网站解决方案专享优惠-3折上云

QQ|手机版|小黑屋|遨海湾超级社区

GMT+8, 2026-3-10 17:10

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表