[help]please help

04/09/2011 16:15 kondos#1
packet , opcode , asci , binary
04/09/2011 16:45 kevin_owner#2
:O God is speaking to me and I know exactly what you mean. ... wait I can't talk to god....

really what the hell are you talking about.

Packet, opcode, ascii, binary well could you be more global xD

what do you want to know about this stuff?
packet = data
opcode = operation code
ascii = character scheme
binary = bunch of 0's and 1's which are used in your pc:) Well also in other stuff but let's keep it simple xD

really explain more cause my post is now 10 times longer than your question which could be more like your question is longer than my answer:)

so try it again and this time with some more details. like packet well what would you like to know about packets, how to get them? how to read them how to create them ect.
04/09/2011 19:19 kondos#3
IN C# how can i read packet
and what is parsing packet
and inject packet
and build packet
and opcode what is used for in sro
what is the difference between ascii and binary
and what is the API refer to
04/09/2011 20:24 kevin_owner#4
Oke well that's a little bit more but still very little information:P

but i'll answer your questions They might be a bit inaccurate cause I use C++ so i'll keep it globally which is used for a lot languages.

1. How can I read packets?
- There are 3 ways which I think about right now.
1. Inject into the client and extract the packets (Like edxSilkroadLoader) the result
is very nice cause you get the packets already parsed but it's the most difficult
way to parse packets.
2. Create a proxy(Search on wikipedia). it just connects to the official server and
waits for an client to connect and you can dump the packets.
3. Read them from your network adapter with something like winpcap.

The easiest is the 2nd way.
The most safest way is the 3rd way (2 is also 100% unless they can detect a proxy usage)
The best/easiest in a way to use/read the packets is the first one. cause the packets are already parsed so the heavy work is already done however it is injected into the client which can be insecure but drew is a great programmer so I guess it's pretty safe:) i've never been banned with that loader.

well your 2nd question "What is packet parsing"

EdxSilkroadLoader already has an build in packet parser which parses the packets for you but you want to know what parsing is so I'll explain it.

Lets say you got this packet:

Code:
10 00 01 20 00 00 0D 00  47 61 74 65 77 61 79 53
65 72 76 65 72 00
This is how you an sniffed packet looks like.

In silkroad the packet header is 6 bytes and the first 2 bytes is the size the 2nd two bytes is the opcode and the 2 bytes which ar left are the security bytes( Read drew bentons article about the security)

so in this case "10 00" is the size which is 16 if i'm correct.
the next two byts are "01 20" which you read as 2001 which is the opcode and the following two security bytes are 2 zeros well what we just did is parsing the packets just breaking it in pieces.

Here is an little example of how this looks like in EdxSilkroadLoader
Code:
Size = 16 opcode = 2001
0D 00
47 61 74 65 77 61 79 53 65 72 76 65 72              GatewayServer.
00
This isn't exactly the output of edxSilkroadLoader cause it typed this by myself but this is kinda how it looks like.

your 3rd question how to inject an packet

well to inject an packet you need some kind of proxy which is the easiest way and just send an packet to the server that's all

your 4th question "how to build a packet"

well building an packet can be done at differnt ways
for my own project i create an byte array which is my buffer and I move a pointer in that array to insert values. this is the C++ way but you could also create a structure with some members and set those and just send the structure.

your 5th question is like "what an opcode is used for in sro?" at least i guess

opcode stands for OPeration CODE so with this code (which you also see above) you can see what kind of packet it is. Like a moving packet which is 7021 from the client to the server or a chat packet which is something else.

your 6th question the differense between ascii and binairy

well just look at wikipedia for the best answer. ascii is just the standard character scheme but you also have unicode which are just the characters but unicode also has chinese and arabian chars in it. (silkroad uses both)
and binary are just a bunch of 0's en 1's which is something different. just look at wikipedia.

and i don't get your last question
05/14/2011 02:10 yehia#5
api stands for application programming interface
05/23/2011 15:17 kondos#6
is opcode is written in packet and if yes where is place of it????
05/23/2011 15:49 kevin_owner#7
Yes it is it's the 3rd and 4th byte.