Dim inStream(10024) As Byte
Dim DataLength As Integer = Client.Receive(inStream)
Client.Receive(inStream, 0, CInt(Client.ReceiveBufferSize), SocketFlags.None)
Dim Packet As String = ""
For i As Integer = 0 To inStream.Length - 1
Packet += String.Format("{0:X2} ", inStream(i))
Next
Packet = Mid(Packet, 1, DataLength)
MsgBox(Packet)
Read the size only and then the rest of the packet
Client.Receive(tmpSize, 0, 2, 0);
//determine the actual size of the packet, if it is encrypted
Client.Receive(inStream, 2, actualSize+4, 0);
PWord(@instream.memory[0])^ = actualSize; //set the size
I advise you using SilkroadSecurityApi , but still , if you wanna use diff. proxies , here you can apply what i posted on stealthex.
This code is written by GoneUp , my teacher when i was toooo beginner
You should create a class called "sPacket" first , add public objects there ( opcode , data , size etc.)
And you should start this with a thread , or your gui thread will freeze ^^ This was orginally written by GoneUp
Code:
Dim Recv as thread = new thread (addressof receiving)
recv.start()
Code:
Private Sub Receiving()
Try
Dim bytetoread As UInt16
Do
Dim Packet As New sPacket()
Do
bytetoread = Client.Available
If bytetoread >= 6 Then
Dim buffer(6 - 1) As Byte
Client.Receive(buffer, 6, Net.Sockets.SocketFlags.None)
Packet.Lenght = BitConverter.ToUInt16(buffer, 0)
Packet.Opcode = BitConverter.ToUInt16(buffer, 2)
Packet.Direction = BitConverter.ToUInt16(buffer, 4)
Exit Do
Else
Threading.Thread.Sleep(10)
End If
Loop
Do 'it has a support to untck multiple packets too
bytetoread = Client.Available
If bytetoread >= Packet.Lenght Then
Dim buffer(Packet.Lenght - 1) As Byte
Client.Receive(buffer, Packet.Lenght, Net.Sockets.SocketFlags.None)
Packet.data = buffer
ParsePacket(Packet)
Exit Do
Else
Threading.Thread.Sleep(10)
End If
Loop
Loop
Catch ex As Exception
End Try
End Sub
@DeXee yes you can but sarkoplata already answerd your question
@sarkoplata
Quote:
It makes your life easier
I have to disagree. Sure for some people it can be easier but it makes it harder too switch to another lanuage. If you're used to not give variables the same it'll be harder to code in for example C#.
[Packets] Wie änder ich flyff packets? 07/16/2011 - Flyff Private Server - 19 Replies HeyHo,
Ich würde sehr gerne wissen wie man die Flyff Packets ändert...
ich denke mal Zahlen ändern werden nicht ausreichen oder?
WHICH PACKETS.... 04/24/2011 - Conquer Online 2 - 28 Replies mind if anyone tell me which specific packets are used to send and receive packing of dbs into dbscrolls cuz i cant seem to get wpepro record packets for me..
[Packets] 06/19/2009 - Kal Online - 11 Replies Hallo,
so geht an die letzten Feinheiten meines Magebots.
Wir sieht es mit Skillanimationen aus? Nehmen wir mal an Ice Magic ist 0x10 b 2, muss ich dann für das animationspacket (0x21 ka weis es gerade net auswendig) auch 2 senden? bzw gibt es fälle in dennen sich das unterscheidet?
2. Das Alte Thema Z-Coord... gibt es nen funktionierendes HeightDetour irgendwo im forum, oder nix public? Bin im mom in der Uni, wie sieht mit dem hier aus:
3. Weis einer die Nr vom Expell-Packet? Ich...
Need help with packets 07/28/2007 - Conquer Online 2 - 3 Replies hello all
When u use something in conquer. it sends a packet to conquer right?
Whats something good to see what this packet is. Also how can u send this packet again,
im new to this so i need some help.
Packets 07/17/2007 - Cabal Online - 7 Replies Ok, I recorded some packets. I was sitting in desert scream with a level 1 blader.
It had level 1 impact stab.
After three impact stab casts without moving at all, this is what I get:
55 81 8E BF 04 1E 95 22 31 6D 19 49 F4 05 A1 3A 7B A8 8E 68 BA F1 74
68 C5 AD 4A 57 16 FF DF 02 A7 75 89 27 CF C5 E5 6C 43 5C 68 F0 AE 8E
9F 8C D3 2C 70 DA 54 78 D3 B3 74 CF 72 5F 8F 16 B8 5C 0B 13 28 A0 68
Five normal attacks in a row.