packetnet-connections icon indicating copy to clipboard operation
packetnet-connections copied to clipboard

Example for Open File

Open lovejotd opened this issue 4 years ago • 3 comments

Is it possible to leverage this on opening a pcap instead of pulling from the device itself? If so, can you provide a short example?

lovejotd avatar Dec 18 '20 13:12 lovejotd

For whatever reason I didn't see this comment until just now, several months later...

So if you look under UnitTest/HttpSessionWatcherTest/HttpSessionWatcherTests.cs you'll find examples of passing packets in after reading them from an on-disk capture file.

It would be helpful to have an example but maybe just a note in the README.md about how its basically the same as how PacketDotNet works could work?

chmorgan avatar Jul 20 '21 00:07 chmorgan

hmmm... I am unable to get any data in the body of the request. So when I import a pcap with a image file for example, I see the metadata, but I cannot find the bytes in the request. Is there something I am doing wrong? I followed the same process as the HttpSessionWatcherTests. Have you gotten this to work in the past? Thanks!

lovejotd avatar Oct 20 '21 03:10 lovejotd

Hi @lovejotd do you have an example pcap file that reproduces the issue? The packets should be passed through the system. It's been a while since I used the library myself but I can't imagine I wouldn't be passing the packets back at the tcp level and the full http message passed at the http level.

chmorgan avatar Oct 20 '21 15:10 chmorgan