数据库密码 [英] Database Password

查看:109
本文介绍了数据库密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用现在不支持的ChrB的代码。功能。代码

在A97中工作但不在A2k3中工作。谁能告诉我以下

参数等于什么?非常感谢。


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)

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)

推荐答案

Keith W写道:
Keith W wrote:
我有一些使用现在不支持的ChrB的代码。功能。代码
在A97中有效,但在A2k3中没有。谁能告诉我以下
参数等同于什么?非常感谢。

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)
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)只返回X的一个字节的字符串表示。它可能是

难以打印或查看。

Chr(X)返回X的两字节unicode表示,很容易打印或看到



因为你在密码线程中询问我猜这些字节

更容易,更好地用于某种字节比较或操作,

也许是西方的XOR。每隔一个字节操作零点没有太多意义。

如果是这样,我猜测只是将字符串加载到一个字节数组中就会

更容易,但我在这里推测。


-

Lyle Fairfield



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

< br>

" Lyle Fairfield" < LY *********** @ aim.com>在消息中写道

news:_3 **************** @ read1.cgocable.net ...
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:_3****************@read1.cgocable.net...

ChrB(X)只返回X的一个字节的字符串表示。可能难以打印或查看。
Chr(X)返回X的两字节unicode表示,很容易
因为你在密码线程中询问我猜这些字节更容易,更好地用于某种字节比较或操作,<在西方也许是XOR。每隔一个字节就没有多少操作零。
如果是这样,我猜测只是将字符串加载到一个字节数组中会更容易,但是我在这里推测。

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,谢谢你的回复。我非常了解

,所以感谢您的耐心等待。这里是完整的代码(你是正确的,这是异或的价格) - IIRC它起源于Micheal Kaplan(我可能拼写了

那个错误)。它适用于A97,但不适用于A2k3。它似乎落空了设置空密码数组

的地方。任何帮助非常感谢。在

之前,任何人都会对密码破解的权利和错误进行讨论,对于此代码的工作版本,我有一个真正合法使用的




公共函数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


''创建具有20个字节的字节数组,其中

''没有数据库密码

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)


''从真实文件中获取20个字节,其密码为

''我们应该检索

hFile = FreeFile

二进制打开stDatabase为#hFile

寻求#hFile,66 + 1

rgbytRaw = InputB(20,#hFile )

关闭#hFile


''足够准备,让我们现在获取密码。

ReDim rgbytPassword(0到19)

For ich = 0 to 19

rgbytPassword(ich)= rgbytRaw(ich)Xor rgbytNoPassword(ich)

Next ich


''添加尾随空值,这样即使密码

为20

''字符,也总能找到。然后抓住我们找到的第一个null并返回

密码

stBuffer = StrConv(rgbytPassword,vbUnicode)& vbNullChar

''StPasswordOfStDatabase = Left


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


''要显示密码,请在调试窗口中输入:?

StPasswordOfStDatabase(" c :\ foo.mdb")

''Where(" c:\ foo.mdb")是db文件的路径和名称


结束功能
(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


这篇关于数据库密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆