delphi 读取ESET NOD32 的用户名与密码


本文整理自网络,侵删。

 var
Form1: TForm1;
mask: array[0..19] of Byte = ($61, $D6, $D4, $E9, $DD, $F0, $FB, $F2, $5B, $64, $35, $AD, $B7, $C8, $19, $75, $EC, $31, $2B, $BC);
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
Reg: TRegistry;
buf: PByteArray;
size: Integer;
i: integer;
username, password: string;
begin
try
Reg := TRegistry.Create;

Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('SOFTWARE\ESET\ESET Security\CurrentVersion\Plugins\01000400\Profiles\@My profile',false) then
begin
username := Reg.ReadString('Username');
size := Reg.GetDataSize('Password');
GetMem(buf, size);
Reg.ReadBinaryData('Password', buf^, size);

i := 0;

while i < size - 1 do
begin
password := password + chr(buf[i] xor mask[i]);
Inc(i, 2);
end;

ShowMessage('Username: ' + username);
ShowMessage('Password: ' + password);
end;
finally
Reg.CloseKey;
Reg.Free;
end;

end;

相关阅读 >>

python4Delphi 示例应用程序在 Delphi 应用程序中运行简单的 python 脚本

Delphi中使用ado连接带密码的access

Delphi检测用户超过5分钟没有操作键盘或鼠标

Delphi 查看内存数据的函数

Delphi listbox模糊查找文字

Delphi idhttp实现get方法下载文件,断点续传

Delphi 搜索字符串在流中的位置

Delphi 2009 之 tballoonhint

Delphi xe 程序瘦身.编译后exe最低90kb

Delphi 如何从文本内容中删除指定行

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...