打印本文 打印本文 关闭窗口 关闭窗口
开发手记(四)——运用VB实战破解ACCESS密码
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1804  更新时间:2009/4/23 15:37:19  文章录入:mintao  责任编辑:mintao
    If (CommonDialog1.FileName = "" Or Mid(CommonDialog1.FileName, Len(CommonDialog1.FileName) - 2, 3) <> "mdb") Then

       i = MsgBox("您未选择文件或选择的文件不是ACCESS数据库文件", vbOKOnly + vbCritical, "注意")

       Exit Sub

    End If

    Open CommonDialog1.FileName For Binary As #1

    Get #1, 21, temp

    If temp = &H0 Then‘判断ACCESS数据库的版本号

        For i = 0 To 12

            Get #1, 67 + i, temp ''''逐次读取头文件中67-79位放入temp中,并与source97中各元素异或返回密码

            If temp = source97(i) Then Exit For ''''加密位读取完毕

            password = password & Chr((temp Xor source97(i)))

        Next

        Close #1

        If Len(password) = 0 Then

            Text1.Text = "该数据库没有加密!"

        Else

            Text1.Text = "该数据库的密码为:" + password

        End If

    Else

        If temp = &H1 Then

            For i = 0 To 39 Step 2

            Get #1, 67 + i, temp ''''逐次读取头文件中67-79位放入temp中,并与source2000中各元素异或返回密码

            If temp = source2000(i) Then Exit For ''''加密位读取完毕

            password = password & Chr((temp Xor source2000(i)))

            Next

            Close #1

            If Len(password) = 0 Then

                Text1.Text = "该数据库没有加密!"

            Else

                Text1.Text = "该数据库的密码为:" + password

            End If

        End If

    End If

End Sub

是不是ACCESS真的这么脆弱呢,其实你完全可以在数据库头文件的其他固定位与已存储的固定数据位上做文章,如何做这个丰富的想象空间就留给朋友们了!

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口