• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

delphi打开修改其他程序内存

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

传奇3G大补贴V1.94G破解之本地服务器版源程序 ( 积分:1, 回复:0, 阅读:13 )
分类:Internet/TCPIP ( 版主:luyear, robertcool ) 
来自:scottrayn, 时间:2005-12-30 18:29:00, ID:3314213 [显示:小字体 | 大字体] 

unit Main;

interface

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

const
 Head = 'HTTP/1.1 200 OK';
 //Date1 = 'Date: Thu, 12 May 2005 05:16:59 GMT';
 Server = 'Server: Apache/2.0.54 (Win32) PHP/4.3.11';
 Powered = 'X-Powered-By: PHP/4.3.11';
 Len1 = 'Content-Length: 382';
 Content = 'Content-Type: text/html';
 Space = Char(#13) + Char(#10);

const
 Address1 = $471E7E;
 PokeValue1 = $90;
 Address2 = $471E7F;
 PokeValue2 = $90;
 Address3 = $471EAA;
 PokeValue3 = $EB;
 Address4 = $471EB4;
 PokeValue4 = $8E;
 NumberOfBytes = 1;

type
 TFrmMain = class(TForm)
  BTNStart: TButton;
  Label1: TLabel;
  Edit1: TEdit;
  Panel1: TPanel;
  TS1: TServerSocket;
  procedure BTNStartClick(Sender: TObject);
  procedure FormClose(Sender: TObject; var Action: TCloseAction);
  procedure TS1ClientRead(Sender: TObject; Socket: TCustomWinSocket);
  procedure TS1ClientError(Sender: TObject; Socket: TCustomWinSocket;
   ErrorEvent: TErrorEvent; var ErrorCode: Integer);
 private
  { Private declarations }
 public
  { Public declarations }
 end;

var
 FrmMain: TFrmMain;
 H: HWND;
 ProcessId: Integer;
 ThreadId: Integer;
 buf: PChar;
 lpNumberOfBytesWrite: Cardinal;
implementation

{$R *.dfm}

procedure TFrmMain.BTNStartClick(Sender: TObject);
var
 X: Integer;
begin
 H := FindWindow(nil, '传奇3大补帖1.94');
 if H = 0 then
 begin
  Application.MessageBox('本程序只适用于传奇3大补帖1.94版,' + #13 + #13 + '请先运行传奇3大补帖1.94。', '错误');
  exit;
 end;

 X := StrtoInt(Edit1.Text);
 if (X >= 65535) or (X <= 1024) then
 begin
  Application.MessageBox('该端口保留,请使用大于1024且小于65535的端口!', '错误');
  exit;
 end;

 TS1.Port := StrtoInt(Edit1.Text);
 try
  begin
   ThreadId := GetWindowThreadProcessId(H, @ProcessId);
   H := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId);
   GetMem(buf, 1);
   buf^ := Chr(PokeValue1);
   WriteProcessMemory(H, ptr(Address1), buf, NumberOfBytes, lpNumberOfBytesWrite);
   buf^ := Chr(PokeValue2);
   WriteProcessMemory(H, ptr(Address2), buf, NumberOfBytes, lpNumberOfBytesWrite);
   buf^ := Chr(PokeValue3);
   WriteProcessMemory(H, ptr(Address3), buf, NumberOfBytes, lpNumberOfBytesWrite);
   buf^ := Chr(PokeValue4);
   WriteProcessMemory(H, ptr(Address4), buf, NumberOfBytes, lpNumberOfBytesWrite);
   FreeMem(buf);
   CloseHandle(H);

   TS1.Active := True;
   Edit1.Enabled := False;
   BTNStart.Enabled := False;
  end;
 except
  begin
   Application.MessageBox('您所选用的端口,有可能系统正在使用,请调整!', '错误');
  end;
 end;
end;

procedure TFrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 TS1.Active := False;
end;

procedure TFrmMain.TS1ClientRead(Sender: TObject;
 Socket: TCustomWinSocket);
var
 TmpStr: string;
 Date1: string;
begin
 TmpStr := Socket.ReceiveText;
 Sleep(1000);
 Date1 := 'Date:' + DatetoStr(Date) + ' ' + TimetoStr(Time) + ' GMT';
 Socket.SendText(Head + Space + Date1 + Space + Server + Space + Powered + Space + Len1 + Space + Content + Space + Space + '#999999' + Space + 'WkdGdWJubGphRzkxCjcxMTI1NDA1Ck56RXhNalUwTURZPQowMzdmOGYzYTM1ZmM2ZGRlZmM1NmEyZTUyZDAxNGNmNwo3ZDkyZTI2NzI3MzQyNDNjNTkwZWQ4YmJmZmIxNjE1NQ==' + Space + 'ZDM1ODBjNzQyZjgxZDM0ZTI2NjBjOWUxMmE2Y2Y3ZmU=' + Space + 'Zx/nP1zwtTNR2s5vyJrcDnWthAQ=');
 Application.Terminate;
end;

procedure TFrmMain.TS1ClientError(Sender: TObject;
 Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
 var ErrorCode: Integer);
begin
 ErrorCode := 0;
end;

end.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Delphi-ErrorCode查询发布时间:2022-07-18
下一篇:
delphi zerorpc发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap