Commit a4d6d3b8 authored by Xin LI's avatar Xin LI
Browse files

file: upgrade to 5.42.

MFC after:	2 weeks
parents 11a7d5e5 ba49e637
2022-06-10 9:40 Christos Zoulas <christos@zoulas.com>
* release 5.42
2022-05-31 14:50 Christos Zoulas <christos@zoulas.com>
* PR/348: add missing cases to prevent file from aborting on
random magic files.
2022-05-27 21:05 Christos Zoulas <christos@zoulas.com>
* PR/351: octalify filenames when not raw before printing.
2022-04-18 17:51 Christos Zoulas <christos@zoulas.com>
* fix regex cacheing bug (Dirk Mueller)
* merge file_regcomp and file_regerror() to simplify the code
and reduce memory requirements for storing regexes (Dirk Mueller)
2022-03-19 12:56 Christos Zoulas <christos@zoulas.com>
* cache regex (Dirk Mueller)
* detect filesystem full by flushing output (Dirk Mueller)
2021-11-19 12:36 Christos Zoulas <christos@zoulas.com>
* implement running decompressor programs using
posix_spawnp(2) instead of vfork(2)
2021-10-24 11:51 Christos Zoulas <christos@zoulas.com>
* Add support for msdos dates and times
2021-10-20 9:55 Christos Zoulas <christos@zoulas.com>
* use the system byte swapping functions if available (Werner Fink)
2021-10-18 11:57 Christos Zoulas <christos@zoulas.com>
* release 5.41
......
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = MAINT RELEASE-PROCEDURE README.DEVELOPER m4/visibility.m4
EXTRA_DIST = MAINT RELEASE-PROCEDURE README.DEVELOPER README.md \
m4/visibility.m4
SUBDIRS = src magic tests doc python
......
......@@ -192,8 +192,8 @@ CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/libmagic.pc.in AUTHORS COPYING ChangeLog INSTALL \
NEWS TODO compile config.guess config.sub depcomp install-sh \
ltmain.sh missing
NEWS TODO compile config.guess config.sub install-sh ltmain.sh \
missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -358,7 +358,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = MAINT RELEASE-PROCEDURE README.DEVELOPER m4/visibility.m4
EXTRA_DIST = MAINT RELEASE-PROCEDURE README.DEVELOPER README.md \
m4/visibility.m4
SUBDIRS = src magic tests doc python
# This variable must have 'exec' in its name, in order to be installed
......
## README for file(1) Command and the libmagic(3) library ##
@(#) $File: README.md,v 1.4 2021/10/21 01:51:31 christos Exp $
- Bug Tracker: <https://bugs.astron.com/>
- Build Status: <https://travis-ci.org/file/file>
- Download link: <ftp://ftp.astron.com/pub/file/>
- E-mail: <christos@astron.com>
- Fuzzing link: <https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file>
- Home page: https://www.darwinsys.com/file/
- Mailing List archives: <https://mailman.astron.com/pipermail/file/>
- Mailing List: <file@astron.com>
- Public repo: <https://github.com/file/file>
- Test framework: <https://github.com/file/file-tests>
Phone: Do not even think of telephoning me about this program. Send
cash first!
This is Release 5.x of Ian Darwin's (copyright but distributable)
file(1) command, an implementation of the Unix File(1) command.
It knows the 'magic number' of several thousands of file types.
This version is the standard "file" command for Linux, *BSD, and
other systems. (See "patchlevel.h" for the exact release number).
The major changes for 5.x are CDF file parsing, indirect magic,
name/use (recursion) and overhaul in mime and ascii encoding
handling.
The major feature of 4.x is the refactoring of the code into a
library, and the re-write of the file command in terms of that
library. The library itself, libmagic can be used by 3rd party
programs that wish to identify file types without having to fork()
and exec() file. The prime contributor for 4.0 was Mans Rullgard.
UNIX is a trademark of UNIX System Laboratories.
The prime contributor to Release 3.8 was Guy Harris, who put in
megachanges including byte-order independence.
The prime contributor to Release 3.0 was Christos Zoulas, who put
in hundreds of lines of source code changes, including his own
ANSIfication of the code (I liked my own ANSIfication better, but
his (__P()) is the "Berkeley standard" way of doing it, and I wanted
UCB to include the code...), his HP-like "indirection" (a feature
of the HP file command, I think), and his mods that finally got
the uncompress (-z) mode finished and working.
This release has compiled in numerous environments; see PORTING
for a list and problems.
This fine freeware file(1) follows the USG (System V) model of the
file command, rather than the Research (V7) version or the V7-derived
4.[23] Berkeley one. That is, the file /etc/magic contains much of
the ritual information that is the source of this program's power.
My version knows a little more magic (including tar archives) than
System V; the /etc/magic parsing seems to be compatible with the
(poorly documented) System V /etc/magic format (with one exception;
see the man page).
In addition, the /etc/magic file is built from a subdirectory
for easier(?) maintenance. I will act as a clearinghouse for
magic numbers assigned to all sorts of data files that
are in reasonable circulation. Send your magic numbers,
in magic(5) format please, to the maintainer, Christos Zoulas.
COPYING - read this first.
* `README` - read this second (you are currently reading this file).
* `INSTALL` - read on how to install
* `src/apprentice.c` - parses /etc/magic to learn magic
* `src/apptype.c` - used for OS/2 specific application type magic
* `src/ascmagic.c` - third & last set of tests, based on hardwired assumptions.
* `src/asctime_r.c` - replacement for OS's that don't have it.
* `src/asprintf.c` - replacement for OS's that don't have it.
* `src/buffer.c` - buffer handling functions.
* `src/cdf.[ch]` - parser for Microsoft Compound Document Files
* `src/cdf_time.c` - time converter for CDF.
* `src/compress.c` - handles decompressing files to look inside.
* `src/ctime_r.c` - replacement for OS's that don't have it.
* `src/der.[ch]` - parser for Distinguished Encoding Rules
* `src/dprintf.c` - replacement for OS's that don't have it.
* `src/elfclass.h` - common code for elf 32/64.
* `src/encoding.c` - handles unicode encodings
* `src/file.c` - the main program
* `src/file.h` - header file
* `src/file_opts.h` - list of options
* `src/fmtcheck.c` - replacement for OS's that don't have it.
* `src/fsmagic.c` - first set of tests the program runs, based on filesystem info
* `src/funcs.c` - utilility functions
* `src/getline.c` - replacement for OS's that don't have it.
* `src/getopt_long.c` - replacement for OS's that don't have it.
* `src/gmtime_r.c` - replacement for OS's that don't have it.
* `src/is_csv.c` - knows about Comma Separated Value file format (RFC 4180).
* `src/is_json.c` - knows about JavaScript Object Notation format (RFC 8259).
* `src/is_tar.c, tar.h` - knows about Tape ARchive format (courtesy John Gilmore).
* `src/localtime_r.c` - replacement for OS's that don't have it.
* `src/magic.h.in` - source file for magic.h
* `src/mygetopt.h` - replacement for OS's that don't have it.
* `src/magic.c` - the libmagic api
* `src/names.h` - header file for ascmagic.c
* `src/pread.c` - replacement for OS's that don't have it.
* `src/print.c` - print results, errors, warnings.
* `src/readcdf.c` - CDF wrapper.
* `src/readelf.[ch]` - Stand-alone elf parsing code.
* `src/softmagic.c` - 2nd set of tests, based on /etc/magic
* `src/mygetopt.h` - replacement for OS's that don't have it.
* `src/strcasestr.c` - replacement for OS's that don't have it.
* `src/strlcat.c` - replacement for OS's that don't have it.
* `src/strlcpy.c` - replacement for OS's that don't have it.
* `src/strndup.c` - replacement for OS's that don't have it.
* `src/tar.h` - tar file definitions
* `src/vasprintf.c` - for systems that don't have it.
* `doc/file.man` - man page for the command
* `doc/magic.man` - man page for the magic file, courtesy Guy Harris.
Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
Magdir - directory of /etc/magic pieces
------------------------------------------------------------------------------
If you submit a new magic entry please make sure you read the following
guidelines:
- Initial match is preferably at least 32 bits long, and is a _unique_ match
- If this is not feasible, use additional check
- Match of <= 16 bits are not accepted
- Delay printing string as much as possible, don't print output too early
- Avoid printf arbitrary byte as string, which can be a source of
crash and buffer overflow
- Provide complete information with entry:
* One line short summary
* Optional long description
* File extension, if applicable
* Full name and contact method (for discussion when entry has problem)
* Further reference, such as documentation of format
gpg for dummies:
------------------------------------------------------------------------------
```
$ gpg --verify file-X.YY.tar.gz.asc file-X.YY.tar.gz
gpg: assuming signed data in `file-X.YY.tar.gz'
gpg: Signature made WWW MMM DD HH:MM:SS YYYY ZZZ using DSA key ID KKKKKKKK
```
To download the key:
```
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys KKKKKKKK
```
------------------------------------------------------------------------------
Parts of this software were developed at SoftQuad Inc., developers
of SGML/HTML/XML publishing software, in Toronto, Canada.
SoftQuad was swallowed up by Corel in 2002 and does not exist any longer.
......@@ -18,6 +18,9 @@
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
/* Define to 1 if you have the <bzlib.h> header file. */
#undef HAVE_BZLIB_H
......@@ -128,12 +131,18 @@
/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2
/* Define to 1 if you have the `posix_spawnp' function. */
#undef HAVE_POSIX_SPAWNP
/* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD
/* Have sig_t type */
#undef HAVE_SIG_T
/* Define to 1 if you have the <spawn.h> header file. */
#undef HAVE_SPAWN_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
......@@ -173,6 +182,12 @@
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE
/* Define to 1 if you have the <sys/bswap.h> header file. */
#undef HAVE_SYS_BSWAP_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for file 5.41.
# Generated by GNU Autoconf 2.69 for file 5.42.
#
# Report bugs to <christos@astron.com>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='file'
PACKAGE_TARNAME='file'
PACKAGE_VERSION='5.41'
PACKAGE_STRING='file 5.41'
PACKAGE_VERSION='5.42'
PACKAGE_STRING='file 5.42'
PACKAGE_BUGREPORT='christos@astron.com'
PACKAGE_URL=''
......@@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures file 5.41 to adapt to many kinds of systems.
\`configure' configures file 5.42 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1404,7 +1404,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of file 5.41:";;
short | recursive ) echo "Configuration of file 5.42:";;
esac
cat <<\_ACEOF
......@@ -1524,7 +1524,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
file configure 5.41
file configure 5.42
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2180,7 +2180,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by file $as_me 5.41, which was
It was created by file $as_me 5.42, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3046,7 +3046,7 @@ fi
# Define the identity of the package.
PACKAGE='file'
VERSION='5.41'
VERSION='5.42'
cat >>confdefs.h <<_ACEOF
......@@ -12900,7 +12900,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
for ac_header in stdint.h fcntl.h inttypes.h unistd.h
for ac_header in stdint.h fcntl.h inttypes.h unistd.h byteswap.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
......@@ -12913,7 +12913,7 @@ fi
done
for ac_header in utime.h wchar.h wctype.h
for ac_header in spawn.h utime.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
......@@ -12939,7 +12939,7 @@ fi
done
for ac_header in sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h
for ac_header in sys/bswap.h sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h sys/ioctl.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
......@@ -14290,7 +14290,7 @@ fi
fi
for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2
for ac_func in strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2 posix_spawnp
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
......@@ -15310,7 +15310,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by file $as_me 5.41, which was
This file was extended by file $as_me 5.42, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -15376,7 +15376,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
file config.status 5.41
file config.status 5.42
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
dnl Process this file with autoconf to produce a configure script.
AC_INIT([file],[5.41],[christos@astron.com])
AC_INIT([file],[5.42],[christos@astron.com])
AM_INIT_AUTOMAKE([subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......@@ -99,10 +99,10 @@ gl_VISIBILITY
dnl Checks for headers
AC_HEADER_MAJOR
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h)
AC_CHECK_HEADERS(utime.h wchar.h wctype.h)
AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h byteswap.h)
AC_CHECK_HEADERS(spawn.h utime.h wchar.h wctype.h)
AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h)
AC_CHECK_HEADERS(sys/bswap.h sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h sys/ioctl.h)
if test "$enable_zlib" != "no"; then
AC_CHECK_HEADERS(zlib.h)
fi
......@@ -165,7 +165,7 @@ else
fi])
dnl Checks for functions
AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2)
AC_CHECK_FUNCS(strndup mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale memmem pipe2 posix_spawnp)
dnl Provide implementation of some required functions if necessary
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf)
......
#------------------------------------------------------------------------------
# $File: animation,v 1.87 2021/08/24 09:25:11 christos Exp $
# $File: animation,v 1.88 2022/05/14 22:06:04 christos Exp $
# animation: file(1) magic for animation/movie formats
#
# animation formats
......@@ -940,6 +940,7 @@
# DIF digital video file format <mpruett@sgi.com>
0 belong&0xffffff00 0x1f070000 DIF
!:mime video/x-dv
>4 byte &0x01 (DVCPRO) movie file
>4 byte ^0x01 (DV) movie file
>3 byte &0x80 (PAL)
......
#------------------------------------------------------------------------------
# $File: archive,v 1.151 2021/08/16 10:19:56 christos Exp $
# $File: archive,v 1.162 2022/05/27 21:27:59 christos Exp $
# archive: file(1) magic for archive formats (see also "msdos" for self-
# extracting compressed archives)
#
......@@ -150,7 +150,7 @@
# Incremental snapshot gnu-tar format from:
# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
0 string GNU\ tar- GNU tar incremental snapshot data
>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s
>&0 regex [0-9]\\.[0-9]+-[0-9]+ version %s
# cpio archives
#
......@@ -518,46 +518,65 @@
#>-3 ubyte x \b, last 3 bytes 0x%2.2x
#>-2 ubeshort x \b%4.4x
# From: Joerg Jenderek
# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification
# URL: https://en.wikipedia.org/wiki/Disk_Copy
# reference: http://nulib.com/library/FTN.e00005.htm
0x52 ubeshort 0x0100
# test for disk image size equal or above 400k
>0x40 ubelong >409599
# test also for disk image size equal or below 1440k to skip
# windows7en.mbr UNICODE.DAT
>>0x40 ubelong <1474561
# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes
# 00064000 for 400k GCR disks
# 000c8000 for 800k GCR disks
# 000b4000 for 720k MFM disks
# 00168000 for 1440k MFM disks
>>>0x40 ubelong&0xffE03fFF 0
>>>>0 use dc42-floppy
#>>0x40 ubelong <1474561
# test now for "low" disk image size equal or below 64 MiB to skip
# windows7en.mbr (B441BBAAh) UNICODE.DAT (0400AF05h)
>>0x40 ubelong <0x04000001
# To skip Flags$StringJoiner.class with size 00106A61h test also for valid disk image sizes
# 00064000 for 400k GCR disks dc42-400k-gcr.trid.xml
# 000c8000 for 800k GCR disks dc42-800k-gcr.trid.xml
# 000b4000 for 720k MFM disks dc42-720k-mfm.trid.xml
# 00168000 for 1440k MFM disks dc42-1440k-mfm.trid.xml
# https://lisaem.sunder.net/LisaProjectDocs.txt
# 00500000 05M available
# 00A00000 10M available
# 01800000 24M possible
# 02000000 32M uncertain
# 04000000 64M uncertain
>>>0x40 ubelong&0xf8003fFF 0
# skip samples with invalid disk name length like:
# 181 (biosmd80.rom) 202 (Flags$StringJoiner.class) 90 (UNICODE.DAT)
>>>>0x0 ubyte <64
>>>>>0 use dc42-floppy
# display information of Apple DiskCopy 4.2 floppy image
0 name dc42-floppy
# image pascal name padded with NULs like Microsoft Mail
# disk name length; maximal 63
#>0 ubyte x DISK NAME LENGTH %u
# ASCII image pascal (maximal 63 bytes) name padded with NULs like:
# "Microsoft Mail" "Disquette 2" "IIe Installer Disk"
# "-lisaem.sunder.net hd-" (dc42-lisaem.trid.xml) "-not a Macintosh disk" (dc42-nonmac.trid.xml)
>00 pstring/B x Apple DiskCopy 4.2 image %s
#!:mime application/octet-stream
!:mime application/x-dc42-floppy-image
!:apple dCpydImg
!:ext image/dc42
# data size in bytes like 409600
# probably also img like: "Utilitaires 2.img" "Installation 7.img"
!:ext image/dc42/img
# data size in bytes like: 409600 737280 819200 1474560
>0x40 ubelong x \b, %u bytes
# for debugging purpose size in hexadecimal
#>0x40 ubelong x (%#8.8x)
# tag size in bytes
# tag size in bytes like: 0 (often) 2580h (PUID fmt/625) 4B00h (Microsoft Mail.image)
>0x44 ubelong >0 \b, %#x tag size
# data checksum
#>0x48 ubelong x \b, %#x checksum
# tag checksum
#>0x4c ubelong x \b, %#x tag checksum
# disk encoding
# disk encoding like: 0 1 2 3 (PUID: fmt/625)
>0x50 ubyte 0 \b, GCR CLV ssdd (400k)
>0x50 ubyte 1 \b, GCR CLV dsdd (800k)
>0x50 ubyte 2 \b, MFM CAV dsdd (720k)
>0x50 ubyte 3 \b, MFM CAV dshd (1440k)
>0x50 ubyte >3 \b, %#x encoding
# format byte
# format byte like: 12h (Lisa 400K) 24h (400K Macintosh) 96h (800K Apple II disk)
# 2 (Mac 400k "Disquette Installation 13.image")
# 22h (double-sided MFM or Mac 800k "Disco 12.image" "IIe Installer Disk.image")
>0x51 ubyte x \b, %#x format
#>0x54 ubequad x \b, data %#16.16llx
# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
......@@ -670,7 +689,15 @@
# 2 bytes: length of data + mentioned bytes
#
# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ
# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression
# Reference: http://www.cabextract.org.uk/libmspack/doc/szdd_kwaj_format.html
# http://mark0.net/download/triddefs_xml.7z/defs/s/szdd.trid.xml
# Note: called "Microsoft SZDD compressed (Haruhiko Okumura's LZSS)" by TrID
# verfied by 7-Zip `7z l -tMsLZ -slt *.??_` as MsLZ
# `deark -l -m lzss_oku -d2 setup-1-41.bin` as "LZSS.C by Haruhiko Okumura"
>0 string SZDD MS Compress archive data, SZDD variant
# 2nd part of signature
#>>4 ubelong 0x88F02733 \b, SIGNATURE OK
!:mime application/x-ms-compress-szdd
!:ext ??_
# The character missing from the end of the filename (0=unknown)
......@@ -679,6 +706,24 @@
# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e
>>8 string !A \b, %-.1s method
>>10 ulelong >0 \b, original size: %u bytes
# Summary: InstallShield archive with SZDD compressed
# URL: https://community.flexera.com/t5/InstallShield-Knowledge-Base/InstallShield-Redistributable-Files/ta-p/5647
# From: Joerg Jenderek
1 search/48/bs SZDD\x88\xF0\x27\x33 InstallShield archive
#!:mime application/octet-stream
!:mime application/x-installshield-compress-szdd
!:ext ibt
# name of compressed archive member like: setup.dl_ _setup7int.dl_ _setup2k.dl_ _igdi.dl_ cabinet.dl_
>0 string x %s
# name of uncompressed archive member like: setup.dll _Setup.dll IGdi.dll CABINET.DLL
>>&1 string x (%s)
# probably version like: 9.0.0.333 9.1.0.429 11.50.0.42618
>>>&1 string x \b, version %s
# SZDD member length like: 168048 169333 181842
>>>>&1 string x \b, %s bytes
# MS Compress archive data
#>&0 string SZDD \b, SIGNATURE FOUND
>&0 indirect x
# QBasic SZDD variant
3 string \x88\xf0\x27
>0 string SZ\x20 MS Compress archive data, QBasic variant
......@@ -686,6 +731,17 @@
!:ext ??$
>>8 ulelong >0 \b, original size: %u bytes
# Summary: CAZIP compressed file
# From: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/CAZIP
# Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/caz.trid.xml
# Note: Format is distinct from CAZIPXP compressed
0 string \x0D\x0A\x1ACAZIP CAZIP compressed file
#!:mime application/octet-stream
!:mime application/x-compress-cazip
# like: BLINKER.WR_ CLIPDEFS._ CAOSETUP.EX_ CLIPPER.EX_ FILEIO.C_
!:ext ??_/?_/_
# Summary: FTCOMP compressed archive
# From: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/FTCOMP
......@@ -772,13 +828,43 @@
0 string NSK NaShrink archive data
# SAPCAR
0 string #\ CAR\ archive\ header SAPCAR archive data
0 string CAR\ 2.00RG SAPCAR archive data
0 string CAR\ 2.00 SAPCAR archive data
0 string CAR\ 2.01 SAPCAR archive data
#!:mime application/octet-stream
!:mime application/vnd.sar
!:ext sar
# Disintegrator
0 string DST Disintegrator archive data
# ASD
0 string ASD ASD archive data
# InstallShield CAB
0 string ISc( InstallShield CAB
# Update: Joerg Jenderek at Nov 2021
# URL: https://en.wikipedia.org/wiki/InstallShield
# Reference: https://github.com/twogood/unshield/blob/master/lib/cabfile.h
# Note: Not compatible with Microsoft CAB files
# http://mark0.net/download/triddefs_xml.7z/defs/a/ark-cab-ishield.trid.xml
# CAB_SIGNATURE 0x28635349
0 string ISc( InstallShield
#!:mime application/octet-stream
!:mime application/x-installshield
# http://mark0.net/download/triddefs_xml.7z/defs/a/ark-cab-ishield-hdr.trid.xml
>16 ulelong !0 setup header
# like: _SYS1.HDR _USER1.HDR data1.hdr
!:ext hdr
>16 ulelong =0 CAB
# like: _SYS1.CAB _USER1.CAB DATA1.CAB data2.cab
!:ext cab
# https://github.com/twogood/unshield/blob/master/lib/helper.c
# version like: 0x1005201 0x100600c 0x1007000 0x1009500
# 0x2000578 0x20005dc 0x2000640 0x40007d0 0x4000834
>4 ulelong x \b, version %#x
# volume_info like: 0
>8 ulelong !0 \b, volume_info %#x
# cab_descriptor_offset like: 0x200
>12 ulelong !0x200 \b, offset %#x
#>0x200 ubequad x \b, at 0x200 %#16.16llx
# cab_descriptor_size like: 0 (*.cab) BD5 C8B DA5 E2A E36 116C 251D 4DA9 56F0 5CC2 6E4B 777D 779E 1F7C2
>16 ulelong !0 \b, descriptor size %#x
# TOP4
0 string T4\x1a TOP4 archive data
# BatComp left out: sig looks like COM executable
......@@ -925,30 +1011,143 @@
>3 byte&0xf0 0x30
>>3 byte x (v%c)
# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
# Update: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/JAR_(ARJ_Software)
# reference: http://mark0.net/download/triddefs_xml.7z/defs/a/ark-jar.trid.xml
# https://www.sac.sk/download/pack/jar102x.exe/TECHNOTE.DOC
# Note: called "JAR compressed archive" by TrID
0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
#!:mime application/octet-stream
!:mime application/x-compress-j
>0 ulelong x \b, CRC32 %#x
# standard suffix is ".j"; for multi volumes following order j01 j02 ... j99 100 ... 990