I have two PCAP files, A and B
A has a magic number in the header d4 c3 b2 a1 , B has a magic number in the header 4d 3c b2 a1 . According to the wirehark documentation ( http://wiki.wireshark.org/Development/LibpcapFileFormat ), only 0xd4c3b2a1 and 0xa1b2c3d4 are real magic numbers, which makes me think that B is not a real magic number.
Running file on linux completes this, with the output of file A :
tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535)
file B just gives:
data
It seems that everything that B wrote wrote it in a "swapped" (little-endian) format, but it wrote forst twp bytes with bits of the wrong path. Given that I would expect the big-endian system to write the whole int32 differently, rather than individual bytes, giving the magic number 1a 2b 3c 4d .
Is B valid file? If so, why? Can different systems write both 32-bit ints and individual nibbles in a byte in random order?
source share