|
登录后查才能浏览下载更多咨询,有问题联系QQ:3283999
您需要 登录 才可以下载或查看,没有账号?入住遨海湾
×
两天前在公司上班网上Q时,见到久违的工作一族的姑姑,她一份重要的工作报表密码遗失...于是我在网上找破解密码的软件,这破解的软件倒是很多,但都不适用,于是...继续搜索。想想念了三年的计算机,学到了什么...真是惭愧无言... 我的工作大部份也是做报表,是公司车辆的信息报表。重要的报表时常有密码保护,与报表密切联系的工作一族很需要知道这些知识,无疑这可以给我们的工作带来方便。 在网上找到了这份破解代码,成功破解了,但不能找到原表的密码,这是最遗憾的。还有破解的表的安全系数会低点。对工作报表一族超级无敌有用!! 方法:
: z& ~8 r0 J2 e H$ J* H' d* O1\打开文件$ m; o ]+ b9 t3 u. g& i4 i( ?
2\工具---宏----录制新宏---输入名字如:aa
5 ~, `, C$ w; L$ R7 ?) g9 B3\停止录制(这样得到一个空宏)
8 u! A, j" l( ?' r* t: J' ~: X9 k4\工具---宏----宏,选aa,点编辑按钮( D, k8 n5 D( n2 K: F/ w7 b
5\删除窗口中的所有字符(只有几个),替换为下面的内容 复制吧)
- H% k6 e$ v7 C: M9 S6\关闭编辑窗口; l' I: [7 \ t: r% r
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
( n) Q: }* K* Y% t内容如下:* F5 G1 \+ v5 z9 h
Public Sub AllInternalPasswords()
3 M, e7 f% X; O0 R' Breaks worksheet and workbook structure passwords. Bob McCormick
/ V& O7 w! V }0 J# p' probably originator of base code algorithm modified for coverage + v1 b' j4 p8 f$ Z2 t
' of workbook structure / windows passwords and for multiple passwords
6 Q4 W9 a9 O" Z; g: ?'
, A( ]3 i- d% e0 s) B4 I& G' K2 I4 d. A' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) $ y# W; E* W% q& w. y6 f
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
, c+ T* \5 z8 @2 b1 Y9 c( c7 q' eliminate one Exit Sub (Version 1.1.1)
- N& O3 p$ X9 E& Z7 `* ^, C' Reveals hashed passwords NOT original passwords
: L$ N" H" d# qConst DBLSPACE As String = vbNewLine & vbNewLine
# b) }% D, l* U) O$ y. BConst AUTHORS As String = DBLSPACE & vbNewLine & _ 7 f9 h9 E. q% o
"Adapted from Bob McCormick base code by" & _
. w$ R+ A6 w0 I% q"Norman Harker and JE McGimpsey"
: ?# V0 V$ w$ e8 ~# a _- @Const HEADER As String = "AllInternalPasswords User Message" 3 @1 Y+ L5 k% J+ p( i p! i n
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" 3 U# i' }9 F4 m; n& z* H1 x
Const REPBACK As String = DBLSPACE & " lease report failure " & _ 0 W. }& |8 \9 Y/ d; g5 H
"to the microsoft.public.excel.programming newsgroup."
" w& [4 T) \8 nConst ALLCLEAR As String = DBLSPACE & "The workbook should " & _
8 R2 o* O; K c) H2 v"now be free of all password protection, so make sure you:" & _
# q5 L1 v) D0 e1 y1 H eDBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
, i. h) h& p5 Z8 C! yDBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
; D Q- E' _ B/ T# t8 o CDBLSPACE & "Also, remember that the password was " & _
; k4 p% ]2 y% E, c6 d7 s, _% A! c"put there for a reason. Don't stuff up crucial formulas " & _
# M8 a$ y9 S! x"or data." & DBLSPACE & "Access and use of some data " & _ " _) Y3 Y( T, ]% R, F9 K Z4 T
"may be an offense. If in doubt, don't." 4 Y$ c+ K& p$ q. g! _
Const MSGNOPWORDS1 As String = "There were no passwords on " & _ 1 H+ c6 D# H% D2 O. ^" D
"sheets, or workbook structure or windows." & AUTHORS & VERSION
+ M3 J o7 K# V. G4 n9 HConst MSGNOPWORDS2 As String = "There was no protection to " & _ k# K, {& e& g+ [& {/ ?
"workbook structure or windows." & DBLSPACE & _
, A& T' Y- A0 [" roceeding to unprotect sheets." & AUTHORS & VERSION - b- I8 t' [, C
Const MSGTAKETIME As String = "After pressing OK button this " & _
3 w% s4 k) F3 c" t5 k% {( n$ c"will take some time." & DBLSPACE & "Amount of time " & _
% ^! \5 Q ]0 U1 j0 h"depends on how many different passwords, the " & _
& N/ B) {/ j2 ^: q"passwords, and your computer's specification." & DBLSPACE & _
! N+ d& C0 d2 d& X/ j* C7 m"Just be patient! Make me a coffee!" & AUTHORS & VERSION
! }1 S6 a9 l: D; m* QConst MSGPWORDFOUND1 As String = "You had a Worksheet " & _
, f) ]0 F7 q) \% p7 M9 s"Structure or Windows Password set." & DBLSPACE & _
: k( ?, v. ]- i"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ - D |0 v( v2 {4 t2 p. _6 d
"Note it down for potential future use in other workbooks by " & _
/ o3 D. z& X& O"the same person who set this password." & DBLSPACE & _
) O# O! k9 c; p7 }! b" ]"Now to check and clear other passwords." & AUTHORS & VERSION : @/ ^" T; x3 H }5 n/ w+ h! x
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
# i' y; V& P$ G8 z6 d5 Q* W5 s1 J"password set." & DBLSPACE & "The password found was: " & _ ' p) ` f5 [# @/ q6 P/ u
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
6 O- j% V9 J" |0 v$ C/ L5 R: L" `"future use in other workbooks by same person who " & _
. ^% O/ R7 G$ c7 @+ o3 B"set this password." & DBLSPACE & "Now to check and clear " & _
. m: B" q% z, O0 d R' H% w' {( R"other passwords." & AUTHORS & VERSION
: e. J: S" ^0 SConst MSGONLYONE As String = "Only structure / windows " & _
' d. u, R( d" U/ |9 p% J"protected with the password that was just found." & _ 3 B4 k0 H9 ~3 J5 b/ u
ALLCLEAR & AUTHORS & VERSION & REPBACK
0 ]. S9 D0 w, n8 B! l8 LDim w1 As Worksheet, w2 As Worksheet
. y" v6 R' |, p) H5 g _Dim i As Integer, j As Integer, k As Integer, l As Integer
5 K' u9 P8 V! r _Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer 3 h1 J* J0 P; V) n
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
$ p3 [: D6 I: R# ~! `+ gDim PWord1 As String $ B4 j f7 a& S- H% T# Y# R! ^
Dim ShTag As Boolean, WinTag As Boolean
9 k8 X! [% o3 C5 r$ p8 C9 p
% @+ d$ |, k6 ~- u, |* ?1 o* dApplication.ScreenUpdating = False
$ ]) C5 H3 [ P" z) P8 V, EWith ActiveWorkbook 8 Q5 I0 s: {7 q- n5 a
WinTag = .ProtectStructure Or .ProtectWindows 5 O. G/ o) I% }- ? x7 ]
End With
# J+ l% b" f/ D8 s) jShTag = False
0 r* D2 n0 ^1 dFor Each w1 In Worksheets
: |3 \( S' x$ J! ^% d3 DShTag = ShTag Or w1.ProtectContents 7 }* \/ |6 Z" |6 a3 d
Next w1 7 d, |% `. Y: W( X% m$ g
If Not ShTag And Not WinTag Then ( ^& D6 L3 F) f5 e# H/ Q' W. Q
MsgBox MSGNOPWORDS1, vbInformation, HEADER
* U9 \* v4 I/ `/ U/ Y. l+ XExit Sub
! v2 j! N6 ?) Y8 T6 k( kEnd If 9 Q1 ~9 I& }9 N% b$ L
MsgBox MSGTAKETIME, vbInformation, HEADER
! D/ [9 n( u |' {5 p1 z2 dIf Not WinTag Then 3 \4 d: W# b! ]4 f
MsgBox MSGNOPWORDS2, vbInformation, HEADER
0 ^6 ?6 d0 v! n8 J9 Z0 jElse
$ R+ o* I5 [. sOn Error Resume Next 4 V# @* ~2 q5 u. y! P) @
Do 'dummy do loop / h' P) r6 `# B
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
4 X9 T+ _1 D" B1 J" ^4 b% zFor l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
$ g0 i2 A/ z& B) v# iFor i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 9 s) W2 b2 p5 W2 |! v! g
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 g i' B9 O0 ~. Q2 ^7 m
With ActiveWorkbook . P7 P3 u3 \3 L- L1 A8 [
.Unprotect Chr(i) & Chr(j) & Chr(k) & _ / M# u% o# N2 @# e& E7 g: |' @4 m' E
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ 3 E5 I2 c( s- [# w, x* m" _7 j
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) 6 h- H+ [0 L# b' V& [1 |
If .ProtectStructure = False And _
/ [( ^. J8 Q P.ProtectWindows = False Then
, g: G8 K0 s; s" D3 T% fPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ w5 q, ?( U- Y4 K* u' q
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
2 \: C8 h0 S$ _' v& I& U, m3 J6 K1 OChr(i4) & Chr(i5) & Chr(i6) & Chr(n) ; l9 `; M8 j s5 u5 [; Z
MsgBox Application.Substitute(MSGPWORDFOUND1, _ . |% F2 W: N+ O4 L* @
"$$", PWord1), vbInformation, HEADER
& T1 f' I) s! PExit Do 'Bypass all for...nexts
4 e- ]8 A) t- UEnd If
6 x4 L" |7 @: kEnd With 8 N7 m- j3 \, e- s
Next: Next: Next: Next: Next: Next , N( A- E2 Q- X/ }+ ?, \4 \
Next: Next: Next: Next: Next: Next
" e( k+ M+ M4 ~' sLoop Until True
& Q D" m+ h! c7 Z) S9 QOn Error GoTo 0
2 J7 x3 I+ D7 HEnd If
; d" q' C2 R0 n' r% L" `If WinTag And Not ShTag Then
$ f2 W/ u3 f: f$ uMsgBox MSGONLYONE, vbInformation, HEADER
- b6 c; I; z+ _# e/ X7 wExit Sub 6 y4 a* f h& |+ ~) l- K& R
End If ) p4 g4 L; q; T5 Y
On Error Resume Next
3 w" ]3 J/ R5 S: P5 ^$ L( ]; |For Each w1 In Worksheets V. _4 D; ?+ f' W7 ^2 N
'Attempt clearance with PWord1 ) T: ] r8 S1 R0 b2 v* v, B/ d% s& w3 y
w1.Unprotect PWord1 $ @0 F. n, L% T# f
Next w1 1 e h$ J" S1 _! W6 o! \
On Error GoTo 0
) T9 z- B0 h7 u& l9 E9 tShTag = False
3 u- O2 c* o* tFor Each w1 In Worksheets : T. E u$ ^' K# p
'Checks for all clear ShTag triggered to 1 if not. ' ~, j' z, b( e( j4 ~
ShTag = ShTag Or w1.ProtectContents
) p7 j4 e4 g4 ENext w1
6 K5 D. l, [6 a3 W# }; LIf ShTag Then
( r; B9 G8 K1 {2 o C' gFor Each w1 In Worksheets
S# b) c0 L5 N% ^$ iWith w1
( I, f5 X6 E1 c: H% F, P1 MIf .ProtectContents Then - c' X/ C# \; Z& W
On Error Resume Next
8 h8 r3 W$ G% d& j) z" Y" `8 n. {Do 'Dummy do loop
: ?2 A: @9 x3 }9 {7 T( x( P ZFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66 2 N( V8 _6 F( J* J
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
& N4 D, l; P- u+ VFor i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 / J0 B) n7 e m2 |
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
6 ]8 J/ G6 U' v: K( m0 B8 l.Unprotect Chr(i) & Chr(j) & Chr(k) & _
0 B) g' ]# z: H3 b* j3 h- vChr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
" l* I6 N, P& i& LChr(i4) & Chr(i5) & Chr(i6) & Chr(n)
( P) l/ |3 D' p% i8 W) k4 FIf Not .ProtectContents Then
( Z, d# l' V4 GPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
+ o( P' j; k( z( n$ O! gChr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ 0 X0 Z# z+ |# F4 S" J6 C
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
3 P6 T- F/ S* D* D& dMsgBox Application.Substitute(MSGPWORDFOUND2, _ 8 h4 P1 `! ^: E" S9 I
"$$", PWord1), vbInformation, HEADER + M$ P3 }9 y$ e' K! }; y8 ^& I
'leverage finding Pword by trying on other sheets 8 H2 j! q$ W, F6 E+ W4 r( l" T
For Each w2 In Worksheets
5 F" H" \+ G( r; g' T9 I( D- M( cw2.Unprotect PWord1 * m& V+ ^4 |: a9 ^
Next w2
% @6 |8 S, T% g% X( G5 uExit Do 'Bypass all for...nexts 0 L# O5 R! d; B! S
End If
( T% Y7 ~( ]* Y0 ^3 nNext: Next: Next: Next: Next: Next # p6 B3 w9 \% r: o( k+ }/ R6 G
Next: Next: Next: Next: Next: Next
! U2 w) C# t z& o9 g9 KLoop Until True : l: ^+ C: e! K% U j8 |% Q$ T
On Error GoTo 0 8 b8 I( s/ J8 x' d4 M# Z
End If $ v6 {9 T- J! Q: z1 H
End With
9 Q. s( }! N, |, p* iNext w1 ' M/ e* _! Z+ T. ^' }# p( x
End If
+ N) V. T" X6 [MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
- L9 T: n! \5 yEnd Sub
9 v9 r! D- p! G% C3 f1 q
( j5 E" D! Q5 w% @2 z今天解决的大问题!! |
|