1ef01931fSBen Gras#------------------------------------------------------------------------------ 2*0a6a1f1dSLionel Sambuc# $File: archive,v 1.88 2014/08/16 10:42:17 christos Exp $ 3ef01931fSBen Gras# archive: file(1) magic for archive formats (see also "msdos" for self- 4ef01931fSBen Gras# extracting compressed archives) 5ef01931fSBen Gras# 6ef01931fSBen Gras# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. 7ef01931fSBen Gras# pre-POSIX "tar" archives are handled in the C code. 8ef01931fSBen Gras 9ef01931fSBen Gras# POSIX tar archives 10ef01931fSBen Gras257 string ustar\0 POSIX tar archive 11ef01931fSBen Gras!:mime application/x-tar # encoding: posix 12ef01931fSBen Gras257 string ustar\040\040\0 GNU tar archive 13ef01931fSBen Gras!:mime application/x-tar # encoding: gnu 14ef01931fSBen Gras 1508ff44c4SLionel Sambuc# Incremental snapshot gnu-tar format from: 1608ff44c4SLionel Sambuc# http://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html 1708ff44c4SLionel Sambuc0 string GNU\ tar- GNU tar incremental snapshot data 1808ff44c4SLionel Sambuc>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s 1908ff44c4SLionel Sambuc 20ef01931fSBen Gras# cpio archives 21ef01931fSBen Gras# 22ef01931fSBen Gras# Yes, the top two "cpio archive" formats *are* supposed to just be "short". 23ef01931fSBen Gras# The idea is to indicate archives produced on machines with the same 24ef01931fSBen Gras# byte order as the machine running "file" with "cpio archive", and 25ef01931fSBen Gras# to indicate archives produced on machines with the opposite byte order 26ef01931fSBen Gras# from the machine running "file" with "byte-swapped cpio archive". 27ef01931fSBen Gras# 28ef01931fSBen Gras# The SVR4 "cpio(4)" hints that there are additional formats, but they 29ef01931fSBen Gras# are defined as "short"s; I think all the new formats are 30ef01931fSBen Gras# character-header formats and thus are strings, not numbers. 31ef01931fSBen Gras0 short 070707 cpio archive 32ef01931fSBen Gras!:mime application/x-cpio 33ef01931fSBen Gras0 short 0143561 byte-swapped cpio archive 34ef01931fSBen Gras!:mime application/x-cpio # encoding: swapped 35ef01931fSBen Gras0 string 070707 ASCII cpio archive (pre-SVR4 or odc) 36ef01931fSBen Gras0 string 070701 ASCII cpio archive (SVR4 with no CRC) 37ef01931fSBen Gras0 string 070702 ASCII cpio archive (SVR4 with CRC) 38ef01931fSBen Gras 3984d9c625SLionel Sambuc# 4084d9c625SLionel Sambuc# Various archive formats used by various versions of the "ar" 4184d9c625SLionel Sambuc# command. 4284d9c625SLionel Sambuc# 4384d9c625SLionel Sambuc 4484d9c625SLionel Sambuc# 4584d9c625SLionel Sambuc# Original UNIX archive formats. 4684d9c625SLionel Sambuc# They were written with binary values in host byte order, and 4784d9c625SLionel Sambuc# the magic number was a host "int", which might have been 16 bits 4884d9c625SLionel Sambuc# or 32 bits. We don't say "PDP-11" or "VAX", as there might have 4984d9c625SLionel Sambuc# been ports to little-endian 16-bit-int or 32-bit-int platforms 5084d9c625SLionel Sambuc# (x86?) using some of those formats; if none existed, feel free 5184d9c625SLionel Sambuc# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian 5284d9c625SLionel Sambuc# 32-bit. There might have been big-endian ports of that sort as 5384d9c625SLionel Sambuc# well. 5484d9c625SLionel Sambuc# 5584d9c625SLionel Sambuc0 leshort 0177555 very old 16-bit-int little-endian archive 5684d9c625SLionel Sambuc0 beshort 0177555 very old 16-bit-int big-endian archive 5784d9c625SLionel Sambuc0 lelong 0177555 very old 32-bit-int little-endian archive 5884d9c625SLionel Sambuc0 belong 0177555 very old 32-bit-int big-endian archive 5984d9c625SLionel Sambuc 6084d9c625SLionel Sambuc0 leshort 0177545 old 16-bit-int little-endian archive 6184d9c625SLionel Sambuc>2 string __.SYMDEF random library 6284d9c625SLionel Sambuc0 beshort 0177545 old 16-bit-int big-endian archive 6384d9c625SLionel Sambuc>2 string __.SYMDEF random library 6484d9c625SLionel Sambuc0 lelong 0177545 old 32-bit-int little-endian archive 6584d9c625SLionel Sambuc>4 string __.SYMDEF random library 6684d9c625SLionel Sambuc0 belong 0177545 old 32-bit-int big-endian archive 6784d9c625SLionel Sambuc>4 string __.SYMDEF random library 6884d9c625SLionel Sambuc 6984d9c625SLionel Sambuc# 7084d9c625SLionel Sambuc# From "pdp" (but why a 4-byte quantity?) 7184d9c625SLionel Sambuc# 7284d9c625SLionel Sambuc0 lelong 0x39bed PDP-11 old archive 7384d9c625SLionel Sambuc0 lelong 0x39bee PDP-11 4.0 archive 7484d9c625SLionel Sambuc 7584d9c625SLionel Sambuc# 7684d9c625SLionel Sambuc# XXX - what flavor of APL used this, and was it a variant of 7784d9c625SLionel Sambuc# some ar archive format? It's similar to, but not the same 7884d9c625SLionel Sambuc# as, the APL workspace magic numbers in pdp. 7984d9c625SLionel Sambuc# 8084d9c625SLionel Sambuc0 long 0100554 apl workspace 8184d9c625SLionel Sambuc 8284d9c625SLionel Sambuc# 8384d9c625SLionel Sambuc# System V Release 1 portable(?) archive format. 8484d9c625SLionel Sambuc# 8584d9c625SLionel Sambuc0 string =<ar> System V Release 1 ar archive 8684d9c625SLionel Sambuc!:mime application/x-archive 8784d9c625SLionel Sambuc 8884d9c625SLionel Sambuc# 8984d9c625SLionel Sambuc# Debian package; it's in the portable archive format, and needs to go 9084d9c625SLionel Sambuc# before the entry for regular portable archives, as it's recognized as 9184d9c625SLionel Sambuc# a portable archive whose first member has a name beginning with 9284d9c625SLionel Sambuc# "debian". 93ef01931fSBen Gras# 94ef01931fSBen Gras0 string =!<arch>\ndebian 95ef01931fSBen Gras>8 string debian-split part of multipart Debian package 96*0a6a1f1dSLionel Sambuc!:mime application/vnd.debian.binary-package 97ef01931fSBen Gras>8 string debian-binary Debian binary package 98*0a6a1f1dSLionel Sambuc!:mime application/vnd.debian.binary-package 99ef01931fSBen Gras>8 string !debian 100ef01931fSBen Gras>68 string >\0 (format %s) 101ef01931fSBen Gras# These next two lines do not work, because a bzip2 Debian archive 102ef01931fSBen Gras# still uses gzip for the control.tar (first in the archive). Only 103ef01931fSBen Gras# data.tar varies, and the location of its filename varies too. 104ef01931fSBen Gras# file/libmagic does not current have support for ascii-string based 105ef01931fSBen Gras# (offsets) as of 2005-09-15. 106ef01931fSBen Gras#>81 string bz2 \b, uses bzip2 compression 107ef01931fSBen Gras#>84 string gz \b, uses gzip compression 108ef01931fSBen Gras#>136 ledate x created: %s 109ef01931fSBen Gras 11084d9c625SLionel Sambuc# 11184d9c625SLionel Sambuc# MIPS archive; they're in the portable archive format, and need to go 11284d9c625SLionel Sambuc# before the entry for regular portable archives, as it's recognized as 11384d9c625SLionel Sambuc# a portable archive whose first member has a name beginning with 11484d9c625SLionel Sambuc# "__________E". 115ef01931fSBen Gras# 116ef01931fSBen Gras0 string =!<arch>\n__________E MIPS archive 11784d9c625SLionel Sambuc!:mime application/x-archive 118ef01931fSBen Gras>20 string U with MIPS Ucode members 119ef01931fSBen Gras>21 string L with MIPSEL members 120ef01931fSBen Gras>21 string B with MIPSEB members 121ef01931fSBen Gras>19 string L and an EL hash table 122ef01931fSBen Gras>19 string B and an EB hash table 123ef01931fSBen Gras>22 string X -- out of date 124ef01931fSBen Gras 125ef01931fSBen Gras0 search/1 -h- Software Tools format archive text 126ef01931fSBen Gras 127ef01931fSBen Gras# 12884d9c625SLionel Sambuc# BSD/SVR2-and-later portable archive formats. 129ef01931fSBen Gras# 130ef01931fSBen Gras0 string =!<arch> current ar archive 131ef01931fSBen Gras!:mime application/x-archive 132ef01931fSBen Gras>8 string __.SYMDEF random library 13384d9c625SLionel Sambuc>68 string __.SYMDEF\ SORTED random library 13484d9c625SLionel Sambuc 135ef01931fSBen Gras# 13684d9c625SLionel Sambuc# "Thin" archive, as can be produced by GNU ar. 137ef01931fSBen Gras# 13884d9c625SLionel Sambuc0 string =!<thin>\n thin archive with 13984d9c625SLionel Sambuc>68 belong 0 no symbol entries 14084d9c625SLionel Sambuc>68 belong 1 %d symbol entry 14184d9c625SLionel Sambuc>68 belong >1 %d symbol entries 142ef01931fSBen Gras 143ef01931fSBen Gras# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) 144ef01931fSBen Gras# 145ef01931fSBen Gras# The first byte is the magic (0x1a), byte 2 is the compression type for 146ef01931fSBen Gras# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS 147ef01931fSBen Gras# filename of the first file (null terminated). Since some types collide 148ef01931fSBen Gras# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), 149ef01931fSBen Gras# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. 150ef01931fSBen Gras0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW 151ef01931fSBen Gras!:mime application/x-arc 152ef01931fSBen Gras0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed 153ef01931fSBen Gras!:mime application/x-arc 154ef01931fSBen Gras0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed 155ef01931fSBen Gras!:mime application/x-arc 156ef01931fSBen Gras0 lelong&0x8080ffff 0x0000031a ARC archive data, packed 157ef01931fSBen Gras!:mime application/x-arc 158ef01931fSBen Gras0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed 159ef01931fSBen Gras!:mime application/x-arc 160ef01931fSBen Gras0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched 161ef01931fSBen Gras!:mime application/x-arc 162ef01931fSBen Gras# [JW] stuff taken from idarc, obviously ARC successors: 163ef01931fSBen Gras0 lelong&0x8080ffff 0x00000a1a PAK archive data 164ef01931fSBen Gras!:mime application/x-arc 165ef01931fSBen Gras0 lelong&0x8080ffff 0x0000141a ARC+ archive data 166ef01931fSBen Gras!:mime application/x-arc 167ef01931fSBen Gras0 lelong&0x8080ffff 0x0000481a HYP archive data 168ef01931fSBen Gras!:mime application/x-arc 169ef01931fSBen Gras 170ef01931fSBen Gras# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) 171ef01931fSBen Gras# I can't create either SPARK or ArcFS archives so I have not tested this stuff 172ef01931fSBen Gras# [GRR: the original entries collide with ARC, above; replaced with combined 173ef01931fSBen Gras# version (not tested)] 174ef01931fSBen Gras#0 byte 0x1a RISC OS archive (spark format) 175ef01931fSBen Gras0 string \032archive RISC OS archive (ArcFS format) 176ef01931fSBen Gras0 string Archive\000 RISC OS archive (ArcFS format) 177ef01931fSBen Gras 178ef01931fSBen Gras# All these were taken from idarc, many could not be verified. Unfortunately, 179ef01931fSBen Gras# there were many low-quality sigs, i.e. easy to trigger false positives. 180ef01931fSBen Gras# Please notify me of any real-world fishy/ambiguous signatures and I'll try 181ef01931fSBen Gras# to get my hands on the actual archiver and see if I find something better. [JW] 182ef01931fSBen Gras# probably many can be enhanced by finding some 0-byte or control char near the start 183ef01931fSBen Gras 184ef01931fSBen Gras# idarc calls this Crush/Uncompressed... *shrug* 185ef01931fSBen Gras0 string CRUSH Crush archive data 186ef01931fSBen Gras# Squeeze It (.sqz) 187ef01931fSBen Gras0 string HLSQZ Squeeze It archive data 188ef01931fSBen Gras# SQWEZ 189ef01931fSBen Gras0 string SQWEZ SQWEZ archive data 190ef01931fSBen Gras# HPack (.hpk) 191ef01931fSBen Gras0 string HPAK HPack archive data 192ef01931fSBen Gras# HAP 193ef01931fSBen Gras0 string \x91\x33HF HAP archive data 194ef01931fSBen Gras# MD/MDCD 195ef01931fSBen Gras0 string MDmd MDCD archive data 196ef01931fSBen Gras# LIM 197ef01931fSBen Gras0 string LIM\x1a LIM archive data 198ef01931fSBen Gras# SAR 199ef01931fSBen Gras3 string LH5 SAR archive data 200ef01931fSBen Gras# BSArc/BS2 20184d9c625SLionel Sambuc0 string \212\3SB\020\0 BSArc/BS2 archive data 20284d9c625SLionel Sambuc# Bethesda Softworks Archive (Oblivion) 20384d9c625SLionel Sambuc0 string BSA\0 BSArc archive data 20484d9c625SLionel Sambuc>4 lelong x version %d 205ef01931fSBen Gras# MAR 206ef01931fSBen Gras2 string =-ah MAR archive data 207ef01931fSBen Gras# ACB 208835f6802SDirk Vogt#0 belong&0x00f800ff 0x00800000 ACB archive data 209ef01931fSBen Gras# CPZ 210ef01931fSBen Gras# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data 211ef01931fSBen Gras# JRC 212ef01931fSBen Gras0 string JRchive JRC archive data 213ef01931fSBen Gras# Quantum 214ef01931fSBen Gras0 string DS\0 Quantum archive data 215ef01931fSBen Gras# ReSOF 216ef01931fSBen Gras0 string PK\3\6 ReSOF archive data 217ef01931fSBen Gras# QuArk 218ef01931fSBen Gras0 string 7\4 QuArk archive data 219ef01931fSBen Gras# YAC 220ef01931fSBen Gras14 string YC YAC archive data 221ef01931fSBen Gras# X1 222ef01931fSBen Gras0 string X1 X1 archive data 223ef01931fSBen Gras0 string XhDr X1 archive data 224ef01931fSBen Gras# CDC Codec (.dqt) 225ef01931fSBen Gras0 belong&0xffffe000 0x76ff2000 CDC Codec archive data 226ef01931fSBen Gras# AMGC 227ef01931fSBen Gras0 string \xad6" AMGC archive data 228ef01931fSBen Gras# NuLIB 22984d9c625SLionel Sambuc0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data 230ef01931fSBen Gras# PakLeo 231ef01931fSBen Gras0 string LEOLZW PAKLeo archive data 232ef01931fSBen Gras# ChArc 233ef01931fSBen Gras0 string SChF ChArc archive data 234ef01931fSBen Gras# PSA 235ef01931fSBen Gras0 string PSA PSA archive data 236ef01931fSBen Gras# CrossePAC 237ef01931fSBen Gras0 string DSIGDCC CrossePAC archive data 238ef01931fSBen Gras# Freeze 239ef01931fSBen Gras0 string \x1f\x9f\x4a\x10\x0a Freeze archive data 240ef01931fSBen Gras# KBoom 24184d9c625SLionel Sambuc0 string \xc2\xa8MP\xc2\xa8 KBoom archive data 242ef01931fSBen Gras# NSQ, must go after CDC Codec 243ef01931fSBen Gras0 string \x76\xff NSQ archive data 244ef01931fSBen Gras# DPA 245ef01931fSBen Gras0 string Dirk\ Paehl DPA archive data 246ef01931fSBen Gras# BA 247ef01931fSBen Gras# TODO: idarc says "bytes 0-2 == bytes 3-5" 248ef01931fSBen Gras# TTComp 249ef01931fSBen Gras0 string \0\6 TTComp archive data 250ef01931fSBen Gras# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? 251ef01931fSBen Gras0 string ESP ESP archive data 252ef01931fSBen Gras# ZPack 253ef01931fSBen Gras0 string \1ZPK\1 ZPack archive data 254ef01931fSBen Gras# Sky 255ef01931fSBen Gras0 string \xbc\x40 Sky archive data 256ef01931fSBen Gras# UFA 257ef01931fSBen Gras0 string UFA UFA archive data 258ef01931fSBen Gras# Dry 259ef01931fSBen Gras0 string =-H2O DRY archive data 260ef01931fSBen Gras# FoxSQZ 261ef01931fSBen Gras0 string FOXSQZ FoxSQZ archive data 262ef01931fSBen Gras# AR7 263ef01931fSBen Gras0 string ,AR7 AR7 archive data 264ef01931fSBen Gras# PPMZ 265ef01931fSBen Gras0 string PPMZ PPMZ archive data 266ef01931fSBen Gras# MS Compress 267ef01931fSBen Gras4 string \x88\xf0\x27 MS Compress archive data 268ef01931fSBen Gras# updated by Joerg Jenderek 269ef01931fSBen Gras>9 string \0 270ef01931fSBen Gras>>0 string KWAJ 271ef01931fSBen Gras>>>7 string \321\003 MS Compress archive data 272*0a6a1f1dSLionel Sambuc>>>>14 ulong >0 \b, original size: %d bytes 273ef01931fSBen Gras>>>>18 ubyte >0x65 274ef01931fSBen Gras>>>>>18 string x \b, was %.8s 275ef01931fSBen Gras>>>>>(10.b-4) string x \b.%.3s 276ef01931fSBen Gras# MP3 (archiver, not lossy audio compression) 277ef01931fSBen Gras0 string MP3\x1a MP3-Archiver archive data 278ef01931fSBen Gras# ZET 27984d9c625SLionel Sambuc0 string OZ\xc3\x9d ZET archive data 280ef01931fSBen Gras# TSComp 281ef01931fSBen Gras0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data 282ef01931fSBen Gras# ARQ 283ef01931fSBen Gras0 string gW\4\1 ARQ archive data 284ef01931fSBen Gras# Squash 285ef01931fSBen Gras3 string OctSqu Squash archive data 286ef01931fSBen Gras# Terse 287ef01931fSBen Gras0 string \5\1\1\0 Terse archive data 288ef01931fSBen Gras# PUCrunch 289ef01931fSBen Gras0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data 290ef01931fSBen Gras# UHarc 291ef01931fSBen Gras0 string UHA UHarc archive data 292ef01931fSBen Gras# ABComp 293ef01931fSBen Gras0 string \2AB ABComp archive data 294ef01931fSBen Gras0 string \3AB2 ABComp archive data 295ef01931fSBen Gras# CMP 296ef01931fSBen Gras0 string CO\0 CMP archive data 297ef01931fSBen Gras# Splint 298ef01931fSBen Gras0 string \x93\xb9\x06 Splint archive data 299ef01931fSBen Gras# InstallShield 300ef01931fSBen Gras0 string \x13\x5d\x65\x8c InstallShield Z archive Data 301ef01931fSBen Gras# Gather 302ef01931fSBen Gras1 string GTH Gather archive data 303ef01931fSBen Gras# BOA 304ef01931fSBen Gras0 string BOA BOA archive data 305ef01931fSBen Gras# RAX 306ef01931fSBen Gras0 string ULEB\xa RAX archive data 307ef01931fSBen Gras# Xtreme 308ef01931fSBen Gras0 string ULEB\0 Xtreme archive data 309ef01931fSBen Gras# Pack Magic 31084d9c625SLionel Sambuc0 string @\xc3\xa2\1\0 Pack Magic archive data 311ef01931fSBen Gras# BTS 312ef01931fSBen Gras0 belong&0xfeffffff 0x1a034465 BTS archive data 313ef01931fSBen Gras# ELI 5750 314ef01931fSBen Gras0 string Ora\ ELI 5750 archive data 315ef01931fSBen Gras# QFC 316ef01931fSBen Gras0 string \x1aFC\x1a QFC archive data 317ef01931fSBen Gras0 string \x1aQF\x1a QFC archive data 318ef01931fSBen Gras# PRO-PACK 319ef01931fSBen Gras0 string RNC PRO-PACK archive data 320ef01931fSBen Gras# 777 321ef01931fSBen Gras0 string 777 777 archive data 322ef01931fSBen Gras# LZS221 323ef01931fSBen Gras0 string sTaC LZS221 archive data 324ef01931fSBen Gras# HPA 325ef01931fSBen Gras0 string HPA HPA archive data 326ef01931fSBen Gras# Arhangel 327ef01931fSBen Gras0 string LG Arhangel archive data 328ef01931fSBen Gras# EXP1, uses bzip2 329ef01931fSBen Gras0 string 0123456789012345BZh EXP1 archive data 330ef01931fSBen Gras# IMP 331ef01931fSBen Gras0 string IMP\xa IMP archive data 332ef01931fSBen Gras# NRV 333ef01931fSBen Gras0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data 334ef01931fSBen Gras# Squish 335ef01931fSBen Gras0 string \x73\xb2\x90\xf4 Squish archive data 336ef01931fSBen Gras# Par 337ef01931fSBen Gras0 string PHILIPP Par archive data 338ef01931fSBen Gras0 string PAR Par archive data 339ef01931fSBen Gras# HIT 340ef01931fSBen Gras0 string UB HIT archive data 341ef01931fSBen Gras# SBX 342ef01931fSBen Gras0 belong&0xfffff000 0x53423000 SBX archive data 343ef01931fSBen Gras# NaShrink 344ef01931fSBen Gras0 string NSK NaShrink archive data 345ef01931fSBen Gras# SAPCAR 346ef01931fSBen Gras0 string #\ CAR\ archive\ header SAPCAR archive data 347ef01931fSBen Gras0 string CAR\ 2.00RG SAPCAR archive data 348ef01931fSBen Gras# Disintegrator 349ef01931fSBen Gras0 string DST Disintegrator archive data 350ef01931fSBen Gras# ASD 351ef01931fSBen Gras0 string ASD ASD archive data 352ef01931fSBen Gras# InstallShield CAB 353ef01931fSBen Gras0 string ISc( InstallShield CAB 354ef01931fSBen Gras# TOP4 355ef01931fSBen Gras0 string T4\x1a TOP4 archive data 356ef01931fSBen Gras# BatComp left out: sig looks like COM executable 357ef01931fSBen Gras# so TODO: get real 4dos batcomp file and find sig 358ef01931fSBen Gras# BlakHole 359ef01931fSBen Gras0 string BH\5\7 BlakHole archive data 360ef01931fSBen Gras# BIX 361ef01931fSBen Gras0 string BIX0 BIX archive data 362ef01931fSBen Gras# ChiefLZA 363ef01931fSBen Gras0 string ChfLZ ChiefLZA archive data 364ef01931fSBen Gras# Blink 365ef01931fSBen Gras0 string Blink Blink archive data 366ef01931fSBen Gras# Logitech Compress 367ef01931fSBen Gras0 string \xda\xfa Logitech Compress archive data 368ef01931fSBen Gras# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) 369ef01931fSBen Gras1 string (C)\ STEPANYUK ARS-Sfx archive data 370ef01931fSBen Gras# AKT/AKT32 371ef01931fSBen Gras0 string AKT32 AKT32 archive data 372ef01931fSBen Gras0 string AKT AKT archive data 373ef01931fSBen Gras# NPack 374ef01931fSBen Gras0 string MSTSM NPack archive data 375ef01931fSBen Gras# PFT 376ef01931fSBen Gras0 string \0\x50\0\x14 PFT archive data 377ef01931fSBen Gras# SemOne 378ef01931fSBen Gras0 string SEM SemOne archive data 379ef01931fSBen Gras# PPMD 380ef01931fSBen Gras0 string \x8f\xaf\xac\x84 PPMD archive data 381ef01931fSBen Gras# FIZ 382ef01931fSBen Gras0 string FIZ FIZ archive data 383ef01931fSBen Gras# MSXiE 384ef01931fSBen Gras0 belong&0xfffff0f0 0x4d530000 MSXiE archive data 385ef01931fSBen Gras# DeepFreezer 386ef01931fSBen Gras0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data 387ef01931fSBen Gras# DC 388ef01931fSBen Gras0 string =<DC- DC archive data 389ef01931fSBen Gras# TPac 390ef01931fSBen Gras0 string \4TPAC\3 TPac archive data 391ef01931fSBen Gras# Ai 392ef01931fSBen Gras0 string Ai\1\1\0 Ai archive data 393ef01931fSBen Gras0 string Ai\1\0\0 Ai archive data 394ef01931fSBen Gras# Ai32 395ef01931fSBen Gras0 string Ai\2\0 Ai32 archive data 396ef01931fSBen Gras0 string Ai\2\1 Ai32 archive data 397ef01931fSBen Gras# SBC 398ef01931fSBen Gras0 string SBC SBC archive data 399ef01931fSBen Gras# Ybs 400ef01931fSBen Gras0 string YBS Ybs archive data 401ef01931fSBen Gras# DitPack 402ef01931fSBen Gras0 string \x9e\0\0 DitPack archive data 403ef01931fSBen Gras# DMS 404ef01931fSBen Gras0 string DMS! DMS archive data 405ef01931fSBen Gras# EPC 406ef01931fSBen Gras0 string \x8f\xaf\xac\x8c EPC archive data 407ef01931fSBen Gras# VSARC 408ef01931fSBen Gras0 string VS\x1a VSARC archive data 409ef01931fSBen Gras# PDZ 410ef01931fSBen Gras0 string PDZ PDZ archive data 411ef01931fSBen Gras# ReDuq 412ef01931fSBen Gras0 string rdqx ReDuq archive data 413ef01931fSBen Gras# GCA 414ef01931fSBen Gras0 string GCAX GCA archive data 415ef01931fSBen Gras# PPMN 416ef01931fSBen Gras0 string pN PPMN archive data 417ef01931fSBen Gras# WinImage 418ef01931fSBen Gras3 string WINIMAGE WinImage archive data 419ef01931fSBen Gras# Compressia 420ef01931fSBen Gras0 string CMP0CMP Compressia archive data 421ef01931fSBen Gras# UHBC 422ef01931fSBen Gras0 string UHB UHBC archive data 423ef01931fSBen Gras# WinHKI 424ef01931fSBen Gras0 string \x61\x5C\x04\x05 WinHKI archive data 425ef01931fSBen Gras# WWPack data file 426ef01931fSBen Gras0 string WWP WWPack archive data 427ef01931fSBen Gras# BSN (BSA, PTS-DOS) 428ef01931fSBen Gras0 string \xffBSG BSN archive data 429ef01931fSBen Gras1 string \xffBSG BSN archive data 430ef01931fSBen Gras3 string \xffBSG BSN archive data 431ef01931fSBen Gras1 string \0\xae\2 BSN archive data 432ef01931fSBen Gras1 string \0\xae\3 BSN archive data 433ef01931fSBen Gras1 string \0\xae\7 BSN archive data 434ef01931fSBen Gras# AIN 435ef01931fSBen Gras0 string \x33\x18 AIN archive data 436ef01931fSBen Gras0 string \x33\x17 AIN archive data 437ef01931fSBen Gras# XPA32 438ef01931fSBen Gras0 string xpa\0\1 XPA32 archive data 439ef01931fSBen Gras# SZip (TODO: doesn't catch all versions) 440ef01931fSBen Gras0 string SZ\x0a\4 SZip archive data 441ef01931fSBen Gras# XPack DiskImage 442ef01931fSBen Gras0 string jm XPack DiskImage archive data 443ef01931fSBen Gras# XPack Data 444ef01931fSBen Gras0 string xpa XPack archive data 445ef01931fSBen Gras# XPack Single Data 44684d9c625SLionel Sambuc0 string \xc3\x8d\ jm XPack single archive data 447ef01931fSBen Gras 448ef01931fSBen Gras# TODO: missing due to unknown magic/magic at end of file: 449ef01931fSBen Gras#DWC 450ef01931fSBen Gras#ARG 451ef01931fSBen Gras#ZAR 452ef01931fSBen Gras#PC/3270 453ef01931fSBen Gras#InstallIt 454ef01931fSBen Gras#RKive 455ef01931fSBen Gras#RK 456ef01931fSBen Gras#XPack Diskimage 457ef01931fSBen Gras 458ef01931fSBen Gras# These were inspired by idarc, but actually verified 459ef01931fSBen Gras# Dzip archiver (.dz) 460ef01931fSBen Gras0 string DZ Dzip archive data 461ef01931fSBen Gras>2 byte x \b, version %i 462ef01931fSBen Gras>3 byte x \b.%i 463ef01931fSBen Gras# ZZip archiver (.zz) 464ef01931fSBen Gras0 string ZZ\ \0\0 ZZip archive data 465ef01931fSBen Gras0 string ZZ0 ZZip archive data 466ef01931fSBen Gras# PAQ archiver (.paq) 467ef01931fSBen Gras0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data 468ef01931fSBen Gras0 string PAQ PAQ archive data 469ef01931fSBen Gras>3 byte&0xf0 0x30 470ef01931fSBen Gras>>3 byte x (v%c) 471ef01931fSBen Gras# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) 472ef01931fSBen Gras0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data 473ef01931fSBen Gras0 string JARCS JAR (ARJ Software, Inc.) archive data 474ef01931fSBen Gras 475ef01931fSBen Gras# ARJ archiver (jason@jarthur.Claremont.EDU) 476ef01931fSBen Gras0 leshort 0xea60 ARJ archive data 477ef01931fSBen Gras!:mime application/x-arj 478ef01931fSBen Gras>5 byte x \b, v%d, 479ef01931fSBen Gras>8 byte &0x04 multi-volume, 480ef01931fSBen Gras>8 byte &0x10 slash-switched, 481ef01931fSBen Gras>8 byte &0x20 backup, 482ef01931fSBen Gras>34 string x original name: %s, 483ef01931fSBen Gras>7 byte 0 os: MS-DOS 484ef01931fSBen Gras>7 byte 1 os: PRIMOS 485ef01931fSBen Gras>7 byte 2 os: Unix 486ef01931fSBen Gras>7 byte 3 os: Amiga 487ef01931fSBen Gras>7 byte 4 os: Macintosh 488ef01931fSBen Gras>7 byte 5 os: OS/2 489ef01931fSBen Gras>7 byte 6 os: Apple ][ GS 490ef01931fSBen Gras>7 byte 7 os: Atari ST 491ef01931fSBen Gras>7 byte 8 os: NeXT 492ef01931fSBen Gras>7 byte 9 os: VAX/VMS 493ef01931fSBen Gras>3 byte >0 %d] 494ef01931fSBen Gras# [JW] idarc says this is also possible 495ef01931fSBen Gras2 leshort 0xea60 ARJ archive data 496ef01931fSBen Gras 497ef01931fSBen Gras# HA archiver (Greg Roelofs, newt@uchicago.edu) 498ef01931fSBen Gras# This is a really bad format. A file containing HAWAII will match this... 499ef01931fSBen Gras#0 string HA HA archive data, 500ef01931fSBen Gras#>2 leshort =1 1 file, 501*0a6a1f1dSLionel Sambuc#>2 leshort >1 %hu files, 502ef01931fSBen Gras#>4 byte&0x0f =0 first is type CPY 503ef01931fSBen Gras#>4 byte&0x0f =1 first is type ASC 504ef01931fSBen Gras#>4 byte&0x0f =2 first is type HSC 505ef01931fSBen Gras#>4 byte&0x0f =0x0e first is type DIR 506ef01931fSBen Gras#>4 byte&0x0f =0x0f first is type SPECIAL 507ef01931fSBen Gras# suggestion: at least identify small archives (<1024 files) 508ef01931fSBen Gras0 belong&0xffff00fc 0x48410000 HA archive data 509ef01931fSBen Gras>2 leshort =1 1 file, 510ef01931fSBen Gras>2 leshort >1 %u files, 511ef01931fSBen Gras>4 byte&0x0f =0 first is type CPY 512ef01931fSBen Gras>4 byte&0x0f =1 first is type ASC 513ef01931fSBen Gras>4 byte&0x0f =2 first is type HSC 514ef01931fSBen Gras>4 byte&0x0f =0x0e first is type DIR 515ef01931fSBen Gras>4 byte&0x0f =0x0f first is type SPECIAL 516ef01931fSBen Gras 517ef01931fSBen Gras# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) 518ef01931fSBen Gras0 string HPAK HPACK archive data 519ef01931fSBen Gras 520ef01931fSBen Gras# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net 521ef01931fSBen Gras0 string \351,\001JAM\ JAM archive, 522ef01931fSBen Gras>7 string >\0 version %.4s 523ef01931fSBen Gras>0x26 byte =0x27 - 524ef01931fSBen Gras>>0x2b string >\0 label %.11s, 525ef01931fSBen Gras>>0x27 lelong x serial %08x, 526ef01931fSBen Gras>>0x36 string >\0 fstype %.8s 527ef01931fSBen Gras 528ef01931fSBen Gras# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) 529ef01931fSBen Gras2 string -lh0- LHarc 1.x/ARX archive data [lh0] 530ef01931fSBen Gras!:mime application/x-lharc 531ef01931fSBen Gras2 string -lh1- LHarc 1.x/ARX archive data [lh1] 532ef01931fSBen Gras!:mime application/x-lharc 533ef01931fSBen Gras2 string -lz4- LHarc 1.x archive data [lz4] 534ef01931fSBen Gras!:mime application/x-lharc 535ef01931fSBen Gras2 string -lz5- LHarc 1.x archive data [lz5] 536ef01931fSBen Gras!:mime application/x-lharc 537ef01931fSBen Gras# [never seen any but the last; -lh4- reported in comp.compression:] 538ef01931fSBen Gras2 string -lzs- LHa/LZS archive data [lzs] 539ef01931fSBen Gras!:mime application/x-lha 540ef01931fSBen Gras2 string -lh\40- LHa 2.x? archive data [lh ] 541ef01931fSBen Gras!:mime application/x-lha 542ef01931fSBen Gras2 string -lhd- LHa 2.x? archive data [lhd] 543ef01931fSBen Gras!:mime application/x-lha 544ef01931fSBen Gras2 string -lh2- LHa 2.x? archive data [lh2] 545ef01931fSBen Gras!:mime application/x-lha 546ef01931fSBen Gras2 string -lh3- LHa 2.x? archive data [lh3] 547ef01931fSBen Gras!:mime application/x-lha 548ef01931fSBen Gras2 string -lh4- LHa (2.x) archive data [lh4] 549ef01931fSBen Gras!:mime application/x-lha 550ef01931fSBen Gras2 string -lh5- LHa (2.x) archive data [lh5] 551ef01931fSBen Gras!:mime application/x-lha 552ef01931fSBen Gras2 string -lh6- LHa (2.x) archive data [lh6] 553ef01931fSBen Gras!:mime application/x-lha 554ef01931fSBen Gras2 string -lh7- LHa (2.x)/LHark archive data [lh7] 555ef01931fSBen Gras!:mime application/x-lha 556ef01931fSBen Gras>20 byte x - header level %d 557ef01931fSBen Gras# taken from idarc [JW] 558ef01931fSBen Gras2 string -lZ PUT archive data 559ef01931fSBen Gras2 string -lz LZS archive data 560ef01931fSBen Gras2 string -sw1- Swag archive data 561ef01931fSBen Gras 562ef01931fSBen Gras# RAR archiver (Greg Roelofs, newt@uchicago.edu) 563ef01931fSBen Gras0 string Rar! RAR archive data, 564ef01931fSBen Gras!:mime application/x-rar 565ef01931fSBen Gras>44 byte x v%0x, 566ef01931fSBen Gras>10 byte >0 flags: 567ef01931fSBen Gras>>10 byte &0x01 Archive volume, 568ef01931fSBen Gras>>10 byte &0x02 Commented, 569ef01931fSBen Gras>>10 byte &0x04 Locked, 570ef01931fSBen Gras>>10 byte &0x08 Solid, 571ef01931fSBen Gras>>10 byte &0x20 Authenticated, 572ef01931fSBen Gras>35 byte 0 os: MS-DOS 573ef01931fSBen Gras>35 byte 1 os: OS/2 574ef01931fSBen Gras>35 byte 2 os: Win32 575ef01931fSBen Gras>35 byte 3 os: Unix 576ef01931fSBen Gras# some old version? idarc says: 577ef01931fSBen Gras0 string RE\x7e\x5e RAR archive data 578ef01931fSBen Gras 579ef01931fSBen Gras# SQUISH archiver (Greg Roelofs, newt@uchicago.edu) 580ef01931fSBen Gras0 string SQSH squished archive data (Acorn RISCOS) 581ef01931fSBen Gras 582ef01931fSBen Gras# UC2 archiver (Greg Roelofs, newt@uchicago.edu) 583ef01931fSBen Gras# [JW] see exe section for self-extracting version 584ef01931fSBen Gras0 string UC2\x1a UC2 archive data 585ef01931fSBen Gras 586835f6802SDirk Vogt# PKZIP multi-volume archive 587835f6802SDirk Vogt0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract 588ef01931fSBen Gras!:mime application/zip 589ef01931fSBen Gras 590835f6802SDirk Vogt# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 59184d9c625SLionel Sambuc0 string PK\005\006 Zip archive data (empty) 592835f6802SDirk Vogt0 string PK\003\004 593835f6802SDirk Vogt 594835f6802SDirk Vogt# Specialised zip formats which start with a member named 'mimetype' 595835f6802SDirk Vogt# (stored uncompressed, with no 'extra field') containing the file's MIME type. 596835f6802SDirk Vogt# Check for have 8-byte name, 0-byte extra field, name "mimetype", and 597835f6802SDirk Vogt# contents starting with "application/": 598835f6802SDirk Vogt>26 string \x8\0\0\0mimetypeapplication/ 599835f6802SDirk Vogt 600835f6802SDirk Vogt# KOffice / OpenOffice & StarOffice / OpenDocument formats 601ef01931fSBen Gras# From: Abel Cheung <abel@oaka.org> 602ef01931fSBen Gras 603ef01931fSBen Gras# KOffice (1.2 or above) formats 604835f6802SDirk Vogt# (mimetype contains "application/vnd.kde.<SUBTYPE>") 605835f6802SDirk Vogt>>50 string vnd.kde. KOffice (>=1.2) 606835f6802SDirk Vogt>>>58 string karbon Karbon document 607835f6802SDirk Vogt>>>58 string kchart KChart document 608835f6802SDirk Vogt>>>58 string kformula KFormula document 609835f6802SDirk Vogt>>>58 string kivio Kivio document 610835f6802SDirk Vogt>>>58 string kontour Kontour document 611835f6802SDirk Vogt>>>58 string kpresenter KPresenter document 612835f6802SDirk Vogt>>>58 string kspread KSpread document 613835f6802SDirk Vogt>>>58 string kword KWord document 614ef01931fSBen Gras 615ef01931fSBen Gras# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) 616835f6802SDirk Vogt# (mimetype contains "application/vnd.sun.xml.<SUBTYPE>") 617835f6802SDirk Vogt>>50 string vnd.sun.xml. OpenOffice.org 1.x 618835f6802SDirk Vogt>>>62 string writer Writer 619835f6802SDirk Vogt>>>>68 byte !0x2e document 620835f6802SDirk Vogt>>>>68 string .template template 621835f6802SDirk Vogt>>>>68 string .global global document 622835f6802SDirk Vogt>>>62 string calc Calc 623835f6802SDirk Vogt>>>>66 byte !0x2e spreadsheet 624835f6802SDirk Vogt>>>>66 string .template template 625835f6802SDirk Vogt>>>62 string draw Draw 626835f6802SDirk Vogt>>>>66 byte !0x2e document 627835f6802SDirk Vogt>>>>66 string .template template 628835f6802SDirk Vogt>>>62 string impress Impress 629835f6802SDirk Vogt>>>>69 byte !0x2e presentation 630835f6802SDirk Vogt>>>>69 string .template template 631835f6802SDirk Vogt>>>62 string math Math document 632835f6802SDirk Vogt>>>62 string base Database file 633ef01931fSBen Gras 634ef01931fSBen Gras# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) 635ef01931fSBen Gras# http://lists.oasis-open.org/archives/office/200505/msg00006.html 636835f6802SDirk Vogt# (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>") 637835f6802SDirk Vogt>>50 string vnd.oasis.opendocument. OpenDocument 638835f6802SDirk Vogt>>>73 string text 639835f6802SDirk Vogt>>>>77 byte !0x2d Text 640ef01931fSBen Gras!:mime application/vnd.oasis.opendocument.text 641835f6802SDirk Vogt>>>>77 string -template Text Template 642835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.text-template 643835f6802SDirk Vogt>>>>77 string -web HTML Document Template 644835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.text-web 645835f6802SDirk Vogt>>>>77 string -master Master Document 646835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.text-master 647835f6802SDirk Vogt>>>73 string graphics 648835f6802SDirk Vogt>>>>81 byte !0x2d Drawing 649835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.graphics 650835f6802SDirk Vogt>>>>81 string -template Template 651835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.graphics-template 652835f6802SDirk Vogt>>>73 string presentation 653835f6802SDirk Vogt>>>>85 byte !0x2d Presentation 654835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.presentation 655835f6802SDirk Vogt>>>>85 string -template Template 656835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.presentation-template 657835f6802SDirk Vogt>>>73 string spreadsheet 658835f6802SDirk Vogt>>>>84 byte !0x2d Spreadsheet 659835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.spreadsheet 660835f6802SDirk Vogt>>>>84 string -template Template 661835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.spreadsheet-template 662835f6802SDirk Vogt>>>73 string chart 663835f6802SDirk Vogt>>>>78 byte !0x2d Chart 664835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.chart 665835f6802SDirk Vogt>>>>78 string -template Template 666835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.chart-template 667835f6802SDirk Vogt>>>73 string formula 668835f6802SDirk Vogt>>>>80 byte !0x2d Formula 669835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.formula 670835f6802SDirk Vogt>>>>80 string -template Template 671835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.formula-template 672835f6802SDirk Vogt>>>73 string database Database 673835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.database 674835f6802SDirk Vogt>>>73 string image 675835f6802SDirk Vogt>>>>78 byte !0x2d Image 676835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.image 677835f6802SDirk Vogt>>>>78 string -template Template 678835f6802SDirk Vogt!:mime application/vnd.oasis.opendocument.image-template 679835f6802SDirk Vogt 680835f6802SDirk Vogt# EPUB (OEBPS) books using OCF (OEBPS Container Format) 681835f6802SDirk Vogt# http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. 68284d9c625SLionel Sambuc# From: Ralf Brown <ralf.brown@gmail.com> 683*0a6a1f1dSLionel Sambuc>>50 string epub+zip EPUB document 684835f6802SDirk Vogt!:mime application/epub+zip 685835f6802SDirk Vogt 686835f6802SDirk Vogt# Catch other ZIP-with-mimetype formats 687835f6802SDirk Vogt# In a ZIP file, the bytes immediately after a member's contents are 688835f6802SDirk Vogt# always "PK". The 2 regex rules here print the "mimetype" member's 689835f6802SDirk Vogt# contents up to the first 'P'. Luckily, most MIME types don't contain 690835f6802SDirk Vogt# any capital 'P's. This is a kludge. 691835f6802SDirk Vogt# (mimetype contains "application/<OTHER>") 692835f6802SDirk Vogt>>50 string !epub+zip 693835f6802SDirk Vogt>>>50 string !vnd.oasis.opendocument. 694835f6802SDirk Vogt>>>>50 string !vnd.sun.xml. 695835f6802SDirk Vogt>>>>>50 string !vnd.kde. 696835f6802SDirk Vogt>>>>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) 697835f6802SDirk Vogt!:mime application/zip 698835f6802SDirk Vogt# (mimetype contents other than "application/*") 699835f6802SDirk Vogt>26 string \x8\0\0\0mimetype 700835f6802SDirk Vogt>>38 string !application/ 701835f6802SDirk Vogt>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) 702835f6802SDirk Vogt!:mime application/zip 703835f6802SDirk Vogt 70484d9c625SLionel Sambuc# Java Jar files 705*0a6a1f1dSLionel Sambuc>(26.s+30) leshort 0xcafe Java archive data (JAR) 706*0a6a1f1dSLionel Sambuc!:mime application/java-archive 70784d9c625SLionel Sambuc 708835f6802SDirk Vogt# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 709835f6802SDirk Vogt# Next line excludes specialized formats: 71084d9c625SLionel Sambuc>(26.s+30) leshort !0xcafe 71184d9c625SLionel Sambuc>>26 string !\x8\0\0\0mimetype Zip archive data 712835f6802SDirk Vogt!:mime application/zip 71384d9c625SLionel Sambuc>>>4 byte 0x09 \b, at least v0.9 to extract 71484d9c625SLionel Sambuc>>>4 byte 0x0a \b, at least v1.0 to extract 71584d9c625SLionel Sambuc>>>4 byte 0x0b \b, at least v1.1 to extract 71684d9c625SLionel Sambuc>>>4 byte 0x14 \b, at least v2.0 to extract 71784d9c625SLionel Sambuc>>>4 byte 0x2d \b, at least v3.0 to extract 71884d9c625SLionel Sambuc>>>0x161 string WINZIP \b, WinZIP self-extracting 719835f6802SDirk Vogt 720835f6802SDirk Vogt# StarView Metafile 721835f6802SDirk Vogt# From Pierre Ducroquet <pinaraf@pinaraf.info> 722835f6802SDirk Vogt0 string VCLMTF StarView MetaFile 723835f6802SDirk Vogt>6 beshort x \b, version %d 724835f6802SDirk Vogt>8 belong x \b, size %d 725ef01931fSBen Gras 726ef01931fSBen Gras# Zoo archiver 727ef01931fSBen Gras20 lelong 0xfdc4a7dc Zoo archive data 728ef01931fSBen Gras!:mime application/x-zoo 729ef01931fSBen Gras>4 byte >48 \b, v%c. 730ef01931fSBen Gras>>6 byte >47 \b%c 731ef01931fSBen Gras>>>7 byte >47 \b%c 732ef01931fSBen Gras>32 byte >0 \b, modify: v%d 733ef01931fSBen Gras>>33 byte x \b.%d+ 734ef01931fSBen Gras>42 lelong 0xfdc4a7dc \b, 735ef01931fSBen Gras>>70 byte >0 extract: v%d 736ef01931fSBen Gras>>>71 byte x \b.%d+ 737ef01931fSBen Gras 738ef01931fSBen Gras# Shell archives 739ef01931fSBen Gras10 string #\ This\ is\ a\ shell\ archive shell archive text 740ef01931fSBen Gras!:mime application/octet-stream 741ef01931fSBen Gras 742ef01931fSBen Gras# 743ef01931fSBen Gras# LBR. NB: May conflict with the questionable 744ef01931fSBen Gras# "binary Computer Graphics Metafile" format. 745ef01931fSBen Gras# 746ef01931fSBen Gras0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data 747ef01931fSBen Gras# 748ef01931fSBen Gras# PMA (CP/M derivative of LHA) 749ef01931fSBen Gras# 750ef01931fSBen Gras2 string -pm0- PMarc archive data [pm0] 751ef01931fSBen Gras2 string -pm1- PMarc archive data [pm1] 752ef01931fSBen Gras2 string -pm2- PMarc archive data [pm2] 753ef01931fSBen Gras2 string -pms- PMarc SFX archive (CP/M, DOS) 754ef01931fSBen Gras5 string -pc1- PopCom compressed executable (CP/M) 755ef01931fSBen Gras 756ef01931fSBen Gras# From Rafael Laboissiere <rafael@laboissiere.net> 757ef01931fSBen Gras# The Project Revision Control System (see 758ef01931fSBen Gras# http://prcs.sourceforge.net) generates a packaged project 759ef01931fSBen Gras# file which is recognized by the following entry: 760ef01931fSBen Gras0 leshort 0xeb81 PRCS packaged project 761ef01931fSBen Gras 762ef01931fSBen Gras# Microsoft cabinets 763ef01931fSBen Gras# by David Necas (Yeti) <yeti@physics.muni.cz> 764ef01931fSBen Gras#0 string MSCF\0\0\0\0 Microsoft cabinet file data, 765ef01931fSBen Gras#>25 byte x v%d 766ef01931fSBen Gras#>24 byte x \b.%d 767ef01931fSBen Gras# MPi: All CABs have version 1.3, so this is pointless. 768ef01931fSBen Gras# Better magic in debian-additions. 769ef01931fSBen Gras 770ef01931fSBen Gras# GTKtalog catalogs 771ef01931fSBen Gras# by David Necas (Yeti) <yeti@physics.muni.cz> 772ef01931fSBen Gras4 string gtktalog\ GTKtalog catalog data, 773ef01931fSBen Gras>13 string 3 version 3 774ef01931fSBen Gras>>14 beshort 0x677a (gzipped) 775ef01931fSBen Gras>>14 beshort !0x677a (not gzipped) 776ef01931fSBen Gras>13 string >3 version %s 777ef01931fSBen Gras 778ef01931fSBen Gras############################################################################ 779ef01931fSBen Gras# Parity archive reconstruction file, the 'par' file format now used on Usenet. 780ef01931fSBen Gras0 string PAR\0 PARity archive data 781ef01931fSBen Gras>48 leshort =0 - Index file 782ef01931fSBen Gras>48 leshort >0 - file number %d 783ef01931fSBen Gras 784ef01931fSBen Gras# Felix von Leitner <felix-file@fefe.de> 785ef01931fSBen Gras0 string d8:announce BitTorrent file 786ef01931fSBen Gras!:mime application/x-bittorrent 787ef01931fSBen Gras 788ef01931fSBen Gras# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi> 789ef01931fSBen Gras0 beshort 0x0e0f Atari MSA archive data 790ef01931fSBen Gras>2 beshort x \b, %d sectors per track 791ef01931fSBen Gras>4 beshort 0 \b, 1 sided 792ef01931fSBen Gras>4 beshort 1 \b, 2 sided 793ef01931fSBen Gras>6 beshort x \b, starting track: %d 794ef01931fSBen Gras>8 beshort x \b, ending track: %d 795ef01931fSBen Gras 796ef01931fSBen Gras# Alternate ZIP string (amc@arwen.cs.berkeley.edu) 797ef01931fSBen Gras0 string PK00PK\003\004 Zip archive data 798ef01931fSBen Gras 799ef01931fSBen Gras# ACE archive (from http://www.wotsit.org/download.asp?f=ace) 800ef01931fSBen Gras# by Stefan `Sec` Zehl <sec@42.org> 801ef01931fSBen Gras7 string **ACE** ACE archive data 802ef01931fSBen Gras>15 byte >0 version %d 803ef01931fSBen Gras>16 byte =0x00 \b, from MS-DOS 804ef01931fSBen Gras>16 byte =0x01 \b, from OS/2 805ef01931fSBen Gras>16 byte =0x02 \b, from Win/32 806ef01931fSBen Gras>16 byte =0x03 \b, from Unix 807ef01931fSBen Gras>16 byte =0x04 \b, from MacOS 808ef01931fSBen Gras>16 byte =0x05 \b, from WinNT 809ef01931fSBen Gras>16 byte =0x06 \b, from Primos 810ef01931fSBen Gras>16 byte =0x07 \b, from AppleGS 811ef01931fSBen Gras>16 byte =0x08 \b, from Atari 812ef01931fSBen Gras>16 byte =0x09 \b, from Vax/VMS 813ef01931fSBen Gras>16 byte =0x0A \b, from Amiga 814ef01931fSBen Gras>16 byte =0x0B \b, from Next 815ef01931fSBen Gras>14 byte x \b, version %d to extract 816ef01931fSBen Gras>5 leshort &0x0080 \b, multiple volumes, 817ef01931fSBen Gras>>17 byte x \b (part %d), 818ef01931fSBen Gras>5 leshort &0x0002 \b, contains comment 819ef01931fSBen Gras>5 leshort &0x0200 \b, sfx 820ef01931fSBen Gras>5 leshort &0x0400 \b, small dictionary 821ef01931fSBen Gras>5 leshort &0x0800 \b, multi-volume 822ef01931fSBen Gras>5 leshort &0x1000 \b, contains AV-String 823ef01931fSBen Gras>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) 824ef01931fSBen Gras>5 leshort &0x2000 \b, with recovery record 825ef01931fSBen Gras>5 leshort &0x4000 \b, locked 826ef01931fSBen Gras>5 leshort &0x8000 \b, solid 827ef01931fSBen Gras# Date in MS-DOS format (whatever that is) 828ef01931fSBen Gras#>18 lelong x Created on 829ef01931fSBen Gras 830ef01931fSBen Gras# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann 831ef01931fSBen Gras# <doj@cubic.org> 832ef01931fSBen Gras0x1A string sfArk sfArk compressed Soundfont 833ef01931fSBen Gras>0x15 string 2 834ef01931fSBen Gras>>0x1 string >\0 Version %s 835ef01931fSBen Gras>>0x2A string >\0 : %s 836ef01931fSBen Gras 837ef01931fSBen Gras# DR-DOS 7.03 Packed File *.??_ 838ef01931fSBen Gras0 string Packed\ File\ Personal NetWare Packed File 839ef01931fSBen Gras>12 string x \b, was "%.12s" 840ef01931fSBen Gras 841ef01931fSBen Gras# EET archive 842ef01931fSBen Gras# From: Tilman Sauerbeck <tilman@code-monkey.de> 843ef01931fSBen Gras0 belong 0x1ee7ff00 EET archive 844ef01931fSBen Gras!:mime application/x-eet 845ef01931fSBen Gras 846ef01931fSBen Gras# rzip archives 847ef01931fSBen Gras0 string RZIP rzip compressed data 848ef01931fSBen Gras>4 byte x - version %d 849ef01931fSBen Gras>5 byte x \b.%d 850ef01931fSBen Gras>6 belong x (%d bytes) 851ef01931fSBen Gras 852ef01931fSBen Gras# From: "Robert Dale" <robdale@gmail.com> 853ef01931fSBen Gras0 belong 123 dar archive, 854ef01931fSBen Gras>4 belong x label "%.8x 855ef01931fSBen Gras>>8 belong x %.8x 856ef01931fSBen Gras>>>12 beshort x %.4x" 857ef01931fSBen Gras>14 byte 0x54 end slice 858ef01931fSBen Gras>14 beshort 0x4e4e multi-part 859ef01931fSBen Gras>14 beshort 0x4e53 multi-part, with -S 860ef01931fSBen Gras 861ef01931fSBen Gras# Symbian installation files 862ef01931fSBen Gras# http://www.thouky.co.uk/software/psifs/sis.html 863ef01931fSBen Gras# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf 864ef01931fSBen Gras8 lelong 0x10000419 Symbian installation file 865ef01931fSBen Gras!:mime application/vnd.symbian.install 866ef01931fSBen Gras>4 lelong 0x1000006D (EPOC release 3/4/5) 867ef01931fSBen Gras>4 lelong 0x10003A12 (EPOC release 6) 868ef01931fSBen Gras0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) 869ef01931fSBen Gras!:mime x-epoc/x-sisx-app 870ef01931fSBen Gras 871ef01931fSBen Gras# From "Nelson A. de Oliveira" <naoliv@gmail.com> 872ef01931fSBen Gras0 string MPQ\032 MoPaQ (MPQ) archive 873ef01931fSBen Gras 874ef01931fSBen Gras# From: Dirk Jagdmann <doj@cubic.org> 875ef01931fSBen Gras# xar archive format: http://code.google.com/p/xar/ 876ef01931fSBen Gras0 string xar! xar archive 877*0a6a1f1dSLionel Sambuc>6 beshort x - version %d 878ef01931fSBen Gras 879ef01931fSBen Gras# From: "Nelson A. de Oliveira" <naoliv@gmail.com> 880ef01931fSBen Gras# .kgb 881ef01931fSBen Gras0 string KGB_arch KGB Archiver file 882ef01931fSBen Gras>10 string x with compression level %.1s 883ef01931fSBen Gras 884ef01931fSBen Gras# xar (eXtensible ARchiver) archive 885ef01931fSBen Gras# From: "David Remahl" <dremahl@apple.com> 886ef01931fSBen Gras0 string xar! xar archive 887ef01931fSBen Gras#>4 beshort x header size %d 888ef01931fSBen Gras>6 beshort x version %d, 889ef01931fSBen Gras#>8 quad x compressed TOC: %d, 890ef01931fSBen Gras#>16 quad x uncompressed TOC: %d, 891ef01931fSBen Gras>24 belong 0 no checksum 892ef01931fSBen Gras>24 belong 1 SHA-1 checksum 893ef01931fSBen Gras>24 belong 2 MD5 checksum 894ef01931fSBen Gras 895835f6802SDirk Vogt# Type: Parity Archive 896835f6802SDirk Vogt# From: Daniel van Eeden <daniel_e@dds.nl> 897835f6802SDirk Vogt0 string PAR2 Parity Archive Volume Set 898835f6802SDirk Vogt 899835f6802SDirk Vogt# Bacula volume format. (Volumes always start with a block header.) 900835f6802SDirk Vogt# URL: http://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html 901835f6802SDirk Vogt# From: Adam Buchbinder <adam.buchbinder@gmail.com> 902835f6802SDirk Vogt12 string BB02 Bacula volume 903835f6802SDirk Vogt>20 bedate x \b, started %s 904835f6802SDirk Vogt 905835f6802SDirk Vogt# ePub is XHTML + XML inside a ZIP archive. The first member of the 906835f6802SDirk Vogt# archive must be an uncompressed file called 'mimetype' with contents 907835f6802SDirk Vogt# 'application/epub+zip' 908835f6802SDirk Vogt 909835f6802SDirk Vogt 91084d9c625SLionel Sambuc# From: "Michael Gorny" <mgorny@gentoo.org> 911835f6802SDirk Vogt# ZPAQ: http://mattmahoney.net/dc/zpaq.html 912835f6802SDirk Vogt0 string zPQ ZPAQ stream 913835f6802SDirk Vogt>3 byte x \b, level %d 914835f6802SDirk Vogt 915835f6802SDirk Vogt# BBeB ebook, unencrypted (LRF format) 916835f6802SDirk Vogt# URL: http://www.sven.de/librie/Librie/LrfFormat 917835f6802SDirk Vogt# From: Adam Buchbinder <adam.buchbinder@gmail.com> 918835f6802SDirk Vogt0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted 919835f6802SDirk Vogt>8 beshort x \b, version %d 920835f6802SDirk Vogt>36 byte 1 \b, front-to-back 921835f6802SDirk Vogt>36 byte 16 \b, back-to-front 922835f6802SDirk Vogt>42 beshort x \b, (%dx, 923835f6802SDirk Vogt>44 beshort x %d) 924*0a6a1f1dSLionel Sambuc 925*0a6a1f1dSLionel Sambuc# Symantec GHOST image by Joerg Jenderek at May 2014 926*0a6a1f1dSLionel Sambuc# http://us.norton.com/ghost/ 927*0a6a1f1dSLionel Sambuc# http://www.garykessler.net/library/file_sigs.html 928*0a6a1f1dSLionel Sambuc0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image 929*0a6a1f1dSLionel Sambuc# *.GHO 930*0a6a1f1dSLionel Sambuc>2 ubyte&0x08 0x00 \b, first file 931*0a6a1f1dSLionel Sambuc# *.GHS or *.[0-9] with cns program option 932*0a6a1f1dSLionel Sambuc>2 ubyte&0x08 0x08 \b, split file 933*0a6a1f1dSLionel Sambuc# part of split index interesting for *.ghs 934*0a6a1f1dSLionel Sambuc>>4 ubyte x id=0x%x 935*0a6a1f1dSLionel Sambuc# compression tag minus one equals numeric compression command line switch z[1-9] 936*0a6a1f1dSLionel Sambuc>3 ubyte 0 \b, no compression 937*0a6a1f1dSLionel Sambuc>3 ubyte 2 \b, fast compression (Z1) 938*0a6a1f1dSLionel Sambuc>3 ubyte 3 \b, medium compression (Z2) 939*0a6a1f1dSLionel Sambuc>3 ubyte >3 940*0a6a1f1dSLionel Sambuc>>3 ubyte <11 \b, compression (Z%d-1) 941*0a6a1f1dSLionel Sambuc>2 ubyte&0x08 0x00 942*0a6a1f1dSLionel Sambuc# ~ 30 byte password field only for *.gho 943*0a6a1f1dSLionel Sambuc>>12 ubequad !0 \b, password protected 944*0a6a1f1dSLionel Sambuc>>44 ubyte !1 945*0a6a1f1dSLionel Sambuc# 1~Image All, sector-by-sector only for *.gho 946*0a6a1f1dSLionel Sambuc>>>10 ubyte 1 \b, sector copy 947*0a6a1f1dSLionel Sambuc# 1~Image Boot track only for *.gho 948*0a6a1f1dSLionel Sambuc>>>43 ubyte 1 \b, boot track 949*0a6a1f1dSLionel Sambuc# 1~Image Disc only for *.gho implies Image Boot track and sector copy 950*0a6a1f1dSLionel Sambuc>>44 ubyte 1 \b, disc sector copy 951*0a6a1f1dSLionel Sambuc# optional image description only *.gho 952*0a6a1f1dSLionel Sambuc>>0xff string >\0 "%-.254s" 953*0a6a1f1dSLionel Sambuc# look for DOS sector end sequence 954*0a6a1f1dSLionel Sambuc>0xE08 search/7776 \x55\xAA 955*0a6a1f1dSLionel Sambuc>>&-512 indirect x \b; contains 956*0a6a1f1dSLionel Sambuc 957