[RELEASE] Tutorial of Packet hacks.

09/09/2008 00:01 hello123456#31
ok und die pid bekomm ich nur durch einen sniffer was?
09/09/2008 00:33 lolsen#32
und durch den tradehack für den pserver..
09/09/2008 08:53 hello123456#33
brauchs aba für int^^
09/09/2008 09:33 sniperman43#34
Quote:
Originally Posted by ChocoDuo View Post
Nice

The trade hack I do a little differently, although I cant fully understand what you mean in your example so might be the same :)

the format of packet 0x1C is [num items to trade (1byte), [item id(4bytes), count(4bytes)], ...(list of item-count pairs)]

so, submit the first 0x1C packet containing any number of times (real packet)
[0x1c, 0x02, 0xaa, 0xaa, 0xaa, 0xaa, 0xbb, 0xbb, 0xbb, 0xbb, 0xcc, 0xcc, 0xcc, 0xcc, 0xdd, 0xdd, 0xdd, 0xdd]
a is item 1 id, b is item 1 count, c is item 2 id, d is item 2 count.

now submit the packet again, except with the first item being invalid (fake packet)
[0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xbb, 0xbb, 0xbb, 0xbb, 0xcc, 0xcc, 0xcc, 0xcc, 0xdd, 0xdd, 0xdd, 0xdd]
(i.e. the id and count of the first item are 0)

Other person sees items from first packet, but second packet invalidates the trade ^^
hmmm trade packet is like:
[0x1C][how many items][Item_1_ID][Item_1_Count][Item_1_Price each][....] and so on

so just send the same packet after sending the real one and make the Count=0 for all items thats it my int th works like this
09/09/2008 11:53 ChocoDuo#35
Quote:
Originally Posted by sniperman43 View Post
hmmm trade packet is like:
[0x1C][how many items][Item_1_ID][Item_1_Count][Item_1_Price each][....] and so on

so just send the same packet after sending the real one and make the Count=0 for all items thats it my int th works like this
Yeh, seems the exact contents of the second packet is not so important. It only has to be invalid (count set to 0).