EXCEL密碼破解無(wú)需任何工具插件超簡(jiǎn)單_第1頁(yè)
EXCEL密碼破解無(wú)需任何工具插件超簡(jiǎn)單_第2頁(yè)
EXCEL密碼破解無(wú)需任何工具插件超簡(jiǎn)單_第3頁(yè)
EXCEL密碼破解無(wú)需任何工具插件超簡(jiǎn)單_第4頁(yè)
EXCEL密碼破解無(wú)需任何工具插件超簡(jiǎn)單_第5頁(yè)
已閱讀5頁(yè),還剩6頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、此方法無(wú)需任何工具只需要按照以下步驟操作就可以破解EXCEL密碼,方便簡(jiǎn)單快捷EXCEL密碼破解1打開文件2工具-宏-錄制新宏-輸入名字如:aa3停止錄制(這樣得到一個(gè)空宏)4工具-宏-宏,選aa,點(diǎn)編輯按鈕5刪除窗口中的所有字符(只有幾個(gè)),替換為下面的內(nèi)容:(復(fù)制吧)6關(guān)閉編輯窗口7工具-宏-宏,選AllInternalPasswords,運(yùn)行,確定兩次,等2分鐘,再確定.OK,沒有密碼了!內(nèi)容如下:Public Sub AllInternalPasswords() Breaks worksheet and workbook structure passwords. Bob McCormi

2、ck probably originator of base code algorithm modified for coverage of workbook structure / windows passwords and 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 has

3、hed passwords NOT original passwords Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ Adapted from Bob McCormick base code by & _ Norman Harker and JE McGimpsey Const HEADER As String = AllInternalPasswords User Message Const VERSION As String = DBL

4、SPACE & Version 1.1.1 2003-Apr-04 Const REPBACK As String = DBLSPACE & Please report failure & _ to the 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! &

5、DBLSPACE & and also & _ DBLSPACE & BACKUP!, BACKUP!, BACKUP! & _ DBLSPACE & Also, remember that the password was & _ put there 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 = T

6、here were no passwords on & _ sheets, or workbook structure or windows. & AUTHORS & VERSION Const MSGNOPWORDS2 As String = There was no protection to & _ workbook structure or windows. & DBLSPACE & _ Proceeding to unprotect sheets. & AUTHORS & VERSION Const MSGTAKETIME As String = After pressing OK

7、button this & _ will take some time. & DBLSPACE & Amount of time & _ depends on how many different passwords, the & _ passwords, and your computers specification. & DBLSPACE & _ Just be patient! Make me a coffee! & AUTHORS & VERSION Const MSGPWORDFOUND1 As String = You had a Worksheet & _ Structure

8、or Windows Password set. & DBLSPACE & _ The password found was: & DBLSPACE & $ & DBLSPACE & _ Note it down for potential future use in other workbooks by & _ the same person who set this password. & DBLSPACE & _ Now to check and clear other passwords. & AUTHORS & VERSION Const MSGPWORDFOUND2 As Stri

9、ng = You had a Worksheet & _ password set. & DBLSPACE & The password found was: & _ DBLSPACE & $ & DBLSPACE & Note it down for potential & _ future use in other workbooks by same person who & _ set this password. & DBLSPACE & Now to check and clear & _ other passwords. & AUTHORS & VERSION Const MSGO

10、NLYONE As String = Only structure / windows & _ protected with the password that was just found. & _ ALLCLEAR & AUTHORS & VERSION & REPBACK Dim w1 As Worksheet, w2 As Worksheet Dim i As Integer, j As Integer, k As Integer, l As Integer Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer Dim

11、 i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As String Dim ShTag As Boolean, WinTag As Boolean Application.ScreenUpdating = False With ActiveWorkbook WinTag = .ProtectStructure Or .ProtectWindows End With ShTag = False For Each w1 In Worksheets ShTag = ShTag Or w1.ProtectCo

12、ntents Next w1 If Not ShTag And Not WinTag Then MsgBox MSGNOPWORDS1, vbInformation, HEADER Exit Sub End If MsgBox MSGTAKETIME, vbInformation, HEADER If Not WinTag Then MsgBox MSGNOPWORDS2, vbInformation, HEADER Else On Error Resume Next Do dummy do loop For i = 65 To 66: For j = 65 To 66: For k = 65

13、 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 With ActiveWorkbook .Unprotect Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ Chr(i3) & Chr(i4) & Chr(i5)

14、 & Chr(i6) & Chr(n) If .ProtectStructure = False And _ .ProtectWindows = False Then PWord1 = 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(MSGPWORDFOUND1, _ $, PWord1), vbInformation, HEADER Exit Do B

15、ypass all for.nexts End If End With Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If If WinTag And Not ShTag Then MsgBox MSGONLYONE, vbInformation, HEADER Exit Sub End If On Error Resume Next For Each w1 In Worksheets Attempt clearance with

16、 PWord1 w1.Unprotect PWord1 Next w1 On Error GoTo 0 ShTag = False For Each w1 In Worksheets Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContents Next w1 If ShTag Then For Each w1 In Worksheets With w1 If .ProtectContents Then On Error Resume Next Do Dummy do loop For

17、 i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .Unprotect Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3

18、) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If Not .ProtectContents Then PWord1 = 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, HEADER leverage finding Pwor

19、d by trying on other sheets For Each w2 In Worksheets w2.Unprotect PWord1 Next w2 Exit Do Bypass all for.nexts End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If End With Next w1 End If MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vb

20、Information, HEADER End Sub窮舉破解EXCEL、WORD文檔密碼摘要:本文討論了如何使用VB編程,通過(guò)窮舉法解除EXCEL文檔和WORD文檔的密碼。并在破解過(guò)程中加入了中斷,以方便用戶隨時(shí)中斷破解過(guò)程。關(guān)鍵字:窮舉法、解密、EXCEL文檔、WORD文檔、密碼Excel和Word提供了多種方法限制訪問用戶文檔,以免未經(jīng)授權(quán)者的查看和更改。但在信息化的今天,用戶需要記憶的密碼太多,一旦密碼丟失,用戶將無(wú)法打開或訪問該文檔,給用戶造成很大的損失。能否借助計(jì)算機(jī)的高速運(yùn)行,解開密碼呢?通過(guò)嘗試,筆者認(rèn)為:在無(wú)法弄清Excel和Word加密算法的情況下,利用窮舉法嘗試解密文檔,

21、是解密唯一的選擇。1. 實(shí)現(xiàn)原理本程序選用VB6.0編寫,并充分利用了Office組件中的對(duì)象庫(kù),窮舉嘗試各種口令,達(dá)到解密文檔的目的。 巧用整數(shù)的取整及取余,產(chǎn)生密碼字符串Excel和Word文檔密碼可以是字母、數(shù)字、空格以及符號(hào)的任意組合,最長(zhǎng)可達(dá) 15 個(gè)字符,且區(qū)分大小寫。本程序的破解過(guò)程利用一個(gè)兩層循環(huán),產(chǎn)生選定字符的排列組合(嘗試密碼),其中外層循環(huán)控制密碼的位數(shù),內(nèi)層循環(huán)生成N位密碼的所有排列組合。產(chǎn)生嘗試密碼的方法是:將一個(gè)N位字符串密碼(password)作為一個(gè)“數(shù)值”,該“數(shù)值”每個(gè)位上的“數(shù)字”屬于選定字符范圍,且該“數(shù)值”與一個(gè)整數(shù)(X)一一對(duì)應(yīng),并滿足以下條件: 0

22、 X ArrayLenN-1(ArrayLen是選定密碼字符范圍的總字符數(shù),如:僅選定數(shù)字時(shí),ArrayLen=10;僅選定數(shù)字和小寫字母時(shí),ArrayLen=10+26=36);對(duì)X整除、取余N-1次,對(duì)每次的余數(shù)Y做以下操作:password = password + CharArray(Y) (注:CharArray是存放選定字符的一維數(shù)組),最后做以下操作:password = CharArray(X MOD ArrayLen) + password,產(chǎn)生的password 就是整數(shù)X對(duì)應(yīng)的N位字符串。 利用VB的錯(cuò)誤處理功能,嘗試口令破解當(dāng)運(yùn)行程序嘗試一個(gè)密碼時(shí)(用該密碼打開文檔),

23、若密碼錯(cuò)誤,則會(huì)產(chǎn)生運(yùn)行錯(cuò)誤。為此,必須在嘗試口令前,使用On Error 語(yǔ)句打開一個(gè)錯(cuò)誤處理程序;由于本程序是嘗試各種口令,當(dāng)一個(gè)口令錯(cuò)誤時(shí),直接嘗試下一個(gè)口令即可,因此,應(yīng)使用 “On Error Resume Next”語(yǔ)句。那么,如何得知找到口令了呢? VB有一個(gè)內(nèi)部錯(cuò)誤對(duì)象Err,它的 Number 屬性中的值是用來(lái)確定發(fā)生錯(cuò)誤的原因。在嘗試一個(gè)口令后,檢查Err.Number中的值,以確定該口令是否正確。 破解過(guò)程中的中斷利用窮舉法解密對(duì)系統(tǒng)資源的占用是十分驚人的,在解密的過(guò)程中CPU的利用率幾乎是100%,若不加入解密過(guò)程中的中斷,計(jì)算機(jī)系統(tǒng)會(huì)處于一種假死機(jī)狀態(tài)。為此,在破解過(guò)

24、程的內(nèi)循環(huán)中加入了DoEvents函數(shù)。DoEvents函數(shù)提供了一種取消任務(wù)的簡(jiǎn)便方法,它將控制切換到操作環(huán)境內(nèi)核。只要此環(huán)境中的所有應(yīng)用程序都有機(jī)會(huì)響應(yīng)待處理事件,應(yīng)用程序就又恢復(fù)控制。使用該函數(shù)的優(yōu)點(diǎn)是:不會(huì)使應(yīng)用程序放棄焦點(diǎn),且后臺(tái)事件能夠得到有效處理。2. 具體實(shí)現(xiàn)過(guò)程 編程實(shí)現(xiàn)時(shí),需要機(jī)器安裝有VB應(yīng)用程序及Microsoft Office組件。 新建VB工程,并對(duì)其初始化新建一個(gè)VB工程,取名Get_Password,將啟動(dòng)窗體命名為FrmMain。首先選擇“工程”菜單中的“引用”,在“引用”對(duì)話框中選擇“Microsoft Excel10.0 Object Library”和“

25、Microsoft Word10.0 Object Library”(注意:如果安裝的是Office2000或Office97,應(yīng)該選擇Excel對(duì)象庫(kù)和Word對(duì)象庫(kù)的9.0版或8.0版)。其次在“工程”菜單中“部件”對(duì)話框中,選擇添加“Microsoft Windows common controls -2.5(sp2)”和“Microsoft Common Dialog control 6.0”,以便在窗體設(shè)計(jì)中使用微調(diào)控件和對(duì)話框控件。 在FrmMain窗體上添加控件在FrmMain窗體上,按照下圖的位置添加表1中的控件,然后根據(jù)表1修改每個(gè)對(duì)象的屬性。表1:序號(hào) 控件名稱 控件屬性及

26、其屬性值1 Frame Name=Frame1,Caption=選擇加密文件(*.DOC、*.XLS)2 Frame Name=Frame2,Caption=選定密碼字符范圍:3 Frame Name=Frame3,Caption=選擇密碼的長(zhǎng)度:4 ComboBow Name=Combo15 CommandButton Name=CmdBrowse,Caption=瀏覽6 CommandButton Name=CmdStartCrack,Caption=開始破解7 CommandButton Name=CmdQuit,Caption=退出系統(tǒng)8 CheckBox Name=ChkDigita

27、l,Caption=數(shù)字(10)9 CheckBox Name=ChkLowercase,Caption=小寫字母(26)10 CheckBox Name=ChkUppercase,Caption=大寫字母(26)11 CheckBox Name=ChkSpace,Caption=空格(1)12 CheckBox Name=ChkBracket,Caption=括號(hào)(6)13 CheckBox Name=ChkOthers,Caption=其他OEM字符(26)14 TextBox Name=txtPasswordStartLong, Text=215 TextBox Name=txtPass

28、wordEndLong,Text=216 TextBox Name=Text117 UpDown Name=UpDown1,BuddyProperty=Text,Wrap=TRUE,Increment=1 BuddyControl=txtPasswordStartLong,Max=15,Min=18 UpDown Name=UpDown2,BuddyProperty=Text,Wrap=TRUE,Increment=1 BuddyControl=txtPasswordEndLong,Max=15,Min=119 CommonDialog Name=Dialog,DialogTitle=請(qǐng)選擇加

29、密的Excel或Word文檔 Filter=Excel(*.xls),Word(*.doc)|*.xls;*.doc20 Label Name=Label1, Caption=破解進(jìn)度:21 Label Name=Label3,Caption=從:22 Label Name=Label5,Caption=到: 為以上對(duì)象編寫下列代碼為了便于理解,程序中增加了適當(dāng)?shù)淖⑨?。Option ExplicitPrivate Sub CmdBrowse_Click() Dialog.ShowOpen show the dialog Combo1.Text = Dialog.FileName set the

30、 Filename text box to the selected file Combo1.RefreshEnd SubPrivate Sub CmdQuit_Click() EndEnd SubPrivate Sub CmdStartCrack_Click() Static blnProcessing As Boolean Dim wd As New Word.Application, xls As New Excel.Application Dim OpenReturn Dim strpath, pass, StrTemp, all_char(100) As String Dim J,

31、K, Password_Start_Long, Password_End_Long, ArrayLen As Integer Dim I, Temp As Long ArrayLen = 0 數(shù)組初始化 If ChkDigital.Value = 1 Then For J = ArrayLen To ArrayLen + 9 all_char(J) = Chr(Asc(0) + J - ArrayLen) Next J ArrayLen = ArrayLen + 10 End If If ChkLowercase.Value = 1 Then For J = ArrayLen To Array

32、Len + 25 all_char(J) = Chr(Asc(a) + J - ArrayLen) Next J ArrayLen = ArrayLen + 26 End If If ChkUppercase.Value = 1 Then For J = ArrayLen To ArrayLen + 25 all_char(J) = Chr(Asc(A) + J - ArrayLen) Next J ArrayLen = ArrayLen + 26 End If If ChkSpace.Value = 1 Then all_char(ArrayLen) = ArrayLen = ArrayLe

33、n + 1 End If If ChkBracket.Value = 1 Then all_char(ArrayLen) = ( all_char(ArrayLen+1) = ) all_char(ArrayLen+2) = all_char(ArrayLen+3) = all_char(ArrayLen+4) = all_char(ArrayLen+5) = ArrayLen = ArrayLen + 6 End If If ChkOthers.Value = 1 Then For J = ArrayLen To ArrayLen + 6 33 to 39 all_char(J) = Chr

34、(33 + J - ArrayLen) Next ArrayLen = ArrayLen + 7 For J = ArrayLen To ArrayLen + 5 42 to 47 all_char(J) = Chr(42 + J - ArrayLen) Next J ArrayLen = ArrayLen + 6 For J = ArrayLen To ArrayLen + 6 58 to 64 all_char(J) = Chr(58 + J - ArrayLen) Next J ArrayLen = ArrayLen + 7 all_char(ArrayLen) = Chr(92) Ar

35、rayLen = ArrayLen + 1 For J = ArrayLen To ArrayLen + 2 94 to 96 all_char(J) = Chr(94 + J - ArrayLen) Next J ArrayLen = ArrayLen + 3 all_char(ArrayLen) = Chr(124) all_char(ArrayLen+1) = Chr(126) ArrayLen = ArrayLen + 2 End If If ArrayLen = 0 Then MsgBox 錯(cuò)誤:沒有選擇密碼使用的字符, , 請(qǐng)選擇密碼使用的字符范圍. Exit Sub End If

36、 If blnProcessing Then If MsgBox(真的要中斷解密過(guò)程嗎?, vbYesNo, 用戶中斷任務(wù)) = vbYes Then blnProcessing = False Else CmdStartCrack.Caption = 中斷破解 blnProcessing = True strpath = Combo1.Text If strpath = Then MsgBox 錯(cuò)誤:沒有選擇需要解密的文件, , 請(qǐng)選擇需要解密的文件. Exit Sub End If strpath = Trim(strpath) Password_Start_Long = Val(txtP

37、asswordStartLong.Text) Password_End_Long = Val(txtPasswordEndLong.Text) If Password_Start_Long Password_End_Long Then Password_Start_Long = Val(txtPasswordEndLong.Text) Password_End_Long = Val(txtPasswordStartLong.Text) End If Label1.Caption = 破解進(jìn)度: Label1.Refresh On Error Resume Next If UCase(Right

38、(strpath, 3) = XLS Then For K = Password_Start_Long To Password_End_Long 破解excel開始 For I = 0 To ArrayLen K - 1 pass = Temp = I For J = 1 To K - 1 Temp = Temp ArrayLe pass = all_char(Temp Mod ArrayLen) + pass Next J pass = pass + all_char(I Mod ArrayLen) Set OpenReturn = xls.Workbooks.Open(FileName:=

39、strpath, Password:=pass) Text1.Text = pass 顯示破解進(jìn)度 Text1.Refresh If Err.Number 0 Then 如果解密成功,打開文檔,顯示密碼,退出過(guò)程 Err.Clear Else Label1.Caption = 文檔密碼: Text1.Text = pass Me.Refresh xls.Visible = True CmdStartCrack.MousePointer = 0 CmdStartCrack.Caption = 開始破解 blnProcessing = False Set xls = Nothing Exit Sub End If DoEvents If Not blnProcessing Then Exit For N

溫馨提示

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

評(píng)論

0/150

提交評(píng)論