传奇一条龙,复古传奇,GM基地,传奇服务端

 找回密码
 立即注册

QQ登录

只需一步,快速开始

网友自助信息发布区,请自行甄别

查看: 721|回复: 2

Delphi传奇3大补帖源码1.78 CrDbt3

[复制链接]

624

帖子

2145

钻石

1359

积分

管理员

Rank: 9Rank: 9Rank: 9

在线时间
114 小时
发表于 2018-12-2 23:25:46 | 显示全部楼层 |阅读模式
Delphi传奇3大补帖源码1.78 CrDbt3
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.
游客,如果您要查看本帖隐藏内容请回复


回复

使用道具 举报

19

帖子

52

钻石

19

积分

初级GM

Rank: 1

在线时间
0 小时
发表于 2020-7-15 16:19:06 | 显示全部楼层
补帖源码1.78 CrDbt3
回复

使用道具 举报

201

帖子

143

钻石

224

积分

中级GM

Rank: 2

在线时间
23 小时
发表于 2020-8-31 08:49:00 | 显示全部楼层
客户端和服务器C++工程使用
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|八五GM论坛专业的传奇私服GM技术交流基地 ( 粤ICP备11015868号-18 ) 传奇私服 Array7.2 版权所有 © 八五论坛 Comsenz Inc.

|网站地图
快速回复 快速发帖 返回顶部 返回列表