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

EXCEL工作表保护密码破解ZT

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

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

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

×
两天前在公司上班网上Q时,见到久违的工作一族的姑姑,她一份重要的工作报表密码遗失...于是我在网上找破解密码的软件,这破解的软件倒是很多,但都不适用,于是...继续搜索。想想念了三年的计算机,学到了什么...真是惭愧无言... 我的工作大部份也是做报表,是公司车辆的信息报表。重要的报表时常有密码保护,与报表密切联系的工作一族很需要知道这些知识,无疑这可以给我们的工作带来方便。 在网上找到了这份破解代码,成功破解了,但不能找到原表的密码,这是最遗憾的。还有破解的表的安全系数会低点。对工作报表一族超级无敌有用!! 方法:1 _" Q: _# e( D+ r5 ` 1\打开文件 8 X& p% M8 Y, `, D9 F3 ^2\工具---宏----录制新宏---输入名字如:aa0 G' i1 ^3 o2 r9 ? 3\停止录制(这样得到一个空宏) 5 _* D* Q* W+ o! v: J) |1 R4\工具---宏----宏,选aa,点编辑按钮 Z) B4 X+ H8 [: M z% h5\删除窗口中的所有字符(只有几个),替换为下面的内容复制吧)& k2 N( N9 }( V0 D( ` w" x6 ?6 r* U 6\关闭编辑窗口3 R/ R" t7 n8 j1 m1 l 7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!3 e& X4 F4 p+ t* ^4 u( G 内容如下:$ i4 t4 N3 G3 h Public Sub AllInternalPasswords() / X( V) Z% B( J8 H7 ]0 u" y' Breaks worksheet and workbook structure passwords. Bob McCormick " |+ W7 w1 C) a, q o. h' probably originator of base code algorithm modified for coverage 1 @& ?3 H# H+ s/ }9 i1 E" T ' of workbook structure / windows passwords and for multiple passwords 6 V; C! t1 M$ k5 Q' E' 6 g" G+ | ?5 V* K; g; c% D' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) " S' ^( ]. R3 [ ' Modified 2003-Apr-04 by JEM: All msgs to constants, and # z- v3 Y [* J0 ]' eliminate one Exit Sub (Version 1.1.1) + w: W5 @. r% }: F5 n# @" P7 E ' Reveals hashed passwords NOT original passwords 8 ~( M& L/ f$ i+ y0 y2 q Const DBLSPACE As String = vbNewLine & vbNewLine ( e- s! f( u0 o4 s) J0 [0 T; A Const AUTHORS As String = DBLSPACE & vbNewLine & _ % |6 h$ L! B2 R% ?3 U I"Adapted from Bob McCormick base code by" & _ - l/ n" z( b# M! h5 r! S& p7 P "Norman Harker and JE McGimpsey" 7 d" M, ~; F3 p( @7 k2 T Const HEADER As String = "AllInternalPasswords User Message" 7 W: r8 w! `! D; V Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" / \2 z$ F8 U& S$ D. t6 N4 N Const REPBACK As String = DBLSPACE & "lease report failure " & _ 6 C0 k4 ?2 `" G( ?+ A "to the microsoft.public.excel.programming newsgroup." - g$ s" }, ], S$ Y, ^- u Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ ) z+ \4 ~, \! s "now be free of all password protection, so make sure you:" & _ 0 D$ f M0 R8 a DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ + ?! w5 b4 M( ]DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _ 0 \0 `' ?$ f$ L- u$ d0 g) V5 {" k DBLSPACE & "Also, remember that the password was " & _ 8 z J2 q& n" D1 s6 b: e"put there for a reason. Don't stuff up crucial formulas " & _ : S; L1 e v1 b2 t* m! e "or data." & DBLSPACE & "Access and use of some data " & _ 7 {! X, y( |6 p" V) A- [# k "may be an offense. If in doubt, don't." , w5 _: j9 V' h. \% b& ? a; R4 \ Const MSGNOPWORDS1 As String = "There were no passwords on " & _ 7 I! y9 r# W# m8 B4 \0 s"sheets, or workbook structure or windows." & AUTHORS & VERSION & J7 W) c$ a9 W. q, T" oConst MSGNOPWORDS2 As String = "There was no protection to " & _ + ?% ^8 }* ^. m( b. [( x8 g0 v"workbook structure or windows." & DBLSPACE & _ . o* w% K$ b' A- c# x"roceeding to unprotect sheets." & AUTHORS & VERSION 1 `# L H" w5 d" E7 K nConst MSGTAKETIME As String = "After pressing OK button this " & _ - r0 z3 m( E5 F5 M* L! C+ p"will take some time." & DBLSPACE & "Amount of time " & _ 0 |" M+ H1 l/ r& F7 r& D# J$ ~- b "depends on how many different passwords, the " & _ 2 K* O0 v, @7 K1 a% h3 f9 U+ K"passwords, and your computer's specification." & DBLSPACE & _ 9 G" {" v0 K5 F0 x2 a, N"Just be patient! Make me a coffee!" & AUTHORS & VERSION $ p) w# Z2 K2 K* S" x! D! J Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _ ( i' _3 E3 ~& }. n) t6 r "Structure or Windows Password set." & DBLSPACE & _ / C& P g5 T/ i1 |2 v "The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ + ~- h+ D7 ?2 V3 C& _) @ "Note it down for potential future use in other workbooks by " & _ 3 V( a$ S+ C6 y& f- l "the same person who set this password." & DBLSPACE & _ $ r; y9 a- d1 Q"Now to check and clear other passwords." & AUTHORS & VERSION 1 D. H5 v+ i& A. o8 Z- j+ ] Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ 4 Y* g8 u: X3 c) } V"password set." & DBLSPACE & "The password found was: " & _ % {9 o1 M; p0 X, J0 K DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _ $ I% K) i$ g3 h. }% V6 k5 X% A "future use in other workbooks by same person who " & _ * ~& o# }& d/ \& I- E+ @ "set this password." & DBLSPACE & "Now to check and clear " & _ ! Z1 M# A6 t+ P* i "other passwords." & AUTHORS & VERSION ) X% l9 x- V0 X8 Q6 t, XConst MSGONLYONE As String = "Only structure / windows " & _ ; e, {0 Q) }6 O1 Y& `"protected with the password that was just found." & _ ! J; ?8 U( }- YALLCLEAR & AUTHORS & VERSION & REPBACK . f0 |: f3 O, a' Z5 g( M; s Dim w1 As Worksheet, w2 As Worksheet * A6 \# ~$ F3 ?- @3 XDim i As Integer, j As Integer, k As Integer, l As Integer 5 J% J6 ~" N3 b; R Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer 8 j6 r# g4 D, ? Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer $ t0 s7 \7 P% e. t$ Q0 ` Dim PWord1 As String % P+ |6 F) p# T% r# I2 RDim ShTag As Boolean, WinTag As Boolean ( G6 ^( S/ s& N+ T . U5 g7 I5 d- dApplication.ScreenUpdating = False " c: P) | c% J9 v With ActiveWorkbook ( | p6 s, e( c ~WinTag = .ProtectStructure Or .ProtectWindows 9 L( w m% u# E9 }8 L$ \ End With ( H; b$ p2 f/ I+ u s% @' u- U& EShTag = False " G% I$ A# I2 w9 x4 j4 } For Each w1 In Worksheets ! ]; {+ a) X5 K! p+ O. C" L4 XShTag = ShTag Or w1.ProtectContents ! M( j+ d" N; ~6 ~6 ONext w1 , s( q# W" K: ]3 L T, D5 IIf Not ShTag And Not WinTag Then 2 i3 Q. ]" M8 {/ K! XMsgBox MSGNOPWORDS1, vbInformation, HEADER . ?4 d6 n) F8 ~ Exit Sub 6 s3 ^! q W% f0 BEnd If + d n: ^5 ?' X6 c tMsgBox MSGTAKETIME, vbInformation, HEADER 1 ]# M' p9 E, L9 F If Not WinTag Then 9 N% O h" F9 A8 r6 ~ MsgBox MSGNOPWORDS2, vbInformation, HEADER z6 T: Y5 f" I2 ~( `+ ?Else " E Z: K R* `3 t7 QOn Error Resume Next : P, |' [, O; I# I! @ Do 'dummy do loop 0 [& h4 |( D' i$ {: Z5 M0 \ For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 # ^ u; o6 e% T) H9 L2 q7 I0 hFor l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 " `2 B3 L+ b `9 \# ^, n/ ~For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 : ?: @& o; D2 r) x3 f8 b! \+ ?. l For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 " w+ j; p2 Q; P, }! u With ActiveWorkbook 5 ]/ \0 ?; `3 V6 c! G) G.Unprotect Chr(i) & Chr(j) & Chr(k) & _ ) k- I1 g `% Q# i* t6 ~$ KChr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ 1 ^! f% [9 x9 H/ Q Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) + N4 ?2 w, g- y8 ^& KIf .ProtectStructure = False And _ 4 ~4 l' j9 L |8 | .ProtectWindows = False Then 2 M0 @5 f: {8 r# o5 n3 dPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ 4 A$ b4 G% B% C- [ Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ * x1 F9 v7 a, S H; @. ^5 y( MChr(i4) & Chr(i5) & Chr(i6) & Chr(n) : M* c6 N; |! _/ ] MsgBox Application.Substitute(MSGPWORDFOUND1, _ 0 ~+ m6 S1 n/ H& S7 p1 t, p"$$", PWord1), vbInformation, HEADER ! O$ p6 N# n& ~0 W1 C8 `! GExit Do 'Bypass all for...nexts 5 e) V+ X* G+ @ End If 8 R" c2 ~3 j9 Y d End With 7 F: K! Z0 P$ m0 l Next: Next: Next: Next: Next: Next # ^2 f" P- n2 y4 c) N/ _( h Next: Next: Next: Next: Next: Next . L1 ~, i$ n; q$ A' G; ?2 I m Loop Until True & g2 r" L J7 y6 Q0 i On Error GoTo 0 " k/ w, |' ^4 s% REnd If ' w& {. k- f* f$ m% @/ `0 qIf WinTag And Not ShTag Then `( t/ L! R6 EMsgBox MSGONLYONE, vbInformation, HEADER * o6 B5 C! b& J) L' x- K$ KExit Sub 9 q" _0 N( B" c) L) O/ x, GEnd If " P$ @) K4 R m. FOn Error Resume Next + Z: \$ v" L) N" B' Q& y( i0 MFor Each w1 In Worksheets + v0 z/ G2 v( x2 x# }( }) Z7 `'Attempt clearance with PWord1 # p3 l' @! ?+ D" O2 xw1.Unprotect PWord1 6 D) c5 k0 c' v9 x2 q) K7 L% P Next w1 0 w6 ^9 o0 Q; QOn Error GoTo 0 " I2 k1 ~3 L4 I: Y7 S ShTag = False $ M% @9 X: n' ~" ~7 JFor Each w1 In Worksheets 9 r/ l3 T) U9 }5 s8 ~5 d" g 'Checks for all clear ShTag triggered to 1 if not. ) s* m) P4 Z! J5 T ShTag = ShTag Or w1.ProtectContents 9 C9 L7 f4 i. G1 p Next w1 ; g0 g$ q2 f3 n. W1 M/ d9 ~If ShTag Then 2 h' H5 C; E' y7 bFor Each w1 In Worksheets ( ? N* ?2 C8 K) x3 X4 n" M With w1 + z1 k) h& l* F5 G& p$ _( FIf .ProtectContents Then " X- C. ~, [& g. L; p On Error Resume Next r! k- \% f) G. P Do 'Dummy do loop : P2 S% |( {1 y5 a& |For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 / _# A6 U+ l/ n w! n For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 , J4 U4 R! P7 X' z) Y3 ] For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 % m. }7 b5 o# Q; h; @ For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 y9 I# d0 p/ B# j .Unprotect Chr(i) & Chr(j) & Chr(k) & _ ) v3 E& r, @1 RChr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ ; _- ?& E P9 [, q0 r* X; pChr(i4) & Chr(i5) & Chr(i6) & Chr(n) ( {( [ A" g4 D+ E* V9 s& gIf Not .ProtectContents Then 3 [$ ^ D& Y8 l( OPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ u2 D, M. s3 H& G/ h6 H4 {, b Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ ( a$ m' S. J, c+ J% U Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) % I/ c& L0 N8 r' J. A$ u+ IMsgBox Application.Substitute(MSGPWORDFOUND2, _ . H7 W% i( k) @' q5 b( W& p$ Y# P "$$", PWord1), vbInformation, HEADER , @4 ^) `5 {3 N% E'leverage finding Pword by trying on other sheets - ^) N0 h$ o3 v6 N1 `3 h s/ K" AFor Each w2 In Worksheets / G2 Z! { ~% D8 A9 Lw2.Unprotect PWord1 & r0 `" e+ y1 O0 ]% r$ y/ ^Next w2 * F9 P/ N+ @9 W: K Exit Do 'Bypass all for...nexts + _) R& k0 B' y) \% vEnd If % S" }4 s- k2 QNext: Next: Next: Next: Next: Next 6 Y0 @8 c5 @. H% d5 c Next: Next: Next: Next: Next: Next 9 l( v" {: F: [& b$ G! S Loop Until True # a T6 ], Z& H4 Y f On Error GoTo 0 8 U' f/ ^0 s O8 U2 qEnd If & \6 z% T X- SEnd With / @3 z, ]# I' U% T: R/ zNext w1 ) h0 ~: i1 u3 H; T1 e End If ' U/ f- H0 v" F; ]MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER ( S6 T9 s/ J) l1 c1 r; z7 vEnd Sub$ q1 [4 E3 P- E) |* z, A ; e* V9 c' s) X( Y# H今天解决的大问题!!
遨海湾-心灵的港湾 www.aosea.com
您需要登录后才可以回帖 登录 | 入住遨海湾

本版积分规则

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

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

GMT+8, 2025-10-25 03:49

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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