ACCESS2000 database file Password extraction (source program C++builder5) (recommended for conversion to C # version)

Source: Internet
Author: User
Tags include valid
access|c++| Program | data | database | conversion #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 ("No valid file name is selected!") "," the Message ", 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= "This database is not set password!";
}
catch (const exception& e)
{
Application->messageboxa ("Read file Error!!!", "Error!", IDOK);
}
}
Else
{
Application->messageboxa ("No valid filename entered", "Note!", IDOK);
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.