给你源程序算了: [
]
const
xorString: array[0..12] of Byte =
($86, $FB, $EC, $37,
$5D, $44, $9C, $FA,
$C6, $5E, $28, $E6, $13);
xorString2: array[0..20] of Byte =
($D3, $EC, $08, $9C,
$93, $28, $46, $8A,
$01, $7B, $A0, $DF,
$22, $13, $9A, $B1,
$61, $79, $C7, $7C, $5B);
var
passBuf: array[0..14] of Byte;
pass: array[0..14] of Char;
passBuf2: array[0..40] of Byte;
pass2: array[0..20] of Char;
B: Byte;
F: TFileStream;
I, J: Integer;
begin
if FileExists(FileNameEdit.Text) then
begin
F := TFileStream.Create(FileNameEdit.Text, fmOpenRead);
if not chk2000.Checked then //不是2000的格式
try
F.Seek($42, soFromBeginning);
F.Read(passBuf, 14);
for I := 0 to 13 do
begin
B := passBuf
xor xorString;
pass := Char(B);
end;
pass[SizeOf(pass) - 1] := #0;
passEdit.Text := StrPas(Pass);
finally
F.Free;
end
else //Access2000
try
F.Seek($42, soFromBeginning);
F.Read(passBuf2, 40);
I := 0;
J := 0;
while I < 40 do
begin
B := passBuf2 xor xorString2[J];
pass2[J] := Char(B);
Inc(I, 2);
Inc(J);
end;
pass2[SizeOf(pass2) - 1] := #0;
passEdit.Text := StrPas(Pass2);
finally
F.Free;
end;
end;