Quote:
Originally Posted by lordfeling
Hi, thanks for you responce.
I've captured somes packet :
Code:
Sit-stand up :
[C -> S][704F]
04
Code:
pick gold :
[C -> S][7074]
01
02
01
6E 05 1A 00
I never programmed a tool with packet.
That why I require help for learn how to use Packet.
Thanks.
|
Ok, First of all we should import our class.
Just write the top of the class :
PHP Code:
Imports System.Net.Sockets
Now we are able to use system.net.sockets class.
Lets declare our socket :
PHP Code:
Public Client As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Now , we are should connect to our proxy to inject packets.
You can basicly use phConnector for this.
(And you will redirect your ip to 127.0.0.1 : 15778 from loader. )
Lets connect our socket :
PHP Code:
Client.Connect("localhost", x) x = your phConnector botport
Now we connected to proxy and we can send packets.
Packets are in raw form at fact , but we convert em to easier structure.
Client.Send("x") will send raw packets.
So we should make our packet raw at first.
Here is my func. to do that. This func. is written by xKraizy.
PHP Code:
Public Sub SendPacket(ByVal OpCode As String, ByVal sData As String, ByVal Enc As Boolean)
Using buffer As New IO.MemoryStream
Using w As New IO.BinaryWriter(buffer)
w.Write(CUShort(0))
w.Write(CUShort("&H" + OpCode))
If Enc = True Then
w.Write(CUShort(3))
Else
w.Write(CUShort(1))
End If
For n = 0 To sData.Length / 2 - 1
w.Write(CByte("&H" & sData.Substring(n * 2, 2)))
Next
w.BaseStream.Position = 0
w.Write(CUShort(w.BaseStream.Length - 6))
w.Flush()
Client.Send(buffer.ToArray)
End Using
End Using
End Sub
You can call this function anywhere you want now.
For example , add client connecting thingy to form_load , and add a button and write this.
PHP Code:
SendPacket("704F","04",False)
First parameter is your opcode
Second parameter is your packet data
Third packet is a boolean , if you make it True , you will be able to send encrypted packets.(They are a bit intermediate part.)
And about gold packet ;
I dont really remember but every byte in packet has a meaning.
PHP Code:
[C -> S][7074] // Opcode
01 // Some Flag
02 // Some Flag
01 // Some Flag
6E 05 1A 00 // UniqueID of gold.
Have fun and ask when you needed !
sarkolata