-
Novice
A conceptual question about Packets
Hi everybody! I have some basic questions about muonline protocol and it's packet flow.
1. What protocol does MU Online use?
2. What is the structure of the muonline Packet?
3. When working with a packet editor( like WPE ), what he actually does after capturing a packet, and trying to send it?It resends the full raw packet back to the network adapter -> and then to the destination IP or it just sends the payload data?
4. Actually i've made an application that sniffs the hit packets, and add them to a listbox. ( using SharpPcap framework, c# platform) there i'm dealing with a lot of packet types, but i have no ideea how to send them back...and what to send back.. the raw packet? or the payload data ... now I have a full messup in my head could somebody give me a kick in the but so I figured out how to handle this "dead point".
Here is the source :
public partial class Form1 : Form
{
private ICaptureDevice device = CaptureDeviceList.Instance.First();
private int readTimeoutMilliseconds = 1000;
private List<byte[]> _packets = new List<byte[]>();
public Form1()
{
InitializeComponent();
}
private void btnStartSniffing_Click(object sender, EventArgs e)
{
CapturePackets();
}
private void btnStopSniff_Click(object sender, EventArgs e)
{
device.StopCapture();
device.Close();
}
private void btnClear_Click(object sender, EventArgs e)
{
lstboxPacketList.Items.Clear();
}
public void device_OnPacketArrival(object sender, CaptureEventArgs packet)
{
var clearPacket = Packet.ParsePacket(packet.Packet.LinkLayerType, packet.Packet.Data);
var ipPacket = IpPacket.GetEncapsulated(clearPacket);
if (ByteArrayToHex(ipPacket.PayloadPacket.PayloadData).StartsWith("C107159") && //StartsWith("C107159") &&
ByteArrayToHex(ipPacket.PayloadPacket.PayloadData).Length < 15)
{
if (lstboxPacketList.InvokeRequired)
{
lstboxPacketList.BeginInvoke(new MethodInvoker(
() => lstboxPacketList.Items.Add(
ByteArrayToHex(ipPacket.PayloadPacket.PayloadData))));
_packets.Add(clearPacket.PayloadPacket.PayloadData);
}
else
{
lstboxPacketList.Items.Add(ByteArrayToHex(ipPacket.PayloadPacket.PayloadData));
_packets.Add(clearPacket.PayloadPacket.PayloadData);
}
}
}
private void btnSendPackets_Click(object sender, EventArgs e)
{
SendPackets();
}
private void SendPackets()
{
device.Open();
try
{
foreach (var p in _packets)
{
device.SendPacket(p);
}
}
catch (Exception e )
{
MessageBox.Show(e.Message);
}
}
private void CapturePackets()
{
device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);
device.Open(DeviceMode.Normal, readTimeoutMilliseconds);
device.Filter = "ip and host x.x.x.x";
device.StartCapture();
}
}
-
-
Re: A conceptual question about Packets
i dont know about what u did there and coded but
the best way to protect the protocol is to compress EVERY packet , also a good idea is to add password protected compression in every tranmitted packet . if u do that then its awesome ;)