[返回首页]
 ◎ 您当前的位置:首页 >> 办公学堂 >> MS Access >> 正文
ACCESS2000数据库文件密码的提取(源程序c++builder5)
作者:未知 来源:网上收集 发布时间:2007-3-15 18:22:54 浏览次数: 0731518241774574


#include <vcl.h>
#pragma hdrstop

#include "dolACCESS.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tform1 *form1;
//---------------------------------------------------------------------------
__fastcall Tform1::Tform1(TComponent* Owner)
       : Tform(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tform1::SpeedButton1Click(TObject *Sender)
{
  if( OpenDialog1->Execute())
      edtFileName->Text=OpenDialog1->FileName;
  else
      Application->MessageBoxA("没有选定有效的文件名!","消息",IDOK);    
             
}
//---------------------------------------------------------------------------
void __fastcall Tform1::Button1Click(TObject *Sender)
{
   int iFileHandle;
   int iByteRead;
   int i,j;
   char *pszBuffer;
   char Code[0x27]={0x10,0xEC,0xCB,0x9C,0x50,0x28,0x85,0x8A,0xC2,0x7B,
                    0x63,0xDF,0xE1,0x13,0x59,0xB1,0xA2,0x79,0x04,0x7C};
   if(edtFileName->Text.Length()!=0)
   {
       try
       {
               iFileHandle=FileOpen(edtFileName->Text,fmOpenRead);
               FileSeek(iFileHandle,0x42,0);
               pszBuffer=new char[0x27];
               iByteRead=FileRead(iFileHandle,pszBuffer,0x27);
               FileClose(iFileHandle);
               i=iByteRead/2;
               for(j=0;j<=i;j++)
               {
                  Code[j]=Code[j]^pszBuffer[2*j];
               }
               delete [] pszBuffer;
               edtPassword->Text=Code;
               if(edtPassword->Text.Length()==0)
                  edtPassword->Text="此数据库未设置密码!";
       }
       catch(const Exception& e)
       {
               Application->MessageBoxA("读取文件错误!!!","错误!",IDOK);
       }
   }
   else
   {
       Application->MessageBoxA("没有输入有效的文件名","注意!",IDOK);
   }
}
//---------------------------------------------------------------------------


[返回上一页] [打 印]
热点文章 推荐文章 相关信息
·保护Access 2000数据库的安全
·Access使用查询--1.1. 用选择查询建立
·更改Excel数据导入源文件的快捷方法
·Access通用-自动替换数据库中的字符串
·Access 2K/XP 数据库的最佳NTFS权限设
·ACCESS2000数据库文件密码的提取(源程
·解决Access中分组报表的问题
·解决Access中分组报表的问题
·中文Access2000速成教程--1.8 定义表
·中文Access2000速成教程--1.7 创建索
·中文Access2000速成教程--1.6 定义“
·中文Access2000速成教程--1.5 使用已