ACCESS2000数据库文件密码的提取(源程序c++builder5)(推荐大家转换成C#版本)
2008-05-01 04:04
591 查看
#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);
}
}
#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);
}
}
相关文章推荐
- mysql密码为空时,c#如何运行一条cmd命令导入sql文件到数据库并获得mysql的输出
- 帝国CMS忘记了密码,数据库库文件位置,版本查询
- C# 三层结构中提取config文件中的数据库连接字符串
- C#遍历文件(夹)、读取tar.gz格式压缩文件,从文件名提取信息批量入数据库
- 用于转换和恢复从ipa文件中,提取到的png文件的Python脚本 支持Python 3.3版本
- Access97,Access2000,MDB 数据库密码破解C#程序
- [C#]Access 97/2K/XP/2K3数据库文件密码解密算法
- 求教:C#中将字母或数字密码转换为乱码存入数据库并在需要时取出!
- c#.net上传文件到数据库中(把文件转换成二进制流存在后台数据库)
- C#2005用XML来保存连接数据库的字符串(这样改变了服务器连接配制只需改一下这个文件就成了),琢磨了几天终于有解了,和大家分享一下,希望高手指点!
- C#.NET 大型通用信息化系统集成快速开发平台 4.1 版本 - 密码强化、网络安全强化
- C#:CsvReader读取.CSV文件(转换成DataTable)
- C#使用单文件数据库的问题
- 如何用密码保护共享文件? 推荐
- c#asp.net表格Html数据模板转换Pdf文件web打印pdf报表dll
- c# 调用Microsoft XPS Document Writer打印机,将Pdf文件转换成Xps文件
- 【原创】c#讲数据库数据转换为json格式(使用extjs,easyui中的datagrid)
- c#通过操作mongodb gridfs实现文件的数据库存储
- exe文件加密码(exepw)(超强推荐)
- 45、C#编译版本和数据库连接问题