sniffer 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. #------------------------------------------------------------------------------
  2. # $File: sniffer,v 1.34 2022/12/14 18:27:36 christos Exp $
  3. # sniffer: file(1) magic for packet capture files
  4. #
  5. # From: guy@alum.mit.edu (Guy Harris)
  6. #
  7. #
  8. # Microsoft Network Monitor 1.x capture files.
  9. #
  10. 0 string RTSS NetMon capture file
  11. >5 byte x - version %d
  12. >4 byte x \b.%d
  13. >6 leshort 0 (Unknown)
  14. >6 leshort 1 (Ethernet)
  15. >6 leshort 2 (Token Ring)
  16. >6 leshort 3 (FDDI)
  17. >6 leshort 4 (ATM)
  18. >6 leshort >4 (type %d)
  19. #
  20. # Microsoft Network Monitor 2.x capture files.
  21. #
  22. 0 string GMBU NetMon capture file
  23. >5 byte x - version %d
  24. >4 byte x \b.%d
  25. >6 leshort 0 (Unknown)
  26. >6 leshort 1 (Ethernet)
  27. >6 leshort 2 (Token Ring)
  28. >6 leshort 3 (FDDI)
  29. >6 leshort 4 (ATM)
  30. >6 leshort 5 (IP-over-IEEE 1394)
  31. >6 leshort 6 (802.11)
  32. >6 leshort 7 (Raw IP)
  33. >6 leshort 8 (Raw IP)
  34. >6 leshort 9 (Raw IP)
  35. >6 leshort >9 (type %d)
  36. #
  37. # Network General Sniffer capture files.
  38. # Sorry, make that "Network Associates Sniffer capture files."
  39. # Sorry, make that "Network General old DOS Sniffer capture files."
  40. #
  41. 0 string TRSNIFF\040data\040\040\040\040\032 Sniffer capture file
  42. >33 byte 2 (compressed)
  43. >23 leshort x - version %d
  44. >25 leshort x \b.%d
  45. >32 byte 0 (Token Ring)
  46. >32 byte 1 (Ethernet)
  47. >32 byte 2 (ARCNET)
  48. >32 byte 3 (StarLAN)
  49. >32 byte 4 (PC Network broadband)
  50. >32 byte 5 (LocalTalk)
  51. >32 byte 6 (Znet)
  52. >32 byte 7 (Internetwork Analyzer)
  53. >32 byte 9 (FDDI)
  54. >32 byte 10 (ATM)
  55. #
  56. # Cinco Networks NetXRay capture files.
  57. # Sorry, make that "Network General Sniffer Basic capture files."
  58. # Sorry, make that "Network Associates Sniffer Basic capture files."
  59. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  60. # Sniffer Pro", capture files."
  61. # Sorry, make that "Network General Sniffer capture files."
  62. # Sorry, make that "NetScout Sniffer capture files."
  63. #
  64. 0 string XCP\0 NetXRay capture file
  65. >4 string >\0 - version %s
  66. >44 leshort 0 (Ethernet)
  67. >44 leshort 1 (Token Ring)
  68. >44 leshort 2 (FDDI)
  69. >44 leshort 3 (WAN)
  70. >44 leshort 8 (ATM)
  71. >44 leshort 9 (802.11)
  72. #
  73. # "libpcap" capture files.
  74. # https://www.tcpdump.org/manpages/pcap-savefile.5.html
  75. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  76. # the main program that uses that format, but there are other programs
  77. # that use "libpcap", or that use the same capture file format.)
  78. #
  79. 0 name pcap-be
  80. >4 beshort x - version %d
  81. >6 beshort x \b.%d
  82. # clear that continuation level match
  83. >20 clear x
  84. >20 belong&0x03FFFFFF 0 (No link-layer encapsulation
  85. >20 belong&0x03FFFFFF 1 (Ethernet
  86. >20 belong&0x03FFFFFF 2 (3Mb Ethernet
  87. >20 belong&0x03FFFFFF 3 (AX.25
  88. >20 belong&0x03FFFFFF 4 (ProNET
  89. >20 belong&0x03FFFFFF 5 (CHAOS
  90. >20 belong&0x03FFFFFF 6 (Token Ring
  91. >20 belong&0x03FFFFFF 7 (BSD ARCNET
  92. >20 belong&0x03FFFFFF 8 (SLIP
  93. >20 belong&0x03FFFFFF 9 (PPP
  94. >20 belong&0x03FFFFFF 10 (FDDI
  95. >20 belong&0x03FFFFFF 11 (RFC 1483 ATM
  96. >20 belong&0x03FFFFFF 12 (Raw IP
  97. >20 belong&0x03FFFFFF 13 (BSD/OS SLIP
  98. >20 belong&0x03FFFFFF 14 (BSD/OS PPP
  99. >20 belong&0x03FFFFFF 19 (Linux ATM Classical IP
  100. >20 belong&0x03FFFFFF 50 (PPP or Cisco HDLC
  101. >20 belong&0x03FFFFFF 51 (PPP-over-Ethernet
  102. >20 belong&0x03FFFFFF 99 (Symantec Enterprise Firewall
  103. >20 belong&0x03FFFFFF 100 (RFC 1483 ATM
  104. >20 belong&0x03FFFFFF 101 (Raw IP
  105. >20 belong&0x03FFFFFF 102 (BSD/OS SLIP
  106. >20 belong&0x03FFFFFF 103 (BSD/OS PPP
  107. >20 belong&0x03FFFFFF 104 (BSD/OS Cisco HDLC
  108. >20 belong&0x03FFFFFF 105 (802.11
  109. >20 belong&0x03FFFFFF 106 (Linux Classical IP over ATM
  110. >20 belong&0x03FFFFFF 107 (Frame Relay
  111. >20 belong&0x03FFFFFF 108 (OpenBSD loopback
  112. >20 belong&0x03FFFFFF 109 (OpenBSD IPsec encrypted
  113. >20 belong&0x03FFFFFF 112 (Cisco HDLC
  114. >20 belong&0x03FFFFFF 113 (Linux cooked v1
  115. >20 belong&0x03FFFFFF 114 (LocalTalk
  116. >20 belong&0x03FFFFFF 117 (OpenBSD PFLOG
  117. >20 belong&0x03FFFFFF 119 (802.11 with Prism header
  118. >20 belong&0x03FFFFFF 122 (RFC 2625 IP over Fibre Channel
  119. >20 belong&0x03FFFFFF 123 (SunATM
  120. >20 belong&0x03FFFFFF 127 (802.11 with radiotap header
  121. >20 belong&0x03FFFFFF 129 (Linux ARCNET
  122. >20 belong&0x03FFFFFF 130 (Juniper Multi-Link PPP
  123. >20 belong&0x03FFFFFF 131 (Juniper Multi-Link Frame Relay
  124. >20 belong&0x03FFFFFF 132 (Juniper Encryption Services PIC
  125. >20 belong&0x03FFFFFF 133 (Juniper GGSN PIC
  126. >20 belong&0x03FFFFFF 134 (Juniper FRF.16 Frame Relay
  127. >20 belong&0x03FFFFFF 135 (Juniper ATM2 PIC
  128. >20 belong&0x03FFFFFF 136 (Juniper Advanced Services PIC
  129. >20 belong&0x03FFFFFF 137 (Juniper ATM1 PIC
  130. >20 belong&0x03FFFFFF 138 (Apple IP over IEEE 1394
  131. >20 belong&0x03FFFFFF 139 (SS7 MTP2 with pseudo-header
  132. >20 belong&0x03FFFFFF 140 (SS7 MTP2
  133. >20 belong&0x03FFFFFF 141 (SS7 MTP3
  134. >20 belong&0x03FFFFFF 142 (SS7 SCCP
  135. >20 belong&0x03FFFFFF 143 (DOCSIS
  136. >20 belong&0x03FFFFFF 144 (Linux IrDA
  137. >20 belong&0x03FFFFFF 147 (Private use 0
  138. >20 belong&0x03FFFFFF 148 (Private use 1
  139. >20 belong&0x03FFFFFF 149 (Private use 2
  140. >20 belong&0x03FFFFFF 150 (Private use 3
  141. >20 belong&0x03FFFFFF 151 (Private use 4
  142. >20 belong&0x03FFFFFF 152 (Private use 5
  143. >20 belong&0x03FFFFFF 153 (Private use 6
  144. >20 belong&0x03FFFFFF 154 (Private use 7
  145. >20 belong&0x03FFFFFF 155 (Private use 8
  146. >20 belong&0x03FFFFFF 156 (Private use 9
  147. >20 belong&0x03FFFFFF 157 (Private use 10
  148. >20 belong&0x03FFFFFF 158 (Private use 11
  149. >20 belong&0x03FFFFFF 159 (Private use 12
  150. >20 belong&0x03FFFFFF 160 (Private use 13
  151. >20 belong&0x03FFFFFF 161 (Private use 14
  152. >20 belong&0x03FFFFFF 162 (Private use 15
  153. >20 belong&0x03FFFFFF 163 (802.11 with AVS header
  154. >20 belong&0x03FFFFFF 164 (Juniper Passive Monitor PIC
  155. >20 belong&0x03FFFFFF 165 (BACnet MS/TP
  156. >20 belong&0x03FFFFFF 166 (PPPD
  157. >20 belong&0x03FFFFFF 167 (Juniper PPPoE
  158. >20 belong&0x03FFFFFF 168 (Juniper PPPoE/ATM
  159. >20 belong&0x03FFFFFF 169 (GPRS LLC
  160. >20 belong&0x03FFFFFF 170 (GPF-T
  161. >20 belong&0x03FFFFFF 171 (GPF-F
  162. >20 belong&0x03FFFFFF 174 (Juniper PIC Peer
  163. >20 belong&0x03FFFFFF 175 (Ethernet with Endace ERF header
  164. >20 belong&0x03FFFFFF 176 (Packet-over-SONET with Endace ERF header
  165. >20 belong&0x03FFFFFF 177 (Linux LAPD
  166. >20 belong&0x03FFFFFF 178 (Juniper Ethernet
  167. >20 belong&0x03FFFFFF 179 (Juniper PPP
  168. >20 belong&0x03FFFFFF 180 (Juniper Frame Relay
  169. >20 belong&0x03FFFFFF 181 (Juniper C-HDLC
  170. >20 belong&0x03FFFFFF 182 (FRF.16 Frame Relay
  171. >20 belong&0x03FFFFFF 183 (Juniper Voice PIC
  172. >20 belong&0x03FFFFFF 184 (Arinc 429
  173. >20 belong&0x03FFFFFF 185 (Arinc 653 Interpartition Communication
  174. >20 belong&0x03FFFFFF 186 (USB with FreeBSD header
  175. >20 belong&0x03FFFFFF 187 (Bluetooth HCI H4
  176. >20 belong&0x03FFFFFF 188 (802.16 MAC Common Part Sublayer
  177. >20 belong&0x03FFFFFF 189 (Linux USB
  178. >20 belong&0x03FFFFFF 190 (Controller Area Network (CAN) v. 2.0B
  179. >20 belong&0x03FFFFFF 191 (802.15.4 with Linux padding
  180. >20 belong&0x03FFFFFF 192 (PPI
  181. >20 belong&0x03FFFFFF 193 (802.16 MAC Common Part Sublayer plus radiotap header
  182. >20 belong&0x03FFFFFF 194 (Juniper Integrated Service Module
  183. >20 belong&0x03FFFFFF 195 (802.15.4 with FCS
  184. >20 belong&0x03FFFFFF 196 (SITA
  185. >20 belong&0x03FFFFFF 197 (Endace ERF
  186. >20 belong&0x03FFFFFF 198 (Ethernet with u10 Networks pseudo-header
  187. >20 belong&0x03FFFFFF 199 (IPMB
  188. >20 belong&0x03FFFFFF 200 (Juniper Secure Tunnel
  189. >20 belong&0x03FFFFFF 201 (Bluetooth HCI H4 with pseudo-header
  190. >20 belong&0x03FFFFFF 202 (AX.25 with KISS header
  191. >20 belong&0x03FFFFFF 203 (LAPD
  192. >20 belong&0x03FFFFFF 204 (PPP with direction pseudo-header
  193. >20 belong&0x03FFFFFF 205 (Cisco HDLC with direction pseudo-header
  194. >20 belong&0x03FFFFFF 206 (Frame Relay with direction pseudo-header
  195. >20 belong&0x03FFFFFF 209 (Linux IPMB
  196. >20 belong&0x03FFFFFF 215 (802.15.4 with non-ASK PHY header
  197. >20 belong&0x03FFFFFF 216 (Linux evdev events
  198. >20 belong&0x03FFFFFF 219 (MPLS with label as link-layer header
  199. >20 belong&0x03FFFFFF 220 (Memory-mapped Linux USB
  200. >20 belong&0x03FFFFFF 221 (DECT
  201. >20 belong&0x03FFFFFF 222 (AOS Space Data Link protocol
  202. >20 belong&0x03FFFFFF 223 (Wireless HART
  203. >20 belong&0x03FFFFFF 224 (Fibre Channel FC-2
  204. >20 belong&0x03FFFFFF 225 (Fibre Channel FC-2 with frame delimiters
  205. >20 belong&0x03FFFFFF 226 (Solaris IPNET
  206. >20 belong&0x03FFFFFF 227 (SocketCAN
  207. >20 belong&0x03FFFFFF 228 (Raw IPv4
  208. >20 belong&0x03FFFFFF 229 (Raw IPv6
  209. >20 belong&0x03FFFFFF 230 (802.15.4 without FCS
  210. >20 belong&0x03FFFFFF 231 (D-Bus messages
  211. >20 belong&0x03FFFFFF 232 (Juniper Virtual Server
  212. >20 belong&0x03FFFFFF 233 (Juniper SRX E2E
  213. >20 belong&0x03FFFFFF 234 (Juniper Fibre Channel
  214. >20 belong&0x03FFFFFF 235 (DVB-CI
  215. >20 belong&0x03FFFFFF 236 (MUX27010
  216. >20 belong&0x03FFFFFF 237 (STANAG 5066 D_PDUs
  217. >20 belong&0x03FFFFFF 238 (Juniper ATM CEMIC
  218. >20 belong&0x03FFFFFF 239 (Linux netfilter log messages
  219. >20 belong&0x03FFFFFF 240 (Hilscher netAnalyzer
  220. >20 belong&0x03FFFFFF 241 (Hilscher netAnalyzer with delimiters
  221. >20 belong&0x03FFFFFF 242 (IP-over-Infiniband
  222. >20 belong&0x03FFFFFF 243 (MPEG-2 Transport Stream packets
  223. >20 belong&0x03FFFFFF 244 (ng4t ng40
  224. >20 belong&0x03FFFFFF 245 (NFC LLCP
  225. >20 belong&0x03FFFFFF 246 (Packet filter state syncing
  226. >20 belong&0x03FFFFFF 247 (InfiniBand
  227. >20 belong&0x03FFFFFF 248 (SCTP
  228. >20 belong&0x03FFFFFF 249 (USB with USBPcap header
  229. >20 belong&0x03FFFFFF 250 (Schweitzer Engineering Laboratories RTAC packets
  230. >20 belong&0x03FFFFFF 251 (Bluetooth Low Energy air interface
  231. >20 belong&0x03FFFFFF 252 (Wireshark Upper PDU export
  232. >20 belong&0x03FFFFFF 253 (Linux netlink
  233. >20 belong&0x03FFFFFF 254 (Bluetooth Linux Monitor
  234. >20 belong&0x03FFFFFF 255 (Bluetooth Basic Rate/Enhanced Data Rate baseband packets
  235. >20 belong&0x03FFFFFF 256 (Bluetooth Low Energy air interface with pseudo-header
  236. >20 belong&0x03FFFFFF 257 (PROFIBUS data link layer
  237. >20 belong&0x03FFFFFF 258 (Apple DLT_PKTAP
  238. >20 belong&0x03FFFFFF 259 (Ethernet with 802.3 Clause 65 EPON preamble
  239. >20 belong&0x03FFFFFF 260 (IPMI trace packets
  240. >20 belong&0x03FFFFFF 261 (Z-Wave RF profile R1 and R2 packets
  241. >20 belong&0x03FFFFFF 262 (Z-Wave RF profile R3 packets
  242. >20 belong&0x03FFFFFF 263 (WattStopper Digital Lighting Mngmt/Legrand Nitoo Open Proto
  243. >20 belong&0x03FFFFFF 264 (ISO 14443 messages
  244. >20 belong&0x03FFFFFF 265 (IEC 62106 Radio Data System groups
  245. >20 belong&0x03FFFFFF 266 (USB with Darwin header
  246. >20 belong&0x03FFFFFF 267 (OpenBSD DLT_OPENFLOW
  247. >20 belong&0x03FFFFFF 268 (IBM SDLC frames
  248. >20 belong&0x03FFFFFF 269 (TI LLN sniffer frames
  249. >20 belong&0x03FFFFFF 271 (Linux vsock
  250. >20 belong&0x03FFFFFF 272 (Nordic Semiconductor Bluetooth LE sniffer frames
  251. >20 belong&0x03FFFFFF 273 (Excentis XRA-31 DOCSIS 3.1 RF sniffer frames
  252. >20 belong&0x03FFFFFF 274 (802.3br mPackets
  253. >20 belong&0x03FFFFFF 275 (DisplayPort AUX channel monitoring data
  254. >20 belong&0x03FFFFFF 276 (Linux cooked v2
  255. >20 belong&0x03FFFFFF 278 (OpenVizsla USB
  256. >20 belong&0x03FFFFFF 279 (Elektrobit High Speed Capture and Replay (EBHSCR)
  257. >20 belong&0x03FFFFFF 281 (Broadcom tag
  258. >20 belong&0x03FFFFFF 282 (Broadcom tag (prepended)
  259. >20 belong&0x03FFFFFF 283 (802.15.4 with TAP
  260. >20 belong&0x03FFFFFF 284 (Marvell DSA
  261. >20 belong&0x03FFFFFF 285 (Marvell EDSA
  262. >20 belong&0x03FFFFFF 286 (ELEE lawful intercept
  263. >20 belong&0x03FFFFFF 287 (Z-Wave serial
  264. >20 belong&0x03FFFFFF 288 (USB 2.0
  265. >20 belong&0x03FFFFFF 289 (ATSC ALP
  266. >20 belong&0x03FFFFFF 290 (Event Tracing for Windows
  267. >20 belong&0x03FFFFFF 291 (Hilscher netANALYZER NG pseudo-footer
  268. >20 belong&0x03FFFFFF 292 (ZBOSS NCP protocol with pseudo-header
  269. >20 belong&0x03FFFFFF 293 (Low-Speed USB 2.0/1.1/1.0
  270. >20 belong&0x03FFFFFF 294 (Full-Speed USB 2.0/1.1/1.0
  271. >20 belong&0x03FFFFFF 295 (High-Speed USB 2.0
  272. # print default match
  273. >20 default x
  274. >>20 belong x (linktype#%u
  275. >16 belong x \b, capture length %u)
  276. # packets time stamps in seconds and microseconds.
  277. 0 ubelong 0xa1b2c3d4 pcap capture file, microseconds ts (big-endian)
  278. !:mime application/vnd.tcpdump.pcap
  279. >0 use pcap-be
  280. 0 ulelong 0xa1b2c3d4 pcap capture file, microsecond ts (little-endian)
  281. !:mime application/vnd.tcpdump.pcap
  282. >0 use \^pcap-be
  283. # packets time stamps in seconds and nanoseconds.
  284. 0 ubelong 0xa1b23c4d pcap capture file, nanosecond ts (big-endian)
  285. !:mime application/vnd.tcpdump.pcap
  286. >0 use pcap-be
  287. 0 ulelong 0xa1b23c4d pcap capture file, nanosecond ts (little-endian)
  288. !:mime application/vnd.tcpdump.pcap
  289. >0 use \^pcap-be
  290. #
  291. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  292. #
  293. 0 ubelong 0xa1b2cd34 pcap capture file, microsecond ts, extensions (big-endian)
  294. >0 use pcap-be
  295. 0 ulelong 0xa1b2cd34 pcap capture file, microsecond ts, extensions (little-endian)
  296. >0 use \^pcap-be
  297. #
  298. # "pcapng" capture files.
  299. # https://github.com/pcapng/pcapng
  300. # Pcapng files can contain multiple sections. Printing the endianness,
  301. # snaplen, or other information from the first SHB may be misleading.
  302. #
  303. 0 ubelong 0x0a0d0d0a
  304. >8 ubelong 0x1a2b3c4d pcapng capture file
  305. >>12 beshort x - version %d
  306. >>14 beshort x \b.%d
  307. 0 ulelong 0x0a0d0d0a
  308. >8 ulelong 0x1a2b3c4d pcapng capture file
  309. >>12 leshort x - version %d
  310. >>14 leshort x \b.%d
  311. #
  312. # AIX "iptrace" capture files.
  313. #
  314. 0 string iptrace\0401.0 AIX iptrace capture file
  315. 0 string iptrace\0402.0 AIX iptrace capture file
  316. #
  317. # Novell LANalyzer capture files.
  318. # URL: http://www.blacksheepnetworks.com/security/info/nw/lan/trace.txt
  319. # Reference: https://github.com/wireshark/wireshark/blob/master/wiretap/lanalyzer.c
  320. # Update: Joerg Jenderek
  321. #
  322. # regular trace header record (RT_HeaderRegular)
  323. 0 leshort 0x1001
  324. # GRR: line above is too generic because it matches Commodore Plus/4 BASIC V3.5
  325. # and VIC-20 BASIC V2 program
  326. # skip many Commodore Basic program (Microzodiac.prg Minefield.prg Vic-tac-toe.prg breakvic_joy.prg)
  327. # with invalid second record type 0 instead of "Trace receive channel name record"
  328. >(2.s+4) leshort =0x1006h
  329. >>0 use novell-lanalyzer
  330. # cyclic trace header record (RT_HeaderCyclic)
  331. 0 leshort 0x1007
  332. >0 use novell-lanalyzer
  333. 0 name novell-lanalyzer
  334. >0 leshort x Novell LANalyzer capture file
  335. # https://reposcope.com/mimetype/application/x-lanalyzer
  336. !:mime application/x-lanalyzer
  337. # maybe also TR2 .. TR9 TRA .. TRZ
  338. !:ext tr1
  339. # version like: 1.5
  340. >4 ubyte x \b, version %u
  341. # minor version; one byte identifying the trace file minor version number
  342. >5 ubyte x \b.%u
  343. # Trace header record type like: 1001~regular or 1007~cyclic
  344. >0 leshort !0x1001 \b, record type %4.4x
  345. # record_length[2] is the length of the data part of 1st reorcd (without "type" and "length" fields) like: 4Ch
  346. >2 leshort x \b, record length %#x
  347. # second record type like: 1006h~Trace receive channel name record
  348. >(2.s+4) leshort !0x1006h \b, 2nd record type %#4.4x
  349. >(2.s+6) leshort x \b, 2nd record length %#x
  350. # each channel name is a null-terminated, eight-byte ASCII string like: Channel1
  351. >(2.s+8) string x \b, names %.9s
  352. # 2nd channel name like: Channel2
  353. >(2.s+17) string x %.9s ...
  354. #
  355. # HP-UX "nettl" capture files.
  356. # URL: https://nixdoc.net/man-pages/HP-UX/man1m/nettl.1m.html
  357. # Reference: https://github.com/wireshark/wireshark/blob/master/wiretap/nettl.c
  358. # Update: Joerg Jenderek
  359. # Note: Wireshark fills "meta information header fields" with "dummy" values
  360. # nettl_magic_hpux9[12]; for HP-UX 9.x not tested
  361. 0 string \x00\x00\x00\x01\x00\x00\x00\x00\x00\x07\xD0\x00 HP/UX 9.x nettl capture file
  362. !:mime application/x-nettl
  363. !:ext trc0/trc1
  364. # nettl_magic_hpux10[12]; for HP-UX 10.x and 11.x
  365. 0 string \x54\x52\x00\x64\x00 HP/UX nettl capture file
  366. # https://reposcope.com/mimetype/application/x-nettl
  367. !:mime application/x-nettl
  368. # maybe also TRC000 TRC001 TRC002 ...
  369. !:ext trc0/trc1
  370. # file_name[56]; maybe also like /tmp/raw.tr.TRC000
  371. >12 string !/tmp/wireshark.TRC000
  372. >>12 string x "%-.56s"
  373. # tz[20]; like UTC
  374. >68 string !UTC \b, tz
  375. >>68 string x %-.20s
  376. # host_name[9];
  377. >88 string >\0 \b, host %-.9s
  378. # os_vers[9]; like B.11.11
  379. >97 string !B.11.11 \b, os
  380. >>97 string x %-.9s
  381. # os_v; like 55h
  382. >>106 ubyte x (%#x)
  383. # xxa[8]; like 0
  384. >107 ubequad !0 \b, xxa=%#16.16llx
  385. # model[11] like: 9000/800
  386. >115 string !9000/800 \b, model
  387. >>115 string x %-.11s
  388. # unknown; probably just padding to 128 bytes like: 0406h
  389. >126 ubeshort !0x0406h \b, at 126 %#4.4x
  390. #
  391. # RADCOM WAN/LAN Analyzer capture files.
  392. #
  393. 0 string \x42\xd2\x00\x34\x12\x66\x22\x88 RADCOM WAN/LAN Analyzer capture file
  394. #
  395. # NetStumbler log files. Not really packets, per se, but about as
  396. # close as you can get. These are log files from NetStumbler, a
  397. # Windows program, that scans for 802.11b networks.
  398. #
  399. 0 string NetS NetStumbler log file
  400. >8 lelong x \b, %d stations found
  401. #
  402. # *Peek tagged capture files.
  403. #
  404. 0 string \177ver EtherPeek/AiroPeek/OmniPeek capture file
  405. #
  406. # Visual Networks traffic capture files.
  407. #
  408. 0 string \x05VNF Visual Networks traffic capture file
  409. #
  410. # Network Instruments Observer capture files.
  411. #
  412. 0 string ObserverPktBuffe Network Instruments Observer capture file
  413. #
  414. # Files from Accellent Group's 5View products.
  415. #
  416. # URL: http://www.infovista.com
  417. # Reference: http://mark0.net/download/triddefs_xml.7z
  418. # defs/0/5vw.trid.xml
  419. # https://2.na.dl.wireshark.org/src/wireshark-3.6.2.tar.xz
  420. # wireshark-3.6.2/wiretap/5views.c
  421. # Update: Joerg Jenderek
  422. # Note: called "5View capture" by TrID and
  423. # "Wireshark capture file" on Windows or
  424. # "Packet Capture (Accellent/InfoVista 5view)" by shared MIME-info database
  425. # verified/falsified by `wireshark *.5vw`
  426. 0 string \xaa\xaa\xaa\xaa
  427. # skip misidentified boot/x86_64/loader/kroete.dat on Suse LEAP DVD
  428. # by check for valid record version
  429. >8 ulelong =0x00010000
  430. >>0 use 5view-le
  431. 0 name 5view-le
  432. # t_5VW_Info_Header.Signature = CST_5VW_INFO_HEADER_KEY = 0xAAAAAAAAU
  433. >0 ulelong x 5View capture file
  434. # https://reposcope.com/mimetype/application/x-5view
  435. !:mime application/x-5view
  436. !:ext 5vw
  437. # size of header in bytes (included signature and reserved fields); probably always 20h
  438. >4 ulelong !0x00000020 \b, header size %#x
  439. # version of header record; apparently always CST_5VW_INFO_RECORD_VERSION=0x00010000U
  440. >8 ulelong !0x00010000 \b, record version %#x
  441. # DataSize; total size of data without header like: 18h
  442. >12 ulelong x \b, record size %#x
  443. # filetype; type of the capture file like: 18001000h
  444. >16 ulelong x \b, file type %#8.8x
  445. # Reserved[3]; reserved for future use; apparently zero
  446. >20 quad !0 \b, Reserved %#llx
  447. # look for record header key CST_5VW_RECORDS_HEADER_KEY of structure t_5VW_TimeStamped_Header
  448. >0x20 search/0xB8/b \xEE\xEE\x33\x33 \b; record
  449. # HeaderSize; actual size of this header in bytes like: 32 24h
  450. >>&0 uleshort x size %#x
  451. # HeaderType; exact type of this header; probably always 0x4000
  452. >>&2 uleshort !0x4000 \b, header type %#x
  453. # RecType; type of record like: 80000000h
  454. >>&4 ulelong x \b, record type %#x
  455. # RecSubType; subtype of record like: 0
  456. >>&8 ulelong !0 \b, subtype %#x
  457. # RecSize; Size of one record like: 5Ch
  458. >>&12 ulelong x \b, RecSize %#x
  459. # RecNb; Number of records like: 1
  460. >>&16 ulelong >1 \b, %#x records
  461. # Timestamp Utc
  462. #>>&20 ulelong x \b, RAW TIME %#8.8x
  463. >>&20 date x \b, Time-stamp %s