- Joined
- Jul 15, 2004
- Messages
- 1,209
- Reaction score
- 690
LoadKeys;
s := 'C3186F4D02DF8D96949F55EDD87A7502BC8BE213050DDEE4';
Barr := @s;
DecC3(@Barr,Barr[1] or SizeOf(Barr),Boolean - toServer);
Log(@DecryptResult);
i know that ;] i made packet sniffing based on c1 c2 with decryptionjust remeber c1 and c3 type packet length is byte
c2 and c4 length is word its importand else c2 and c4 will be wrong decrypted
function HexTo(Source: String): TByteArray;
var
i,CharPtr:Integer;
tmp:String;
begin
CharPtr := 1;
for i := 0 To Length(Source) div 2 -1 do
begin
tmp := Copy(Source, CharPtr, 2);
inc(CharPtr,2);
Result[i] := StrToInt('$'+tmp);
end;
end;
function ToHex(Buffer:PByteArray; Len: Integer):string;
const
HexCode: Array [$0 .. $F] Of AnsiChar = '0123456789ABCDEF';
var
i:integer;
begin
for i := 0 to Len - 1 do
begin
Result := Result + HexCode[Buffer[i] shr 4]+HexCode[Buffer[i] and $0F];
end;
end;
procedure test;
var
arr: TByteArray;
begin
LoadKeys;
arr := HexTo(Edit1.text)
DeCodeC3(@Arr,Arr[1],True);
Edit2.Text := ToHex(@DecryptResult,DecryptResult[1]);
end;
procedure TMyFrm.MyButtonClick(Sender: TObject);
begin
test;
end;
i know that ;] i made packet sniffing based on c1 c2 with decryption
Search on this forum and you will find them. You can also find enc/dec src in any gameserver src released on this forum.Someone can rewrite this in C++? I don't know delphi so it's hard for me