導航:首頁 > 編程大全 > vba破解excel密碼

vba破解excel密碼

發布時間:2023-06-19 11:57:41

❶ Excel vba 忘了密碼 怎麼辦

1、首先,如果文件格式是Excel 2010版(.xslm),需要先打開Excel文件,另存為2003版格式(.xls)。

❷ EXCEL VBA 如何解除工作表密碼(已知密碼)

新建一工作簿,在VBE窗口中插入一個模塊,粘貼以下代碼,即可(該代碼清除未密碼,來源於網路

PrivateSubVBAPassword()
'你要解保護的Excel文件路徑
Filename=Application.GetOpenFilename("Excel文件(*.xls&*.xla&*.xlt),*.xls;*.xla;*.xlt",,"VBA破解")
IfDir(Filename)=""Then
MsgBox"沒找到相關文件,清重新設置。"
ExitSub
Else
FileCopyFilename,Filename&".bak"'備份文件。
EndIf
DimGetDataAsString*5
OpenFilenameForBinaryAs#1
DimCMGsAsLong
DimDPBoAsLong
Fori=1ToLOF(1)
Get#1,i,GetData
IfGetData="CMG="""ThenCMGs=i
IfGetData="[Host"ThenDPBo=i-2:ExitFor
Next

IfCMGs=0Then
MsgBox"請先對VBA編碼設置一個保護密碼...",32,"提示"
ExitSub
EndIf

IfProtect=FalseThen
DimStAsString*2
Dims20AsString*1

'取得一個0D0A十六進制字串
Get#1,CMGs-2,St

'取得一個20十六制字串
Get#1,DPBo+16,s20

'替換加密部份機碼
Fori=CMGsToDPBoStep2
Put#1,i,St
Next

'加入不配對符號
If(DPBo-CMGs)Mod2<>0Then
Put#1,DPBo+1,s20
EndIf
MsgBox"文件解密成功......",32,"提示"
EndIf
Close#1
EndSub

❸ 如何破解EXCEL VBA密碼

關於破解EXCEL VBA工程密碼的方法,以下代碼非常有效,首先建一新EXCEL文件,在工作表標簽處右點>>查看代碼>>復制以下代碼>>按F8執行在彈出窗中選你要你破解工程密碼的EXCEL文件 >>再按F5執行即可.

PrivateSubVBAPassword()
'你要解保護的Excel文件路徑
Filename=Application.GetOpenFilename("Excel文件(*.xls&*.xla&*.xlt),*.xls;*.xla;*.xlt",,"VBA破解")
IfDir(Filename)=""Then
MsgBox"沒找到相關文件,清重新設置。"
ExitSub
Else
FileCopyFilename,Filename&".bak"'備份文件。
EndIf
DimGetDataAsString*5
OpenFilenameForBinaryAs#1
DimCMGsAsLong
DimDPBoAsLong
Fori=1ToLOF(1)
Get#1,i,GetData
IfGetData="CMG="""ThenCMGs=i
IfGetData="[Host"ThenDPBo=i-2:ExitFor
Next
IfCMGs=0Then
MsgBox"請先對VBA編碼設置一個保護密碼...",32,"提示"
ExitSub
EndIf
IfProtect=FalseThen
DimStAsString*2
Dims20AsString*1
'取得一個0D0A十六進制字串
Get#1,CMGs-2,St
'取得一個20十六制字串
Get#1,DPBo+16,s20
'替換加密部份機碼
Fori=CMGsToDPBoStep2
Put#1,i,St
Next
'加入不配對符號
If(DPBo-CMGs)Mod2<>0Then
Put#1,DPBo+1,s20
EndIf
MsgBox"文件解密成功......",32,"提示"
EndIf
Close#1
EndSu

如果上面代碼不能運行或出錯,請用以下代碼重試.

PrivateSubVBAPassword()
'你要解保護的Excel文件路徑
Filename=Application.GetOpenFilename("Excel文件(*.xls&*.xla&*.xlt),*.xls;*.xla;*.xlt",,"VBA破解")
IfDir(Filename)=""Then
MsgBox"沒找到相關文件,清重新設置。"
ExitSub
Else
FileCopyFilename,Filename&".bak"'備份文件。
EndIf
DimGetDataAsString*5
OpenFilenameForBinaryAs#1
DimCMGsAsLong
DimDPBoAsLong
Fori=1ToLOF(1)
Get#1,i,GetData
IfGetData="CMG="""ThenCMGs=i
IfGetData="[Host"ThenDPBo=i-2:ExitFor
Next
IfCMGs=0Then
MsgBox"請先對VBA編碼設置一個保護密碼...",32,"提示"
ExitSub
EndIf

DimStAsString*2
Dims20AsString*1
'取得一個0D0A十六進制字串
Get#1,CMGs-2,St
'取得一個20十六制字串
Get#1,DPBo+16,s20
'替換加密部份機碼
Fori=CMGsToDPBoStep2
Put#1,i,St
Next
'加入不配對符號
If(DPBo-CMGs)Mod2<>0Then
Put#1,DPBo+1,s20
EndIf
MsgBox"文件解密成功......",32,"提示"
Close#1
EndSub

❹ 如何破解excel vba密碼

SubMoveProtect()
DimFileNameAsString
FileName=Application.GetOpenFilename("Excel文件(*.xlsm&*.xlam),*.xlsm;*.xlam",,"VBA破解")
IfFileName=CStr(False)Then
ExitSub
Else
VBAPasswordFileName,False
EndIf
EndSub

PrivateFunctionVBAPassword(FileNameAsString,OptionalProtectAsBoolean=False)
IfDir(FileName)=""Then
ExitFunction
Else
FileCopyFileName,FileName&".bak"
EndIf

DimGetDataAsString*5
OpenFileNameForBinaryAs#1
DimCMGsAsLong
DimDPBoAsLong
Fori=1ToLOF(1)
Get#1,i,GetData
IfGetData="CMG="""ThenCMGs=i
IfGetData="[Host"ThenDPBo=i-2:ExitFor
Next
IfCMGs=0Then
MsgBox"請先對VBA編碼設置一個保護密碼...",32,"提示"
ExitFunction
EndIf
IfProtect=FalseThen
DimStAsString*2
Dims20AsString*1
'取得一個0D0A十六進制字串
Get#1,CMGs-2,St
'取得一個20十六制字串
Get#1,DPBo+16,s20
'替換加密部份機碼
Fori=CMGsToDPBoStep2
Put#1,i,St
Next
'加入不配對符號
If(DPBo-CMGs)Mod2<>0Then
Put#1,DPBo+1,s20
EndIf
MsgBox"文件解密成功......",32,"提示"
Else
DimMMsAsString*5
MMs="DPB="""
Put#1,CMGs,MMs
MsgBox"對文件特殊加密成功......",32,"提示"
EndIf
Close#1
EndFunction

❺ 如何破解EXCEL VBA密碼

工具:5秒WORD-EXCEL密碼破解.exe
步驟如下:
1、網路「5秒WORD-EXCEL密碼破解」,點擊下方的連接,下載軟體,軟體不是很大,直接下載下來就可以了,下載下來是一個壓縮包,解壓該壓縮包。打開壓縮包解壓出來的文件夾,第二個文件就是我們的密碼破解工具,雙擊打開工具。
2、瀏覽,找到我們要破解的文件,點擊確定,破解就開始啦。點擊移除密碼。
3、彈出對話框,點擊確定,當然,電腦是要能聯網的,相信你能看到這篇經驗,電腦應該也是能聯網的。
4、解密時間要看密碼復雜程度,不過應該沒有太變態的密碼。
5、成功破解密碼,並且生成了一個新的沒有密碼的文件。

❻ 如何破解Excel VBA密碼

打開需要破解的文件,並點開需要輸入密碼的界面,如圖

使用EXCEL.EXE重新打開一個工作簿。

打開新工作簿的VBA代碼區域,並插入一個模塊。

插入如下代碼
Sub test()
Dim st, nd, th3, th4, th5, th6, th7, th8 As Variant
Dim ii, jj, kk, ll, mm, nn, oo, pp, qq As Integer
Dim PADN, PD, IJ, JK, PADNO, speed

speed = 0.005

st = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
nd = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th3 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th4 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th5 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th6 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th7 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
th8 = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")

PADN = InputBox("How long the password is", "Guilin Hu", 4)
PADNO = CInt(PADN)

For IJ = 1 To 100
If Sheet1.Cells(IJ, 1) = "" Then
Sheet1.Cells(IJ, 1) = Now
Exit For
Else
End If
Next IJ

PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

Select Case (PADNO)
Case 1

For ii = 0 To 61

PD = st(ii)

SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next ii

Case 2

For ii = 0 To 61
For jj = 0 To 61

PD = st(ii) & nd(jj)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next jj
Next ii
Case 3

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61

PD = st(ii) & nd(jj) & th3(kk)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next kk
Next jj
Next ii
Case 4

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61
For ll = 0 To 61

PD = st(ii) & nd(jj) & th3(kk) & th4(ll)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next ll
Next kk
Next jj
Next ii
Case 5

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61
For ll = 0 To 61
For mm = 0 To 61

PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next mm
Next ll
Next kk
Next jj
Next ii
Case 6

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61
For ll = 0 To 61
For mm = 0 To 61
For nn = 0 To 61

PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next nn
Next mm
Next ll
Next kk
Next jj
Next ii
Case 7

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61
For ll = 0 To 61
For mm = 0 To 61
For nn = 0 To 61
For oo = 0 To 61

PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn) & th7(oo)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next oo
Next nn
Next mm
Next ll
Next kk
Next jj
Next ii
Case 8

For ii = 0 To 61
For jj = 0 To 61
For kk = 0 To 61
For ll = 0 To 61
For mm = 0 To 61
For nn = 0 To 61
For oo = 0 To 61
For pp = 0 To 61

PD = st(ii) & nd(jj) & th3(kk) & th4(ll) & th5(mm) & th6(nn) & th7(oo) & th8(pp)
SendKeys PD
PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

PauseTime = speed
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Finish = Timer

SendKeys "{enter}"

Next pp
Next oo
Next nn
Next mm
Next ll
Next kk
Next jj
Next ii
End Select

For JK = 1 To 100
If Sheet1.Cells(JK, 2) = "" Then
Sheet1.Cells(JK, 2) = Now
Exit For
Else
End If
Next JK

End Sub

按F5執行代碼,輸入密碼長度。如果不知道密碼的長度,就猜,第一次輸1,第二次輸2。。。依次試。

輸入密碼長度後,點擊確定。並在2s內將滑鼠的焦點點在最開始要破解文件的密碼輸入框里邊。接下來的工作就是「靜候佳音」了。。哈哈。。

沒有破解不開的密碼。主要的是你有時間就好!1位密碼破解最長時間:62/(1/0.005)=0.31秒;2位數密碼破解最長時間:62*62/(1/0.005)=19.22秒。。。依次類推:N位數密碼破解時間:(62)的N次方/(1/0.005)秒的時間。就看您的耐性了!破解完成之後就會自動進去VBA代碼模塊。

接下來就是修改別人的密碼了!進去果斷點擊VBA工程屬性,。。。「幹啥?」。。。。哈哈 改密!!

看哥的密碼改的!哈哈。。。

閱讀全文

與vba破解excel密碼相關的資料

熱點內容
盲盒開箱app有哪些 瀏覽:422
win10激活腳本之家 瀏覽:191
魔鬼作坊工具包 瀏覽:185
ae源文件下載 瀏覽:520
如何將照片內容轉換成pdf文件 瀏覽:137
浙里辦app如何更換手機號碼 瀏覽:244
電子資料文件有哪些 瀏覽:241
猥瑣貓表情教程 瀏覽:599
android音頻文件格式 瀏覽:458
漫畫臉app哪裡可以下載 瀏覽:959
購買歡樂升級歡樂豆 瀏覽:282
學習智能機器人用什麼編程最好 瀏覽:655
蘋果手機如何管控app 瀏覽:633
mn文件夾 瀏覽:590
安卓平板通用刷機包下載 瀏覽:751
安卓獲取內部存儲路徑 瀏覽:880
寫代碼兩台顯示器 瀏覽:327
unitypackage壓縮文件 瀏覽:493
奕心安卓 瀏覽:563
使用土地的有關證明文件包含哪些 瀏覽:493

友情鏈接