讀取Access97的密碼
Public Function Password(FileName As String) As String
Dim Temp As Byte
Dim I As Integer
Dim Tx As String
Tx = "86FBEC375D449CFAC65E28E613"
Open FileName For Binary As 1
For I = 0 To 12
ST = Val("&H" & Mid(Tx, (I * 2) + 1, 2))
Get #1, 67 + I, Temp
If Temp = ST Then Exit For
Password = Password & Chr(Temp
Xor ST)
Next
Close
End Function
02>讀取Access2K/2002的密碼
Public Function AccessVer2K(FileName As String) As String
Dim Temp As Byte
Dim FNo As Long
Tx = "AFEC749CEF283A8A7D7BDCDF5E"
FNo = FreeFile
Open FileName For Binary As #FNo
For I = 0 To 24 Step 2
ST = Val("&H" & Mid(Tx, (I / 2) * 2 + 1, 2))
Get #1, 67 + I, Temp
AccessVer2K = AccessVer2K & Chr(Temp
Xor ST)
Next
Close FNo
End Function