Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames > DarkOrbit
You last visited: Today at 17:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[WP] Need help please

Discussion on [WP] Need help please within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2010
Posts: 23
Received Thanks: 1
Post [WP] Need help please

I want to compile this but its give an error, if somewone want to help me please pm-me




Code:
var
ZL_hlib, ZL_memDisp_hlib: handle;
ZLIB1_errstr: string;
zalloc_addrfunc, zfree_addrfunc: pointer;
zError: Integer;
const
ZLIB_VERSION = '1.2.5';
ZLIB_DLLNAME = _gScriptDir+'LIB\zlib125.dll';
MemDisp_DLLNAME = _gScriptDir+'LIB\memDisp.dll';
Z_MAX_WBITS = 15;
Z_DEF_MEM_LEVEL = 8;
Z_NO_FLUSH = 0;
Z_PARTIAL_FLUSH = 1;
Z_SYNC_FLUSH = 2;
Z_FULL_FLUSH = 3;
Z_FINISH = 4;
Z_OK = 0;
Z_STREAM_END = 1;
Z_NEED_DICT = 2;
Z_SIZE_ERROR = -7;
Z_ERRNO = -1;
Z_STREAM_ERROR = -2;
Z_DATA_ERROR = -3;
Z_EMPTY_INPUT = -8;
Z_MEM_ERROR = -4;
Z_BUF_ERROR = -5;
Z_VERSION_ERROR = -6;
Z_NO_COMPRESSION = 0;
Z_FILTERED = 1;
Z_BEST_SPEED = 1;
Z_HUFFMAN_ONLY = 2;
Z_BEST_COMPRESSION = 9;
Z_RLE = 3;
Z_DEFAULT_COMPRESSION = -1;
Z_DEFAULT_STRATEGY = 0;
Z_BINARY = 0;
Z_ASCII = 1;
Z_UNKNOWN = 2;
Z_DEFLATED = 8;
GZ_ASCII_TEXT = $01;
GZ_ZLIB_WINDOWBITS = -15;
GZ_HEADER_CRC = $02;
GZ_ZLIB_MEMLEVEL = 9;
GZ_EXTRA_FIELD = $04;
GZ_FILENAME = $08;
GZ_EXTRA_DEFAULT = 0;
GZ_COMMENT = $10;
GZ_EXTRA_MAX = 2;
GZ_RESERVED = $E0;
GZ_EXTRA_FASTEST = 4;

function libZLIB1_zerrounit: boolean;
begin
ZL_hlib := 0;
ZL_memDisp_hlib := 0;
result := true;
end;
const
__sconlibZLIB1 = libZLIB1_zerrounit;

function ZL_InitZLIB1lib: boolean;
begin
result := (ZL_hlib<>0);
if result then
Exit;
ZL_hlib := gDLL.LoadLib(ZLIB_DLLNAME);
result := (ZL_hlib<>0);
if not result then
ZLIB1_errstr := 'LoadLib: '+SysErrorMessage(GetLastError);
zalloc_addrfunc := 0;
zfree_addrfunc := 0;
ZL_memDisp_hlib := gDLL.LoadLib(MemDisp_DLLNAME);
if (ZL_memDisp_hlib<>0) then
begin
zalloc_addrfunc := gDLL.GetProcAddr(ZL_memDisp_hlib, 'GetMem_cdecl');
zfree_addrfunc := gDLL.GetProcAddr(ZL_memDisp_hlib, 'FreeMem_cdecl');
if (zalloc_addrfunc=0)or(zfree_addrfunc=0) then
begin
zalloc_addrfunc := 0;
zfree_addrfunc := 0;
end;
end;
end;

procedure ZL_DeInitZLIB1lib;
begin
gDLL.FreeLib(ZL_hlib);
zalloc_addrfunc := 0;
zfree_addrfunc := 0;
gDLL.FreeLib(ZL_memDisp_hlib);
end;
const
_zs_next_in = 1;
_zs_avail_in = 5;
_zs_total_in = 9;
_zs_next_out = 13;
_zs_avail_out = 17;
_zs_total_out = 21;
_zs_msg = 25;
_zs_zalloc = 33;
_zs_zfree = 37;
_zs_opaque = 41;
_zs_adler = 49;

function ZL_GetError(i: integer; zstr: string = ''): string;
begin
case i of
Z_OK: result := 'OK';
Z_STREAM_END: result := 'STREAM END';
Z_NEED_DICT: result := 'Dictionary is needed';
Z_ERRNO: result := 'Error: file operation failed';
Z_STREAM_ERROR: result := 'Error: stream was inconsistent';
Z_DATA_ERROR: result := 'Error: invalid or incomplete deflate data';
Z_MEM_ERROR: result := 'Error: out of memory';
Z_BUF_ERROR: result := 'Error: not enough room in the output buffer';
Z_VERSION_ERROR: result := 'Error: zlib version mismatch';
Z_SIZE_ERROR: result := 'Error: data size not match';
Z_EMPTY_INPUT: result := 'Error: input is empty';
else result := '';
end;
if (i<0)and(length(zstr)>0) then
result := result+' '+ZL_GetMsgError(zstr);
end;

function ZL_GetMsgError(zstr: string): string;
begin
result := sReadMemory(GInt(zstr, _zs_msg, 4));
end;

procedure ZL_SetRecBufs(var zstr: string; BufIn_addr, BufIn_avail, BufOut_addr, BufOut_avail: integer);
begin
PInt(zstr, BufIn_addr, _zs_next_in, 4);
PInt(zstr, BufOut_addr, _zs_next_out, 4);
PInt(zstr, BufIn_avail, _zs_avail_in, 4);
PInt(zstr, BufOut_avail, _zs_avail_out, 4);
end;

function ZL_GetVersion: string;
var
addr: integer;
begin
addr := gDLL.CallFuncEx(ZL_hlib, 'zlibVersion', 1);
result := sReadMemory(addr);
end;

function ZL_deflateInit(var zstr: string; level: Integer = -1): Integer;
begin
zstr := FStr(56);
PInt(zstr, zalloc_addrfunc, _zs_zalloc, 4);
PInt(zstr, zfree_addrfunc, _zs_zfree, 4);
PInt(zstr, nil, _zs_opaque, 4);
result := gDLL.CallFuncEx6(ZL_hlib, 'deflateInit_', 1, zstr, level, ZLIB_VERSION, length(zstr), null, null);
end;

function ZL_deflateInit2(var zstr: string; level, windowBits, memLevel, strategy: integer): Integer;
begin
zstr := FStr(56);
PInt(zstr, zalloc_addrfunc, _zs_zalloc, 4);
PInt(zstr, zfree_addrfunc, _zs_zfree, 4);
PInt(zstr, nil, _zs_opaque, 4);
result := gDLL.CallFuncEx9(ZL_hlib, 'deflateInit2_', 1, zstr, level, Z_DEFLATED, windowBits, memLevel, strategy, ZLIB_VERSION, length(zstr), null);
end;

function ZL_deflateEnd(var zstr: string): Integer;
begin

result := gDLL.CallFuncEx3(ZL_hlib, 'deflateEnd', 1, zstr, null, null);
end;

function ZL_inflateInit(var zstr: string): Integer;
begin
zstr := FStr(56);
PInt(zstr, zalloc_addrfunc, _zs_zalloc, 4);
PInt(zstr, zfree_addrfunc, _zs_zfree, 4);
PInt(zstr, nil, _zs_opaque, 4);
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateInit_', 1, zstr, ZLIB_VERSION, length(zstr));
end;

function ZL_inflateInit2(var zstr: string; windowBits: integer): Integer;
begin
zstr := FStr(56);
PInt(zstr, zalloc_addrfunc, _zs_zalloc, 4);
PInt(zstr, zfree_addrfunc, _zs_zfree, 4);
PInt(zstr, nil, _zs_opaque, 4);
result := gDLL.CallFuncEx6(ZL_hlib, 'inflateInit2_', 1, zstr, windowBits, ZLIB_VERSION, length(zstr), null, null);
end;

function ZL_inflateEnd(var zstr: string): Integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateEnd', 1, zstr, null, null);
end;

function ZL_deflate(var zstr: string; flush: integer): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'deflate', 1, zstr, flush, null);
end;

function ZL_inflate(var zstr: string; flush: integer): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflate', 1, zstr, flush, null);
end;

function ZL_deflateSetDict(var zstr: string; dict: string): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'deflateSetDictionary', 1, zstr, dict, length(dict));
end;

function ZL_inflateSetDict(var zstr: string; dict: string): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateSetDictionary', 1, zstr, dict, length(dict));
end;

function ZL_deflateReset(var zstr: string): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'deflateReset', 1, zstr, null, null);
end;

function ZL_inflateReset(var zstr: string): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateReset', 1, zstr, null, null);
end;

function ZL_inflateReset2(var zstr: string; windowBits: integer): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateReset2', 1, zstr, windowBits, null);
end;

function ZL_deflateParams(var zstr: string; level, strategy: integer): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'deflateParams', 1, zstr, level, strategy);
end;

function ZL_inflateSync(var zstr: string): integer;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'inflateSync', 1, zstr, null, null);
end;

function ZL_adler32(adler: variant; buf: string): cardinal;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'adler32', 1, int32(adler), buf, length(buf));
end;

function ZL_crc32(crc: variant; buf: string): cardinal;
begin
result := gDLL.CallFuncEx3(ZL_hlib, 'crc32', 1, int32(crc), buf, length(buf));
end;

function ZL_compressS(var Dest, Source: string; level: integer = -1): integer;
var
dlen: integer;
begin
dlen := length(Dest);
result := gDLL.CallFuncExF5(ZL_hlib, 'compress2', 1, 'sDsdd', Dest, dlen, Source, length(Source), level);
setlength(Dest, dlen);
end;

function ZL_compress(Dest: integer; var DestLen: integer; Source, SourceLen: integer; level: integer = -1): integer;
begin
result := gDLL.CallFuncExF5(ZL_hlib, 'compress2', 1, 'dDddd', Dest, DestLen, Source, SourceLen, level);
end;

function ZL_uncompressS(var Dest, Source: string; level: integer = -1): integer;
var
dlen: integer;
begin
dlen := length(Dest);
result := gDLL.CallFuncExF5(ZL_hlib, 'uncompress', 1, 'sDsdd', Dest, dlen, Source, length(Source), level);
setlength(Dest, dlen);
end;

function ZL_uncompress(Dest: integer; var DestLen: integer; Source, SourceLen: integer; level: integer = -1): integer;
begin
result := gDLL.CallFuncExF5(ZL_hlib, 'uncompress', 1, 'dDddd', Dest, DestLen, Source, SourceLen, level);
end;

function GZInitializeDecompressString(s: String; var Index: Cardinal): Integer;
var
Id1: Byte;
Id2: Byte;
Method: Byte;
Flags: Byte;
MaxIndex, Size: Cardinal;
begin
Result := Z_OK;
if Length(s)<10 then
Result := Z_DATA_ERROR 
else
begin
Id1 := Ord(s[1]);
Id2 := Ord(s[2]);
Method := Ord(s[3]);
Flags := Ord(s[4]);
if (Id1<>$1F)or(Id2<>$8B)or(Method<>Z_DEFLATED)or((FlagsandGZ_RESERVED)<>0) then
Result := Z_DATA_ERROR 
else
begin
MaxIndex := Length(s)-8;
Index := 11;
if ((FlagsandGZ_EXTRA_FIELD)<>0) then
begin
if (Index<=(MaxIndex-1)) then
begin
Size := Ord(s[Index])+256*Ord(s[Index+1]);
Inc(Index, 2);
if ((Index+Size)<=MaxIndex) then
Inc(Index, Size) 
else
Index := MaxIndex+1;
end 
else
Index := MaxIndex+1;
end;
if ((FlagsandGZ_FILENAME)<>0) then
begin
while (Index<=MaxIndex)and(s[Index]<>#00) do
Inc(Index);
if Index<=MaxIndex then
Inc(Index);
end;
if ((FlagsandGZ_COMMENT)<>0) then
begin
while (Index<=MaxIndex)and(s[Index]<>#00) do
Inc(Index);
if Index<=MaxIndex then
Inc(Index);
end;
if ((FlagsandGZ_HEADER_CRC)<>0) then
begin
if (Index<=(MaxIndex-1)) then
Inc(Index, 2) 
else
Index := maxIndex+1;
end;
if (index>maxIndex) then
Result := Z_DATA_ERROR;
end;
end;
zError := Result;
end;

function ZDecompress(InData: Pointer; InSz: Cardinal; var OutData: String): Integer;
var
Buffer: Pointer;
nChars, C, LRecvCount, LRecvSize, inPosition: Cardinal;
LDecompressRec: String;
LRecvBuf: TMemObj;
begin
LRecvCount := 0;
LRecvSize := 0;
LRecvBuf := TMemObj.Create(1);
LRecvBuf.Clear;
OutData := '';
inPosition := 0;
LDecompressRec := FStr(56, #00);
PInt(LDecompressRec, 0, _zs_adler, 4);
PInt(LDecompressRec, zalloc_addrfunc, _zs_zalloc, 4);
PInt(LDecompressRec, zfree_addrfunc, _zs_zfree, 4);
Result := ZL_inflateInit(LDecompressRec);
if (Result=Z_OK) then
begin
repeat
C := InSz-inPosition;
if C>=2048 then
nChars := 2048 
else
nChars := C;
Buffer := InData+inPosition;
inPosition := inPosition+nChars;
if nChars=0 then
Break;
PInt(LDecompressRec, Buffer, _zs_next_in, 4);
PInt(LDecompressRec, nChars, _zs_avail_in, 4);
PInt(LDecompressRec, 0, _zs_total_in, 4);
while (Result=Z_OK)and(GInt(LDecompressRec, _zs_avail_in, 4)>0) do
begin
if LRecvCount=LRecvSize then
begin
if LRecvSize=0 then
LRecvSize := 2048 
else
Inc(LRecvSize, 1024);
LRecvBuf.Size := LRecvSize;
end;
PInt(LDecompressRec, LRecvBuf.Pointer+LRecvCount, _zs_next_out, 4);
C := LRecvSize-LRecvCount;
PInt(LDecompressRec, C, _zs_avail_out, 4);
PInt(LDecompressRec, 0, _zs_total_out, 4);
Result := ZL_inflate(LDecompressRec, Z_NO_FLUSH);
Inc(LRecvCount, C-GInt(LDecompressRec, _zs_avail_out, 4));
end;
until (inPosition>=InSz)or(Result<>Z_OK);
if Result=Z_OK then
OutData := LRecvBuf.ReadS(LRecvCount, 0);
end;
zError := Result;
Result := ZL_inflateEnd(LDecompressRec);
if Result=Z_OK then
Result := zError;
LDecompressRec := FStr(56);
LRecvBuf.Free;
end;

function StrUnGZIP(s: String; CheckCRC: Boolean = True): String;
var
InData: TMemObj;
Index, InLs, InSz, FileSz, InCRC32: Cardinal;
begin
InLs := Length(s);
Result := '';
if (s='') then
zError := Z_EMPTY_INPUT 
else
begin
zError := GZInitializeDecompressString(s, Index);
if zError=Z_OK then
begin
InCRC32 := GInt(s, InLs-7, 4);
FileSz := GInt(s, InLs-3, 4);
InSz := InLs-5-Index;
InData := TMemObj.Create(1);
InData.Str := 'x?'+Copy(s, Index, InSz-2);
zError := ZDecompress(InData.Pointer, InSz, Result);
InData.Free;
if (zError=Z_OK) then
begin
if (Length(Result)<FileSz) then
begin
zError := Z_SIZE_ERROR;
Result := '';
end 
else
begin
SetLength(Result, FileSz);
if CheckCRCand(InCRC32<>(ZL_crc32(0, Result)and$FFFFFFFF)) then
begin
Result := '';
zError := Z_DATA_ERROR;
end;
end;
end;
end;
end;
end;

function ZCompress(InData: Pointer; InSz: Cardinal; var OutData: String; Compression: Integer;  = -1Strategy: Integer = 0): Integer;
var
OutSz, TotalOut: Cardinal;
RecvBuf: TMemObj;
ZStream: String;
begin
OutData := '';
ZStream := FStr(56, #00);
Result := ZL_deflateInit2(ZStream, Compression, GZ_ZLIB_WINDOWBITS, GZ_ZLIB_MEMLEVEL, Strategy);
if (Result=Z_OK) then
begin
RecvBuf := TMemObj.Create(1);
RecvBuf.Clear;
OutSz := (InSz+(InSzdiv10)+12+255)and(not 255);
RecvBuf.Size := OutSz;
PInt(ZStream, InData, _zs_next_in, 4);
PInt(ZStream, InSz, _zs_avail_in, 4);
repeat
RecvBuf.Size := OutSz;
TotalOut := GInt(ZStream, _zs_total_out, 4);
PInt(ZStream, RecvBuf.Pointer+TotalOut, _zs_next_out, 4);
PInt(ZStream, OutSz-TotalOut, _zs_avail_out, 4);
zError := ZL_deflate(ZStream, Z_NO_FLUSH);
Inc(OutSz, 256);
until (zError=Z_STREAM_END)or(GInt(ZStream, _zs_avail_in, 4)=0)or(zError<0);while (zError<>Z_STREAM_END)and(zError>=0) do
begin
RecvBuf.Size := OutSz;
TotalOut := GInt(ZStream, _zs_total_out, 4);
PInt(ZStream, RecvBuf.Pointer+TotalOut, _zs_next_out, 4);
PInt(ZStream, OutSz-TotalOut, _zs_avail_out, 4);
zError := ZL_deflate(ZStream, Z_FINISH);
Inc(OutSz, 256);
end;
Result := zError;
zError := ZL_deflateEnd(ZStream);
if (Result<0) then
zError := Result 
else
begin
if (zError=Z_OK) then
begin
OutSz := GInt(ZStream, _zs_total_out, 4);
RecvBuf.Size := OutSz;
OutData := RecvBuf.ReadS(OutSz, 0);
end;
Result := zError;
end;
ZStream := FStr(56, #00);
RecvBuf.Free;
end 
else
zError := Result;
end;

function StrGZIP(s: String; Compression: Integer;  = -1Strategy: Integer = 0): String;
var
InData: TMemObj;
lIn, lOut, CRC: Cardinal;
Buff: String;
begin
lIn := Length(s);
Result := '';
if (s='') then
zError := Z_EMPTY_INPUT 
else
begin
SetLength(Result, 10);
PInt(Result, $1F, 1, 1);
PInt(Result, $8B, 2, 1);
PInt(Result, 8, 3, 1);
PInt(Result, 0, 4, 1);
PInt(Result, 0, 5, 4);
PInt(Result, 0, 9, 1);
PInt(Result, 3, 10, 1);
InData := TMemObj.Create(1);
InData.Str := s;
zError := ZCompress(InData.Pointer, lIn, Buff, Compression, Strategy);
InData.Free;
if zError=(Z_OK) then
begin
Result := Result+Buff;
CRC := (ZL_crc32(0, s)and$FFFFFFFF);
lOut := Length(Result)+8;
SetLength(Result, lOut);
PInt(Result, CRC, lOut-7, 4);
PInt(Result, lIn, lOut-3, 4);
end 
else
Result := '';
end;
end;

procedure TESTvar
PathIn, PathOut, sInBuf, sOutBuf: String;
mBuf: TMemoryStream;
begin
PathIn := _gCustomDir+'Page.gz';
PathOut := _gCustomDir+'Page.out.gz';
ScriptTimeOut(25000);
mBuf := TMemorystream.Create;
ZL_InitZLIB1lib;
mBuf.LoadFromFile(PathIn);
mBuf.Position := 0;
mBuf.Read(sInBuf, mBuf.Size);
WriteLogLn('Input complete (size:'+IntToStr(Length(sInBuf))+'):');
WriteLogLn(BuftoHex(Copy(sInBuf, 1, 300), ' ')+' ...');
sOutBuf := StrUnGZIP(sInBuf, True);
WriteLogLn('Output (code:'+ZL_GetError(zError)+' size:'+IntToStr(Length(sOutBuf))+'):');
WriteLogLn(BuftoHex(Copy(sOutBuf, 1, 300), ' ')+' ...');
sOutBuf := StrGZIP(sOutBuf, Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY);
WriteLogLn('Output (code:'+ZL_GetError(zError)+' size:'+IntToStr(Length(sOutBuf))+'):');
WriteLogLn(BuftoHex(Copy(sOutBuf, 1, 300), ' ')+' ...');
mBuf.Clear;
mBuf.Write(sOutBuf, Length(sOutBuf));
mBuf.SaveToFile(PathOut);
ZL_DeInitZLIB1lib;
mBuf.Free;
end;

begin
if _isScriptTester then
TEST;
end;
const
METHOD = 'ID_CHECK';
var
nt, zt, rt, ii, ee, cl, clp, kt, uid, sid, pp, noDbuff, noNbuff, ID, ID_MAP, SIDf, ggsid, ParsedIDToSave, ParsedIDToSave_MAP, UnGZIP_nt, UnGZIP_zt, _gSessStartDock, _gSessMap: string;
mbuf, tbuf, testD, testN, dirTD, dirTN: TMemoryStream;
hh, cc, p, o, aa, a, l, k, m, w, ccc, j, length_CL: integer;
rr, ss, TFidr, WorkIDs: TstringList;
hlib: handle;

procedure OnCreate;
begin
ZL_InitZLIB1lib;
hlib := gDLL.LoadLib('kernel32.dll');
pp := _gCustomDir+'IBot\';
WorkIDs := TStringList.Create;
WorkIDs.Clear;
WorkIDs.Add('68801266');
tbuf := TMemoryStream.Create;
mbuf := TMemoryStream.Create;
rr := TStringList.Create;
ss := TStringList.Create;
TFidr := TStringList.Create;
TFidr.Clear;
testD := TMemoryStream.Create;
testN := TMemoryStream.Create;
dirTD := TMemoryStream.Create;
dirTN := TMemoryStream.Create;
end;

procedure OnDestroy;
begin
ZL_DeInitZLIB1lib;
tbuf.free;
mbuf.free;
rr.free;
ss.free;
TFidr.free;
testD.free;
testN.free;
dirTD.free;
dirTN.free;
gDLL.FreeLib(hlib);
end;

function Pars(beg, frm, en: string): string;
var
A, b: integer;
begin
Result := '';
if (Pos(beg, frm)=0)or(Pos(en, frm)=0) then
Exit;
if (beg='')or(en='') then
Exit;
A := Pos(beg, frm);
if A=0 then
Exit 
else
A := A+Length(beg);
frm := Copy(frm, A, Length(frm)-A+1);
b := Pos(en, frm);
if b>0 then
Result := Copy(frm, 1, b-1);
end;

function CheckLicense(var ACTIVATION, METHOD: string): boolean;
var
Skt: TSocket;
packet, LICENSE: string;
i: integer;
begin
result := FALSE;
Skt := gWSA.TCPsocket(true);
gWSA.Connect(Skt, _getIPbyHost('ibot-crack.16mb.com'), 80);
gWSA.Send(Skt, 'GET ?Check_License='+ACTIVATION+'&Method='+METHOD+' HTTP/1.0'+#13#10+'User-Agent: IBot Crack (The_Cruiser)'+#13#10+'Host: ibot-crack.16mb.com'+#13#10+#13#10);
i := gWSA.Recv(Skt, packet);
if i>0 then
begin
if (Pos('HTTP/1.1 200 OK', packet)>0)and(Pos(METHOD+'='+ACTIVATION, packet)>0)and(Round(StrToInt(Pars('Content-Length: ', packet, #13#10)))>0) then
result := TRUE;
end;
gWSA.ShutClose(Skt);
end;

function CreateDirectory(PathName: string): boolean;
begin
result := gDLL.CallFunc3(hlib, 'CreateDirectoryA', PathName, 0, null)<>0;
end;

function DirectoryExists(PathName: string): boolean;
const
FILE_ATTRIBUTE_DIRECTORY = 16;
var
i: integer;
begin
i := gDLL.CallFunc3(hlib, 'GetFileAttributesA', PathName, null, null);
result := (i<>-1)and((iandFILE_ATTRIBUTE_DIRECTORY)=FILE_ATTRIBUTE_DIRECTORY);
end;

function Replacer(txt, what, _to: string): string;
begin
while Pos(what, txt)>0 do
begin
Insert(_to, txt, Pos(what, txt));
Delete(txt, Pos(what, txt), length(what));
end;
result := txt;
end;

begin
ScriptTimeout(99999);
gMisc.PrintVariablesOff;
if (DirectoryExists(pp)=FALSE) then
CreateDirectory(pp);
if FileExists(_gCustomDir+'FakeID.ini') then
begin
ss.Clear;
ss.LoadFromFile(_gCustomDir+'FakeID.ini');
ii := ss[1];
end 
else
if (not (FileExists(_gCustomDir+'FakeID.ini'))) then
begin
ss.Clear;
ss.Add('[FAKE ID]');
randomize;
ss.Add(IntToStr(Round(RANDOM*(99999999)+100000000)));
ss.SaveToFile(_gCustomDir+'FakeID.ini');
ii := ss[1];
end;
if ((pos('/indexInternal.es?action=internalStart', _gBuff)>0)or(pos('/indexInternal.es?action=internalDock', _gBuff)>0))and(not _gFromserv) then
begin
o := 6;
aa := _gServIP;
_gSessStartDock := _gIDSession;
if nt<>'' then
nt := '';
end;
if (_gFromserv)and(o<7)and(_gServIP=aa)and(_gIDSession=_gSessStartDock) then
begin
nt := nt+_gBuff;
gBlockPacket;
if Pos('Content-Length', nt)<>0 then
begin
l := pos('GET', nt);
k := pos('alive', nt);
delete(nt, l, k-l+3);
m := pos('max', nt);
kt := copy(nt, 1, m+12);
cl := Pars('Content-Length: ', kt, #13#10);
length_CL := length(cl);
delete(nt, 1, m+12);
end;
if (StrToInt(cl)=length(nt)) then
begin
o := 8;
UnGZIP_nt := StrUnGZIP(nt);
ParsedIDToSave := Pars('"uid": ', UnGZIP_nt, ',"rank"');
if (ParsedIDToSave<>'')and(WorkIDs.IndexOf(ParsedIDToSave)>-1)and(CheckLicense(ParsedIDToSave, METHOD)=TRUE) then
begin
testD.Write(UnGZIP_nt, length(UnGZIP_nt));
testD.savetofile(_gCustomDir+'/Ibot/dO-'+ParsedIDToSave+'.gz');
while FileExists(_gCustomDir+'/Ibot/dO-'+ParsedIDToSave+'.gz')=false do
gSys.Sleep(100);
if FileExists(_gCustomDir+'/Ibot/dO-'+ParsedIDToSave+'.gz')=true then
gSys.Sleep(100);
dirTD.LoadFromFile(_gCustomDir+'/Ibot/dO-'+ParsedIDToSave+'.gz');
dirTD.Read(noDbuff, dirTD.Size);
gDLL.CallFunc3(hlib, 'DeleteFileA', pp+'dO-'+ParsedIDToSave+'.gz', null, null);
dirTD.clear;
ID := Pars('"uid": ', UnGZIP_nt, ',"rank"');
SIDf := Pars('SID='+'''+'dosid=', noDbuff, '''+';');
TFidr.Add(ID+'='+SIDf);
TFidr.SaveToFile(pp+SIDf);
TFidr.Clear;
noDbuff := Replacer(noDbuff, ID, ii);
gSys.Sleep(100);
dirTD.Write(StrGZIP(noDbuff), length(StrGZIP(noDbuff)));
dirTD.savetofile(_gCustomDir+'/Ibot/dT-'+ParsedIDToSave+'.gz');
while FileExists(_gCustomDir+'/Ibot/dT-'+ParsedIDToSave+'.gz')=false do
gSys.Sleep(100);
if FileExists(_gCustomDir+'/Ibot/dT-'+ParsedIDToSave+'.gz')=true then
gSys.Sleep(100);
mbuf.loadfromfile(_gCustomDir+'/Ibot/dT-'+ParsedIDToSave+'.gz');
gDLL.CallFunc3(hlib, 'DeleteFileA', pp+'dT-'+ParsedIDToSave+'.gz', null, null);
mbuf.Read(rt, mbuf.Size);
w := pos('Length', kt);
delete(kt, w+8, length_CL);
insert(inttostr(mbuf.Size), kt, w+8);
gSys.SendC(kt+rt);
testD.clear;
dirTD.clear;
mbuf.clear;
UnGZIP_nt := '';
noDbuff := '';
ID := '';
SIDf := '';
ParsedIDToSave := '';
length_CL := -1;
_gSessStartDock := '';
end;
end;
end;
if (pos('/indexInternal.es?action=internalMapRevolution', _gBuff)>0)and(not _gFromserv) then
begin
a := 3;
ccc := _gServIP;
_gSessMap := _gIDSession;
if zt<>'' then
zt := '';
end;
if (a=3)and(_gFromserv)and(_gServIP=ccc)and(_gIDSession=_gSessMap) then
begin
zt := zt+_gBuff;
gBlockPacket;
if Pos('Content-Length', zt)<>0 then
begin
l := pos('GET', zt);
k := pos('alive', zt);
delete(zt, l, k-l+3);
m := pos('max', zt);
kt := copy(zt, 1, m+12);
cl := Pars('Content-Length: ', kt, #13#10);
length_CL := length(cl);
delete(zt, 1, m+12);
end;
if StrToInt(cl)=length(zt) then
begin
a := 4;
UnGZIP_zt := StrUnGZIP(zt);
ParsedIDToSave_MAP := Pars('"userID": ', UnGZIP_zt, ',"sessionID"');
if (ParsedIDToSave_MAP<>'')and(WorkIDs.IndexOf(ParsedIDToSave_MAP)>-1)and(CheckLicense(ParsedIDToSave_MAP, METHOD)=TRUE) then
begin
testN.Write(UnGZIP_zt, length(UnGZIP_zt));
testN.savetofile(_gCustomDir+'/Ibot/nO-'+ParsedIDToSave_MAP+'.gz');
while FileExists(_gCustomDir+'/Ibot/nO-'+ParsedIDToSave_MAP+'.gz')=false do
gSys.Sleep(100);
if FileExists(_gCustomDir+'/Ibot/nO-'+ParsedIDToSave_MAP+'.gz')=true then
gSys.Sleep(100);
dirTN.loadfromfile(_gCustomDir+'/Ibot/nO-'+ParsedIDToSave_MAP+'.gz');
dirTN.Read(noNbuff, dirTN.Size);
gDLL.CallFunc3(hlib, 'DeleteFileA', pp+'nO-'+ParsedIDToSave_MAP+'.gz', null, null);
dirTN.clear;
ID_MAP := Pars('"userID": ', UnGZIP_zt, ',"sessionID"')
noNbuff := Replacer(noNbuff, ID_MAP, ii);
gSys.Sleep(100);
dirTN.Write(StrGZIP(noNbuff), length(StrGZIP(noNbuff)));
dirTN.savetofile(_gCustomDir+'/Ibot/nT-'+ParsedIDToSave_MAP+'.gz');
while FileExists(_gCustomDir+'/Ibot/nT-'+ParsedIDToSave_MAP+'.gz')=false do
gSys.Sleep(100);
if FileExists(_gCustomDir+'/Ibot/nT-'+ParsedIDToSave_MAP+'.gz')=true then
gSys.Sleep(100);
tbuf.loadfromfile(_gCustomDir+'/Ibot/nT-'+ParsedIDToSave_MAP+'.gz');
gDLL.CallFunc3(hlib, 'DeleteFileA', pp+'nT-'+ParsedIDToSave_MAP+'.gz', null, null);
tbuf.Read(rt, tbuf.Size);
w := pos('Length', kt);
delete(kt, w+8, length_CL);
insert(inttostr(tbuf.Size), kt, w+8);
gSys.SendC(kt+rt);
testN.clear;
dirTN.clear;
tbuf.clear;
UnGZIP_zt := '';
noNbuff := '';
ID_MAP := '';
ParsedIDToSave_MAP := '';
length_CL := -1;
_gSessMap := '';
end;
end;
end;
if (pos('/flashinput/galaxyGates.php?userID=', _gBuff)>0)and(not _gFromserv) then
begin
if ggsid='' then
begin
ggsid := Pars(ii+'&sid=', _gBuff, '&action');
if ggsid='' then
ggsid := Pars('&sid=', _gBuff, '&sample');
rr.LoadFromfile(pp+ggsid);
uid := rr.Names[0];
end;
if (WorkIDs.IndexOf(uid)>-1) then
begin
_gBuff := Replacer(_gBuff, ii, uid);
_gOutBuff := _gBuff;
end;
ggsid := '';
uid := '';
end;
if (_gServPort=8080)and(not _gFromserv)and(_gAbsNumPkt=1) then
begin
ee := copy(_gBuff, 8+length(ii), 32);
sid := ee;
rr.LoadFromfile(_gCustomDir+'/Ibot/'+ee);
ee := rr.Names[0];
if (WorkIDs.IndexOf(ee)>-1) then
begin
hh := length(ee);
cc := length(ii);
end;
end;
if (_gServPort=8080)and(not _gFromserv) then
begin
p := pos(ii, _gBuff);
if p>0 then
_gBuff := Replacer(_gBuff, ii, ee);
_gOutbuff := _gBuff;
end;
if (_gServPort=8080)and(_gFromserv) then
begin
p := pos(ee, _gBuff);
if p>0 then
_gBuff := Replacer(_gBuff, ee, ii);
_gOutbuff := _gBuff;
end;
if (_gServPort=9338)and(not _gFromserv) then
begin
cc := length(ii);
p := pos('@', _gBuff);
ee := copy(_gbuff, p+cc+2, 32);
rr.LoadFromfile(pp+ee);
ee := rr.Names[0];
if (WorkIDs.IndexOf(ee)>-1) then
begin
p := pos('@', _gBuff);
if p>0 then
_gBuff := Replacer(_gBuff, ii, ee);
_gOutbuff := _gBuff;
end;
end;
end.
Tyby-Tyby is offline  
Reply




All times are GMT +2. The time now is 17:11.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.