I am developing an application in which users will use my tool, but every time the tool encounters some packets it will upload the packet class in c# as a .pcap file up to my site so that I can personally inspect it and make the necessary changes. I was wondering if anyone knew of a way for me to accomplish this goal of mine.
public XXXXXCapturer(LivePacketDevice globalDevice) {
PacketCommunicator globalCommunicator = globalDevice.Open(512, PacketDeviceOpenAttributes.Promiscuous, 1000);
using (BerkeleyPacketFilter filter = globalCommunicator.CreateFilter("ether host XX:XX:XX:XX:XX:XX"))
{
globalCommunicator.SetFilter(filter);
}
globalCommunicator.NonBlocking = false;
globalCommunicator.ReceivePackets(1, HandlePackets);
}
private void HandlePackets(Packet packet)
{
XXXXXDecoder Decoder = new XXXXXDecoder(packet);
// Get Packet & Upload
Info = new XXXXXInfo(Decoder.Data);
}