473,417 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

Database Password

I have some code which uses the now unsupported "ChrB" function. The code
worked in A97 but does not with A2k3. Can anyone tell me what the following
arguments equate to? Many thanks.

ChrB(19)
ChrB(40)
ChrB(54)
ChrB(55)
ChrB(68)
ChrB(84)
ChrB(93)
ChrB(94)
ChrB(96)
ChrB(123)
ChrB(134)
ChrB(138)
ChrB(148)
ChrB(156)
ChrB(182)
ChrB(198)
ChrB(230)
ChrB(236)
ChrB(251)
ChrB(250)
Dec 13 '05 #1
21 2745
Keith W wrote:
I have some code which uses the now unsupported "ChrB" function. The code
worked in A97 but does not with A2k3. Can anyone tell me what the following
arguments equate to? Many thanks.

ChrB(19)
ChrB(40)
ChrB(54)
ChrB(55)
ChrB(68)
ChrB(84)
ChrB(93)
ChrB(94)
ChrB(96)
ChrB(123)
ChrB(134)
ChrB(138)
ChrB(148)
ChrB(156)
ChrB(182)
ChrB(198)
ChrB(230)
ChrB(236)
ChrB(251)
ChrB(250)


ChrB(X) simply returns a one byte string representation of X. It may be
difficult to print or see.
Chr(X) returns a two byte unicode representation of X which is easy to
print or see.

Since you are asking in a Password thread I'm guessing these one bytes
are easier, better to use in some kind of byte comparison or operation,
perhaps XOR in Western. There is not much point on operating on zeros as
every other byte.
If so, I'm guessing that just loading the string into a byte array would
be easier, but I'm speculating here.

--
Lyle Fairfield
Dec 13 '05 #2
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:_3****************@read1.cgocable.net...

ChrB(X) simply returns a one byte string representation of X. It may be
difficult to print or see.
Chr(X) returns a two byte unicode representation of X which is easy to
print or see.

Since you are asking in a Password thread I'm guessing these one bytes are
easier, better to use in some kind of byte comparison or operation,
perhaps XOR in Western. There is not much point on operating on zeros as
every other byte.
If so, I'm guessing that just loading the string into a byte array would
be easier, but I'm speculating here.

Hi Lyle, thanks for your response. I'm right on the edge of my knowledge on
this so thanks for your patience. Here's the full code (you're right about
the XOR) - IIRC it originated from Micheal Kaplan (and I've probably spelt
that wrong). It works in A97 but not in A2k3. It seems to fall over where
the empty password array is set. Any help greatly appreciated. And before
anyone jumps in with the rights and wrongs of password cracking, I have a
genuine and legal use for a working version of this code.

Public Function StPasswordOfStDatabase(stDatabase As String) As String
Dim hFile As Integer
Dim ich As Integer
Dim stBuffer As String
Dim rgbytRaw() As Byte
Dim rgbytPassword() As Byte
Dim rgbytNoPassword() As Byte

' Create the byte array with the 20 bytes that are present when there
' is no database password
rgbytNoPassword = ChrB(134) & ChrB(251) & ChrB(236) & ChrB(55) &
ChrB(93) & _
ChrB(68) & ChrB(156) & ChrB(250) & ChrB(198)
& ChrB(94) & _
ChrB(40) & ChrB(230) & ChrB(19) & ChrB(182)
& ChrB(138) & _
ChrB(96) & ChrB(84) & ChrB(148) & ChrB(123)
& ChrB(54)

' Grab the 20 bytes from the real file whose password
' we are supposed to retrieve
hFile = FreeFile
Open stDatabase For Binary As #hFile
Seek #hFile, 66 + 1
rgbytRaw = InputB(20, #hFile)
Close #hFile

' Enough prep, lets get the password now.
ReDim rgbytPassword(0 To 19)
For ich = 0 To 19
rgbytPassword(ich) = rgbytRaw(ich) Xor rgbytNoPassword(ich)
Next ich

' Add a trailing Null so one will always be found, even if the password
is 20
' characters. Then grab up to the first null we find and return the
password
stBuffer = StrConv(rgbytPassword, vbUnicode) & vbNullChar
'StPasswordOfStDatabase = Left$(stBuffer, InStr(1, stBuffer, vbNullChar,
vbBinaryCompare) - 1)
StPasswordOfStDatabase = stBuffer

'To reveal the password, type this into the debug window: ?
StPasswordOfStDatabase("c:\foo.mdb")
'Where("c:\foo.mdb") is the path to and name of the db file

End Function
Dec 13 '05 #3
ChrB is still supported in Access 2003. From the Help file:

The Chr function in Microsoft Access always returns 2-byte characters. In
previous versions of Microsoft Access, Chr(&H41) and ChrB(&H41) were equal,
but in the current version of Microsoft Access, Chr(&H41) and ChrB(&H41) +
ChrB(0) are equal.

?Chr(19) = (ChrB(19) & ChrB(0))
True
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Keith W" <he**@there.com> wrote in message
news:43**********@glkas0286.greenlnk.net...
I have some code which uses the now unsupported "ChrB" function. The code
worked in A97 but does not with A2k3. Can anyone tell me what the
following arguments equate to? Many thanks.

ChrB(19)
ChrB(40)
ChrB(54)
ChrB(55)
ChrB(68)
ChrB(84)
ChrB(93)
ChrB(94)
ChrB(96)
ChrB(123)
ChrB(134)
ChrB(138)
ChrB(148)
ChrB(156)
ChrB(182)
ChrB(198)
ChrB(230)
ChrB(236)
ChrB(251)
ChrB(250)

Dec 13 '05 #4
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:M-********************@rogers.com...
ChrB is still supported in Access 2003. From the Help file:

The Chr function in Microsoft Access always returns 2-byte characters. In
previous versions of Microsoft Access, Chr(&H41) and ChrB(&H41) were
equal, but in the current version of Microsoft Access, Chr(&H41) and
ChrB(&H41) + ChrB(0) are equal.

?Chr(19) = (ChrB(19) & ChrB(0))
True

So it looks like my problem is that the blank database password string is
different between 97 and 2k3, is that a reasonable assumption? As I stated
in my reply to Lyle, this code works in A97.

Keith.
Dec 13 '05 #5
Or its location is different. Or the whole procedure has been changed.
Or there are bad sunspots today.
This !!!!!should be!!!! easy (with the example in front of us) but
maybe it isn't. Regardless, I have qualms.
I'd start on location.

Dec 13 '05 #6
"Keith W" <he**@there.com> wrote in message
news:43**********@glkas0286.greenlnk.net...
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:M-********************@rogers.com...
ChrB is still supported in Access 2003. From the Help file:

The Chr function in Microsoft Access always returns 2-byte characters. In
previous versions of Microsoft Access, Chr(&H41) and ChrB(&H41) were
equal, but in the current version of Microsoft Access, Chr(&H41) and
ChrB(&H41) + ChrB(0) are equal.

?Chr(19) = (ChrB(19) & ChrB(0))
True

So it looks like my problem is that the blank database password string is
different between 97 and 2k3, is that a reasonable assumption? As I
stated in my reply to Lyle, this code works in A97.


Looks like you're talking about the code MichKa has at
http://www.trigeminal.com/code/DatabasePassword.bas

Note that that code is only for Jet 3.0/3.5 databases (i.e. Access 95 or
Access 97)

As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the Jet
4.0 database password is not even close to this easy to crack"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Dec 13 '05 #7
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:ju******************************@rogers.com.. .

As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the Jet
4.0 database password is not even close to this easy to crack"


Ah, thanks for that, I vaguely remember reading that ages ago but had
forgotten about it.

Regards,
Keith.
Dec 13 '05 #8
Douglas J. Steele wrote:
As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the Jet
4.0 database password is not even close to this easy to crack"


How close is not even close? Perhaps, Michka was crying wolf (maybe
that's not the right expression) in order to discourage the casual
hacker.

Dec 13 '05 #9
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Douglas J. Steele wrote:
As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the
Jet
4.0 database password is not even close to this easy to crack"


How close is not even close? Perhaps, Michka was crying wolf (maybe
that's not the right expression) in order to discourage the casual
hacker.


Don't know. Since I never use database passwords, I've never bothered
checking.

OTOH, since he gave the code to retrieve 3.0/3.5 passwords, if the 4.0
passwords were that easy to retrieve, I see no reason why he wouldn't have
given that code as well.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Dec 13 '05 #10
Douglas J. Steele wrote:
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Douglas J. Steele wrote:
As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the
Jet
4.0 database password is not even close to this easy to crack"

How close is not even close? Perhaps, Michka was crying wolf (maybe
that's not the right expression) in order to discourage the casual
hacker.


Don't know. Since I never use database passwords, I've never bothered
checking.

OTOH, since he gave the code to retrieve 3.0/3.5 passwords, if the 4.0
passwords were that easy to retrieve, I see no reason why he wouldn't have
given that code as well.


It's that easy. (I THINK!) I've only just mucked about since the first
post in this thread and I've been out a bit and busy a bit but I can
recover my passwords. Can I recover others? Don't know.

I'm assuming that if I can do it, Michka can do it. I think he wanted to
discourage us from looking. That's fair. Maybe I should have shut up too.

--
Lyle Fairfield
Dec 13 '05 #11
Well, Keith I think this can be done if one follows Michka's lead and
reads between the bytes. But one must find a new key, a different way
of iterating, and a trick that is applied to some bytes but not to
others. Other than that, it's a cinch!
I'm torn about publishing my adaptation of Michka's code (but for JET
4.0). I'm not a great admirer of Michka personally, but I am a great
admirer of his Access. I know that he's very bright and he's very much
in the know about who's doing what to whom. I'd bet 1000000 to 1 that
he broke this a long time ago. So why did he publish the crack for 3.5
but not for 4.0?
He says he did 3.5 to put the crack sellers out of business. Maybe it
didn't work out and he found that his work had been used in a way he
did not want it to be used. Maybe MS suggested he desist. Maybe
something else. I don't know.
Perhaps someone will point out a site or post where it's freely
available which means I could forget about it and do that other thing
.... what's it called now?... oh yeah! ... work!

(Of course I've tested this on no one else's DB so I can't say that it
works for sure).

Well a root canal (same tooth, fourth try) goes in the morning. In the
afternoon I'll be all sweetness and light and see if there has been any
further wisdom posted on this topic.

Dec 14 '05 #12
"Lyle Fairfield" <ly***********@aim.com> wrote
Well a root canal (same tooth, fourth try) goes in the morning. In the
afternoon I'll be all sweetness and light and see if there has been any
further wisdom posted on this topic.


Lyle,

Hope the root canal went smoothly and with as little discomfort as possible.

Larry
Dec 15 '05 #13
It went awry and filled my mouth permanently with the taste and feel of
________. Fill in the blank!

Dec 15 '05 #14
My recollection was that someone said that it wasn't _quite_ as easy to
retrieve the password in Jet 4 because it is stored differently.

But, clearly, it still CAN be retrieved, as witness the many inexpensive
"password recovery packages" available and your effort. Too, User and Group
security can be broken, too, but it must be more effort and/or research,
judging from the difference in cost of those "cracks".

Larry Linson
Microsoft Access MVP
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:L1****************@read1.cgocable.net...
Douglas J. Steele wrote:
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Douglas J. Steele wrote:

As MichKa says at http://www.trigeminal.com/codes.asp?ItemID=5#5, "the
Jet
4.0 database password is not even close to this easy to crack"
How close is not even close? Perhaps, Michka was crying wolf (maybe
that's not the right expression) in order to discourage the casual
hacker.


Don't know. Since I never use database passwords, I've never bothered
checking.

OTOH, since he gave the code to retrieve 3.0/3.5 passwords, if the 4.0
passwords were that easy to retrieve, I see no reason why he wouldn't
have given that code as well.


It's that easy. (I THINK!) I've only just mucked about since the first
post in this thread and I've been out a bit and busy a bit but I can
recover my passwords. Can I recover others? Don't know.

I'm assuming that if I can do it, Michka can do it. I think he wanted to
discourage us from looking. That's fair. Maybe I should have shut up too.

--
Lyle Fairfield

Dec 15 '05 #15
Larry Linson wrote:
My recollection was that someone said that it wasn't _quite_ as easy to
retrieve the password in Jet 4 because it is stored differently.

But, clearly, it still CAN be retrieved, as witness the many inexpensive
"password recovery packages" available and your effort. Too, User and Group
security can be broken, too, but it must be more effort and/or research,
judging from the difference in cost of those "cracks".


I'd agree about the "wasn't_quite_ as easy". But Michka says:
(http://www.trigeminal.com/lang/1033/...asp?ItemID=5#5)
"For what its worth, the Jet 4.0 database password is not even close to
this easy to crack, and no, I will not help you crack it, so don't ask."

I charge zero to get the password for a JET 4.0 db, provided that I can
be assured that everything is legal and ethical. How can one do that? I
have no idea.

--
Lyle Fairfield
Dec 15 '05 #16
rkc
Lyle Fairfield wrote:
It went awry and filled my mouth permanently with the taste and feel of
________. Fill in the blank!


Redmound.

Dec 15 '05 #17
If you can read my mind then why do we both need to post things here?

Dec 15 '05 #18
rkc
Lyle Fairfield wrote:
If you can read my mind then why do we both need to post things here?


Because you're Robert De Niro and I'm just some shmuck pretending
to be an actor.

Dec 15 '05 #19
rkc <rk*@rochester.yabba.dabba.do.rr.bomb> wrote in news:UHlof.30104
$X*******@twister.nyroc.rr.com:
Because you're Robert De Niro ....


He was great in Shane.

--
Lyle Fairfield
Dec 16 '05 #20
rkc
Lyle Fairfield wrote:
rkc <rk*@rochester.yabba.dabba.do.rr.bomb> wrote in news:UHlof.30104
$X*******@twister.nyroc.rr.com:

Because you're Robert De Niro ....

He was great in Shane.


I liked him as Gabby Hayes.

Dec 16 '05 #21
rkc wrote:
Lyle Fairfield wrote:
rkc <rk*@rochester.yabba.dabba.do.rr.bomb> wrote in news:UHlof.30104
$X*******@twister.nyroc.rr.com:

Because you're Robert De Niro ....

He was great in Shane.


I liked him as Gabby Hayes.


If you guys don't behave I'll reply to this post and change the subject
to:

INVEST $6 AND MAKE THOUSANDS LEGALLY!!!

then no one will bother looking at this thread :-).

James A. Fortune

Dec 16 '05 #22

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: John | last post by:
Hello. If I want to set up my first database and start using it in Dreamweaver what do I need to do? The book I'm working on has a CD with the database on. It is telling me to put it in the...
5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
8
by: John | last post by:
Hello. I am currently working through a book on Dreamweaver and using PHP. I am having a little trouble with setting up the database though. I have php 4.2.3 and MySQL 4.0.20a. I am running...
20
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the...
6
by: N. Graves | last post by:
Thank you for taking your time to read my question... please offer your knowledge it will be appreciated! I'm writing a ASP Web page to access a Access Database that has a Database Password set....
5
by: scorpion53061 | last post by:
is it possible to set the database password that you can set in access for a database from a vb.net application?
0
bartonc
by: bartonc | last post by:
#Boa:Dialog:DBConnectDialog import wx ##"""Given a set if login specs, create a dbServer instance and ## ensure that there is a valid, open connection to the database. ## If not, set the...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
7
by: Deccypher | last post by:
Hi Im trying to do something a little more complex with my login script at the moment it works fine, checks the username and password with the database if its wrong it echo's a error and if its right...
16
by: Greg (codepug | last post by:
If one converts that .mdb into an .mde the code is secure but the tables can still be imported. Just for Very Basic protection, I have placed a Password on the database using the "Set Database...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.