破解ACCESS数据库密码
?牐犜恚菏紫龋颐且私釧ccess数据库的加密方法。Access数据库的有效密码为13位,在不加密时,数据库的第67至79位为一固定的字符串,每位的ASCII码值分别为86,FB,EC,37,5D,44,9C,FA,C6,5E,28,E6,13。加密时,分别用密码的每一位与67至79位的字符的ASCII码值进行异或运算,得到的一个新字符串,将它写回67至79位。
?牐犞懒思用芊椒ǎ饷芫捅冉先菀琢恕=?67至79位的字符的ASCII码值分别与“86,FB,EC,37,5D,44,9C,FA,C6,5E,28,E6,13”进行异或运算,即可得到密码。
?牐犗旅嫖颐怯肰B编个小程序,来实现Access数据库的解密。请在窗体上放置一个通用对话框控件Commondialog1,其Firlter属性设为“Access数据库文件*.mdb”;文本框控件Text1,命令控件Command1,其Caption属性设为“取得密码”。代码如下:
?牐燨ption Explicit
?牐燩rivate Sub Command1_Click?煟?
?牐燚im password As String
?牐燚im temp As Byte
?牐燚im source(12) As Byte
?牐燚im i As Integer
?牐爏ource(0) = &H86
?牐爏ource(1) = &HFB
?牐爏ource(2) = &HEC
?牐爏ource(3) = &H37
?牐爏ource(4) = &H5D
?牐爏ource(5) = &H44
?牐爏ource(6) = &H9C
?牐爏ource(7) = &HFA
?牐爏ource(8) = &HC6
?牐爏ource(9) = &H5E
?牐爏ource(10) = &H28
?牐爏ource(11) = &HE6
?牐爏ource(12) = &H13
?牐燙ommonDialog1.ShowOpen
?牐營f CommonDialog1.FileName = "" Then Exit Sub
?牐燨pen CommonDialog1.FileName For Binary As #1
?牐燜or i = 0 To 12
?牐燝et #1,67 + i,temp
?牐營f temp = source(i)
Then Exit For
?牐爌assword = password & Chr((temp Xor source(i)))?牐?
?牐燦ext
?牐燙lose #1
?牐營f Len(password)= 0 Then
?牐燭ext1.Text = "该数据库没有加密!"
?牐燛lse
?牐燭ext1.Text = "该数据库的密码为:" + password
?牐燛nd If
?牐燛nd Sub