excel工作表密碼破解方法--DONGBAD_第1頁
excel工作表密碼破解方法--DONGBAD_第2頁
excel工作表密碼破解方法--DONGBAD_第3頁
excel工作表密碼破解方法--DONGBAD_第4頁
excel工作表密碼破解方法--DONGBAD_第5頁
已閱讀5頁,還剩8頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、在日常工作中,大家有時會遇到過這樣的情況:使用Excel編制的報表、表格、程序等,在單元格中設(shè)置了公式、函數(shù)等,為了防止其他人修改您的設(shè)置或者防止您自己無意中修改,您可能會使用Excel的工作表保護(hù)功能,但時間久了保護(hù)密碼容易忘記,這該怎么辦?有時您從網(wǎng)上下載的Excel格式的小程序,您想修改,但是作者加了工作表保護(hù)密碼,怎么辦?您只要按照以下步驟操作,Excel工作表保護(hù)密碼瞬間(稍微有點夸張)即破! 待破解的Excel工作表方法/步驟1. 1打開您需要破解的Excel文件,如圖所示:2. 2依次點擊菜單欄上的工具-宏-錄制新宏;3. 3輸入宏名字(PS:打擊積極性?。。┤?易爾拓,然后停止

2、錄制(這樣得到一個空宏,為后面添加vb代碼做準(zhǔn)備);4. 4依次點擊菜單欄上的工具-宏-宏,選易爾拓,點編輯按鈕;刪除窗口中的所有字符,替換為下面的內(nèi)容;Option ExplicitPublic Sub AllInternalPasswords() Breaks worksheet and workbook structure passwords. Bob McCormick probably originator of base code algorithm modified for coverage of workbook structure / windows passwords an

3、d 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 passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DB

4、LSPACE & vbNewLine & _Adapted from Bob McCormick base code by & _Norman Harker and JE McGimpseyConst HEADER As String = AllInternalPasswords User MessageConst VERSION As String = DBLSPACE & Version 1.1.1 2003-Apr-04Const REPBACK As String = DBLSPACE & Please report failure & _to the microsoft.public

5、.gramming 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

6、 for a reason. Dont stuff up crucial formulas & _or data. & DBLSPACE & Access and use of some data & _may be an offense. If in doubt, dont.Const MSGNOPWORDS1 As String = There were no passwords on & _sheets, or workbook structure or windows. & AUTHORS & VERSIONConst MSGNOPWORDS2 As String = There wa

7、s no protection to & _workbook structure or windows. & DBLSPACE & _Proceeding to unprotect sheets. & AUTHORS & VERSIONConst 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

8、 computers specification. & DBLSPACE & _Just be patient! Make me a coffee! & AUTHORS & VERSIONConst 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 w

9、orkbooks by & _the same person who set this password. & DBLSPACE & _Now to check and clear other passwords. & AUTHORS & VERSIONConst MSGPWORDFOUND2 As String = You had a Worksheet & _password set. & DBLSPACE & The password found was: & _DBLSPACE & $ & DBLSPACE & Note it down for potential & _future

10、use in other workbooks by same person who & _set this password. & DBLSPACE & Now to check and clear & _other passwords. & AUTHORS & VERSIONConst MSGONLYONE As String = Only structure / windows & _protected with the password that was just found. & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Work

11、sheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith

12、ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox

13、 MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126With Acti

14、veWorkbook.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 ThenPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i5)

15、& Chr(i6) & Chr(n)MsgBox Application.Substitute(MSGPWORDFOUND1, _$, PWord1), vbInformation, HEADERExit Do Bypass all for.nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInforma

16、tion, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In WorksheetsAttempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In WorksheetsChecks for all clear ShTag triggered to 1 if not.ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In Wo

17、rksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126.Unprotect

18、 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 ThenPWord1 = 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, HEADERleverage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do Bypass all fo

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論