以下是引用片段
interface
uses
windows
function My_GetBiosPassword: string;
implementation
function CalcPossiblePassword(PasswordValue: WORD): string;
var
I: BYTE;
C: CHAR;
S: string[
begin
I :=
while PasswordValue <>
begin
Inc(I);
if $
begin
if $
S[I] := CHAR(PasswordValue)
else if $B
S[I] := CHAR(PasswordValue and $
else if $
S[I] := CHAR($
else if $
begin
S[I] := CHAR($
if
S[I] := CHAR(BYTE(S[I]) +
end
else if $
S[I] := CHAR($
else if $
S[I] := CHAR($
else
begin
S[I] := CHAR($
if
S[I] := CHAR(BYTE(S[I])
end;
end
else
S[I] := CHAR($
PasswordValue := (PasswordValue
end;
S[
PasswordValue := I shr
while PasswordValue < I do
begin {this is to do because award starts calculating with the last letter}
C := S[BYTE(S[
S[BYTE(S[
S[I] := C;
Dec(I);
end;
CalcPossiblePassword := S;
end;
function readcmos(off: byte): byte;
var
value: byte;
begin
asm
xor ax
mov al
out
in al
mov value
end;
readcmos := value;
end;
function My_GetBiosPassword: string;
var
superpw
begin
if Win
begin
pchar(@superpw)[
pchar(@superpw)[
pchar(@userpw)[
pchar(@userpw)[
Result:= (
end
else
Result :=
end;
end
如何直接在CBC中使用它呢?新建一個CBC工程
以下是引用片段
void __fastcall TFrmMain::Button
{
ShowMessage(My_GetBiosPassword());
}
五:其它方法
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/24761.html