![]() |
C4 CacheD, 2012 port commands
Who knows something about it? :)
|
Not sure yet, by exploring cached i think commans must be sent as "packet" not string.
Packet can contain only hex numbers, and appear to be that 1st or 2 first bytes is length of "packet". Need more time for exploring. |
[cSS] 0x49 -> announce, as far as i remember :D
|
fairly easy.
you send packets assembled like the standard L2 Format. open cached in OllyDbg, search for referenced strings, and you'll have everything you need. gonna give you a short example: You get this referenced string: 0040FDCA . 68 40805000 PUSH Cached4p.00508040 ; UNICODE "static bool SendHomePacket(CAdminSocket* pSocket, const unsigned char* packet)" now you scroll down a bit until you get to a call to the disassemble function, 0040FE73 . E8 D8F50200 CALL Cached4p.0043F450 now you look a bit up and find the formatter (it's the second argument to the function), 0040FE6D . 68 645C5000 PUSH Cached4p.00505C64 ; ASCII "dS" packet formatter 'd' are 4 bytes, assembled to a 32 byte SIGNED integer. packet formatter 'S' is a sort of PASCAL string. first 2 bytes (or 1 byte, don't remember now...) are the LENGTH (not the size as it is unicode!) of the string, the following bytes are the UNICODE string itself WITHOUT the typical c-string NULL end. Edit: woop, forgot to say that the complete packet format is not only for example dS, but cdS, c being the packet ID. |
Mayii, can you post a sample of formed packet in hex please.
|
i made 2 funtions for u, make the rest yourself..., cya...
Code:
<?php |
KciNicK, great thanks!! )))
One more question please... I have number 1000. 1000 in D it is E8 03 00 00 , right? :) |
Quote:
anyway, the way of writing numbers is cpu arch dependant, first try a simple write(), if that don't work, then start making a function that writes in little endian... but i don't think that u will need one... |
Not info for AddItemPacket() and small info for AddItem2Packet (function must use Admin ID)
Please, write the example for this packets. Old method (12; char_id; warehouse; itemType; itemAmount; enchant; eroded; bless; ident; wished) is incorrect |
I can't make this functions working :(
CacheD returns no any byte of relpy, just close connection. In CacheD window appears error: admin server closed(127.0.0.1) error: 997 I trying to kick char id 79, packet is: 0B 00 05 4F 00 00 00 7A 00 00 00 |
KciNicK, please show yuo "pack" function? thx
|
not his function.
http://de.php.net/manual/en/function.pack.php |
Does anyone knows format of a reply from cacheD? First two bytes are packet length, third byte seems to be packet ID, but what about the rest?
|
Quote:
Just incorrect PHP code ) Work fine )) |
Quote:
If you have 1 - all was good. 01, 03, 07 - some errors... |
hmm... ADD_ITEM really not work (
CacheD reply is 04... |
AddItem format is DDDDDDDDDDD, right?
Error codes from C1 cacheD: Code:
01=SOCKET_INT_ERROR |
additem function has been replaced with AddItem2, cos additem was char name, additem2 is char id, and all functions now use char id instead...
|
AddItem2 work?
I have 01 in cached reply, but no have items in inventory. |
Quote:
|
2nucer
tnx :) |
And AddItem2 format is DDDDDDDDDS
S - any string with not null length, i don't know who what is it ) |
$buf = pack("c", 55); // 55 = AddItem2Packet();
$buf .= pack("i", 3652); //char_id $buf .= pack("i", 0); //warehouse $buf .= pack("i", 57); //item_type $buf .= pack("i", 1000); //item_amount $buf .= pack("i", 0); //enchant ? $buf .= pack("i", 0); //?? $buf .= pack("i", 0); //?? $buf .= pack("i", 0); //?? $buf .= pack("i", 0); //?? $buf .= tounicode("Web1"); //who Its write? Items added in tables. Cacned returns 1, but no item. |
nucer you can use AddItem2Packet?
help please |
thx all
|
| All times are GMT. The time now is 22:41. |