This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to import via Text2pcap the following Hex DATA

0

45 00 00 44 00 00 40 00 40 84 52 06 0a 00 55 7c c2 96 c6 1d (Level Internet Protocol where Internet Protocol, Src: 10.0.85.124 (10.0.85.124), Dst: 194.150.198.29 (194.150.198.29)etc...

text2pcap ???? src-file dst-file

asked 03 Dec '10, 01:29

tgeanp00's gravatar image

tgeanp00
1111
accept rate: 0%


One Answer:

0

Save the data in a file (e.g., in.txt), with hex offsets prepending each line of 16 bytes as follows:

0000  45 00 00 44 00 00 40 00 40 84 52 06 0a 00 55 7c
0010  c2 96 c6 1d

Then run something like , "text2pcap -e 0x800 in.txt out.pcap"

answered 28 Mar '11, 12:43

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

Or "text2pcap -l 101 in.txt out.pcap", which will use "raw IP" encapsulation, rather than adding fake Ethernet headers.

(28 Mar '11, 18:21) Guy Harris ♦♦