unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
password:string;
temp:array [0..12] of byte;
temp1:byte;
source:array [0..12] of integer;
i:integer;
filename1:string;
file1:file of byte;
begin
password:='';
source[0]:=$86;
source[1]:=$FB;
source[2]:=$EC;
source[3]:=$37;
source[4]:=$5D;
source[5]:=$44;
source[6]:=$9C;
source[7]:=$FA;
source[8]:=$C6;
source[9]:=$5E;
source[10]:=$28;
source[11]:=$E6;
source[12]:=$13;
if form1.OpenDialog1.Execute then filename1:=form1.OpenDialog1.FileName;
if filename1='' then sendmessage(form1.Handle,$10,0,0);
assignfile(file1,filename1);
reset(file1);
for i:=1 to 66 do
begin
read(file1,temp1);
end;
for i:=0 to 12 do
begin
read(file1,temp);
if (temp=source) then break;
password:=password+char(temp xor source);
end;
closefile(file1);
if (length(password)=0) then
form1.Edit1.Text:='没有'
else
form1.Edit1.Text:=password;
end;
end.
我写的,无法在ACCESS2002通过,请指正!