By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Acess 97 Database Password Decryption

P: n/a
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
================================================== =
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
TC
Code that works for jet 3 will not work for jet 4 & vice versa.

TC
"Pradeep Kumar" <pr*********@yahoo.com> wrote in message
news:84**************************@posting.google.c om...
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
================================================== =

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.