c - Replay Pcap files like data -
i want record handshake messages between server , client file , replay them later.
for example, when run s_server command -debug option, output follows:
read 0x9482088 [0x948d518] (2064 bytes => 2064 (0x810)) 0000 - 0b 00 08 0c 00 08 09 00-04 1a 30 82 04 16 30 82 ..........0...0. 0010 - 02 fe a0 03 02 01 02 02-01 02 30 0d 06 09 2a 86 ..........0...*. 0020 - 48 86 f7 0d 01 01 05 05-00 30 81 88 31 0b 30 09 h........0..1.0. 0030 - 06 03 55 04 06 13 02 4e-4c 31 0b 30 09 06 03 55 ..u....nl1.0...u 0040 - 04 08 0c 02 4e 42 31 12-30 10 06 03 55 04 07 0c ....nb1.0...u... 0050 - 09 41 4d 53 54 45 52 44-41 4d 31 10 30 0e 06 03 .amsterdam1.0... 0060 - 55 04 0a 0c 07 4d 41 49-4e 20 43 41 31 0c 30 0a u....main ca1.0. 0070 - 06 03 55 04 0b 0c 03 49-43 54 31 17 30 15 06 03 ..u....ict1.0... 0080 - 55 04 03 0c 0e 77 77 77-2e 6d 61 69 6e 63 61 2e u....www.mainca.
i can record data files. how can extract data (bytes) buffer? there utility in openssl it? or can done in c program?
thank you!
yes. assuming saving log pcap file, tcpreplay want. if you're not saving pcap
, can either libpcap
or writing file (the format not terribly complicated).
Comments
Post a Comment