Hi Everyone,
Well Im trying to open a mdb which is password protected and when Im
using the below code it was running perfectly for the mdb's created by
me., but an mdb send by others to me is also giving out the password
using the below program but it is in some ascii code characters or to
put more clear the password is encrypted ., well I need some code or a
way to open this encrypted database with a password... thanx in
advance... Pradeep..
The code Im using is :-
==============================================
Dim n As Long, s1 As String * 1, s2 As String * 1
Dim lsClave As String
Dim mask As String
mask = Chr(78) & Chr(134) & Chr(251) & Chr(236) & _
Chr(55) & Chr(93) & Chr(68) & Chr(156) & _
Chr(250) & Chr(198) & Chr(94) & Chr(40) & Chr(230) & Chr(19)
Open "c:\protected db.mdb" For Binary As #1
Seek #1, &H42
For n = 1 To 14
s1 = Mid(mask, n, 1)
s2 = Input(1, 1)
If (Asc(s1) Xor Asc(s2)) <> 0 Then
lsClave = lsClave & Chr(Asc(s1) Xor Asc(s2))
End If
Next
Close 1
MsgBox "The Password Is: " & lsClave
================================================== =