unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 =
class(TForm)
Edit1: TEdit;
Button1: TButton;
OpenDialog1: TOpenDialog;
Button2: TButton;
Panel1: TPanel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
Function GetAccess97Pwd(filename:
string):
string;
const key :
array[1..17]
of byte = (134, 251, 236, 55, 93, 68, 156, 250, 198, 94, 40, 230, 19, 182, 138, 96, 84);
var i : integer;
ch :
array[1..17]
of byte;
f :
File;
begin
result := '
';
if Trim(filename) = '
'
Then Exit;
assignfile(f,filename);
{$i-}
Reset(f,1);
{$i+}
if ioresult <> 0
then exit;
seek(f,$42);
blockread(f,ch,17);
closefile(f);
for i := 1
to 17
do result := result + Chr(ch[i]
xor key[i]);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.execute
then begin
edit1.text := opendialog1.filename;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
panel1.caption := GetAccess97Pwd(edit1.text);
end;
end.