How to get packets

06/10/2016 03:53 Mr.Awesome1337#1
Hey ,guys now I need to.get packets iam working in c# program how to get packet what tools should I use... can any one explain me with steps...thanks..
06/10/2016 19:15 DaxterSoul#2
First:
You should enable your c# program to receive and send packets by using [Only registered and activated users can see links. Click Here To Register...] as you can ignore packet encryption to a certain degree.. It contains examples for a server_stats viewer add a simple_proxy ([Only registered and activated users can see links. Click Here To Register...] is also interesting)

Second:
Because you get the packets in your C# application in a flat byte-array you need to know how the structure of packet data looks like and which opcode serves a specific purpose. Sending invalid data to client mostly results in a client crash while sending one to the server will only disconnect you.

Unstructured (flat):
Code:
[C -> S][2001][12 bytes][Enc]
09 00 53 52 5F 43 6C 69 65 6E 74 00               ..SR_Client.....
Structured
Code:
[C -> S][2001][12 bytes][Enc]
09 00                                             ................    
53 52 5F 43 6C 69 65 6E 74                        SR_Client.......
00                                                ................
Third:
Once you understood how to read/write/send packets and want to give complex packets a try then you need to parse some of the textdata files (characterdata.txt, teleportbuilding.txt, itemdata.txt, skilldata.txt most importantly) first. A lot of those complex packets have dynamic data depending on their type. Take a look [Only registered and activated users can see links. Click Here To Register...].

Tools:
edxSilkroadLoader5 (Packet Auto-Parser) can help you with identifying the structure but i recommend not fully relying on it because there are some edgy cases.

phConnector /phAnalyzer is something you should develop yourself for the purpose of analyzing packets because...
Quote:
phConnector is VERY old now and may have problems that will never be fixed. You should discontinue using it. The repository will be left up only as a reference.
([Only registered and activated users can see links. Click Here To Register...])


For more information about packet or file structures visit my GitHub+Wiki (link in signature)