delphi 内存补丁


本文整理自网络,侵删。

 

引用

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Mask,ComCtrls;

type
TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
var
NewData : array[0..1] of byte = ($00,$00);
Bytesread : DWORD;

procedure TForm1.Timer1Timer(Sender: TObject);
var
hwin, pid: DWORD;
hprocess: DWORD;
begin
   hwin := FindWindow(nil,'外挂窗口');
     if hwin = 0 then
       Form1.Label1.Caption:='目标程序未运行'
     else
       Form1.Label1.Caption:='目标程序已运行';
       GetWindowThreadProcessId(hwin, pid);
       hprocess := OpenProcess(PROCESS_ALL_ACCESS, False, pid);
       if WriteProcessMemory(hProcess ,Pointer($00410000),@newdata,1 ,BytesRead ) then
       begin
       CloseHandle(hProcess);
       Form1.Label2.Caption:='目标程序解密成功 ';
       end
     else
       begin
       CloseHandle(hProcess);
       Form1.Label2.Caption:='目标程序解密失败 ';
       end;
    end;
end.

相关阅读 >>

Delphi写的验证身份证号有效性函数

Delphi cxgrid中回车键光标移到下列

Delphi stringtowidestring widestringtostring

Delphi twebbrowser控件编程

Delphi中使用android振动

Delphi pascal实现二分查找算法

Delphi环境下基于spcomm控件开发串口通讯报文字节丢失的问题解决

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

Delphi 汉字转十六进制的函数,可以互转不乱码

Delphi idhttp控件的防止异常的处理

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



打赏

取消

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

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

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

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

评论

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