Delphi 检测程序有没有被DLL注入的代码


本文整理自网络,侵删。

 
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
i:integer;
dlls:tstringlist;
begin
dlls:=tstringlist.Create;
dlls.Add('ntdll.dll');

  //更具DLL判断外挂
  for I := 0 to DLLS.Count - 1 do
  begin
    if (LoadLibrary(PChar(DLLS.Strings[i]))>0) then
    begin
      WinExec('cmd.exe /c echo 发现非法外挂.错误代码:101! & pause',SW_SHOW);
      ExitProcess(0);
    end;
  end;
end;

end.

相关阅读 >>

Delphi 安装fastreport4.8.xx

Delphi实现屏幕抓图

Delphi 隐藏桌面图标和任务栏

Delphi fmx检查应用程序状态更改

Delphi 的链式代码

Delphi 时间戳与日期互转

Delphi 无dll版下载者

Delphi 将 4 个 byte 合成 1 个 integer 的五种方法 - 回复 "三足乌" 的问题

Delphi实现dbgrid全选和反选功能

Delphi应用程序 paramstr()带有参数

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



打赏

取消

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

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

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

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

评论

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