delphi 内存补丁  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi 内存补丁


[Quote title="引用"]

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.

[/Quote]


推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.092181205749512 seconds