Repository: mirror/firmware-mod-kit
Branch: master
Commit: 1ab09422186f
Files: 5052
Total size: 26.2 MB
Directory structure:
gitextract_dkpulien/
├── build-firmware.sh
├── check_for_upgrade.sh
├── cleanup.sh
├── creating_ipkg_packages.htm
├── ddwrt-gui-extract.sh
├── ddwrt-gui-rebuild.sh
├── extract-firmware.sh
├── firmware_mod_kit.htm
├── firmware_mod_kit_version.txt
├── ipk_template/
│ ├── conffiles
│ ├── control
│ ├── debian_binary
│ └── make_ipk.sh
├── ipkg_install.sh
├── ipkg_install_all.sh
├── ipkg_remove.sh
├── ipkg_remove_all.sh
├── old-build.sh
├── old-extract.sh
├── shared-ng.inc
├── shared.inc
├── src/
│ ├── Makefile.in
│ ├── addpattern.c
│ ├── asustrx.c
│ ├── bff/
│ │ ├── Makefile
│ │ ├── bff_huffman_decompress.c
│ │ └── bffxtractor.py
│ ├── binwalk-0.4.1/
│ │ ├── docs/
│ │ │ └── README
│ │ └── src/
│ │ ├── Makefile.in
│ │ ├── binwalk.c
│ │ ├── binwalk.h
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── configure
│ │ ├── configure.ac
│ │ ├── filter.c
│ │ ├── filter.h
│ │ ├── magic/
│ │ │ ├── magic.archives
│ │ │ ├── magic.bootloaders
│ │ │ ├── magic.compressed
│ │ │ ├── magic.executables
│ │ │ ├── magic.filesystems
│ │ │ ├── magic.firmware
│ │ │ └── magic.kernels
│ │ ├── magic.binarch
│ │ ├── magic.bincast
│ │ ├── magic.binwalk
│ │ ├── md5.c
│ │ ├── md5.h
│ │ ├── mparse.c
│ │ ├── mparse.h
│ │ ├── update.c
│ │ └── update.h
│ ├── binwalk-1.0/
│ │ ├── docs/
│ │ │ ├── API
│ │ │ ├── COPYING
│ │ │ └── README
│ │ └── src/
│ │ ├── bin/
│ │ │ └── binwalk-script
│ │ ├── binwalk/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── config/
│ │ │ │ └── extract.conf
│ │ │ ├── config.py
│ │ │ ├── extractor.py
│ │ │ ├── filter.py
│ │ │ ├── magic/
│ │ │ │ ├── binarch
│ │ │ │ ├── bincast
│ │ │ │ └── binwalk
│ │ │ ├── parser.py
│ │ │ ├── prettyprint.py
│ │ │ ├── smartsig.py
│ │ │ └── update.py
│ │ ├── build/
│ │ │ ├── lib.linux-x86_64-2.7/
│ │ │ │ └── binwalk/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── common.py
│ │ │ │ ├── config/
│ │ │ │ │ └── extract.conf
│ │ │ │ ├── config.py
│ │ │ │ ├── extractor.py
│ │ │ │ ├── filter.py
│ │ │ │ ├── magic/
│ │ │ │ │ ├── binarch
│ │ │ │ │ ├── bincast
│ │ │ │ │ └── binwalk
│ │ │ │ ├── parser.py
│ │ │ │ ├── prettyprint.py
│ │ │ │ ├── smartsig.py
│ │ │ │ └── update.py
│ │ │ └── scripts-2.7/
│ │ │ └── binwalk
│ │ ├── magic/
│ │ │ ├── archives
│ │ │ ├── bootloaders
│ │ │ ├── compressed
│ │ │ ├── crypto
│ │ │ ├── executables
│ │ │ ├── filesystems
│ │ │ ├── firmware
│ │ │ ├── images
│ │ │ ├── kernels
│ │ │ ├── lzma
│ │ │ └── sql
│ │ ├── setup.py
│ │ └── support/
│ │ └── lzma_gen.py
│ ├── configure
│ ├── configure.ac
│ ├── cramfs-2.x/
│ │ ├── COPYING
│ │ ├── GNUmakefile
│ │ ├── NOTES
│ │ ├── README
│ │ ├── cramfsck.c
│ │ ├── linux/
│ │ │ ├── cramfs_fs.h
│ │ │ └── cramfs_fs_sb.h
│ │ └── mkcramfs.c
│ ├── cramfsswap/
│ │ ├── COPYING
│ │ ├── Makefile
│ │ ├── README
│ │ ├── cramfsswap.1
│ │ ├── cramfsswap.c
│ │ └── debian/
│ │ ├── changelog
│ │ ├── compat
│ │ ├── control
│ │ ├── copyright
│ │ ├── dirs
│ │ ├── docs
│ │ └── rules
│ ├── crcalc/
│ │ ├── Makefile
│ │ ├── README
│ │ ├── crc.c
│ │ ├── crc.h
│ │ ├── crcalc.c
│ │ ├── crcalc.h
│ │ ├── md5.c
│ │ ├── md5.h
│ │ ├── patch.c
│ │ └── patch.h
│ ├── firmware-tools/
│ │ ├── Makefile
│ │ ├── add_header.c
│ │ ├── addpattern.c
│ │ ├── airlink.c
│ │ ├── bcm_tag.h
│ │ ├── buffalo-enc.c
│ │ ├── buffalo-lib.c
│ │ ├── buffalo-lib.h
│ │ ├── buffalo-tag.c
│ │ ├── buffalo-tftp.c
│ │ ├── csysimg.h
│ │ ├── cyg_crc.h
│ │ ├── cyg_crc16.c
│ │ ├── cyg_crc32.c
│ │ ├── dgfirmware.c
│ │ ├── encode_crc.c
│ │ ├── fix-u-media-header.c
│ │ ├── fw.h
│ │ ├── imagetag.c
│ │ ├── imagetag.ggo
│ │ ├── imagetag_cmdline.c
│ │ ├── imagetag_cmdline.h
│ │ ├── lzma2eva.c
│ │ ├── makeamitbin.c
│ │ ├── md5.c
│ │ ├── md5.h
│ │ ├── mkbrncmdline.c
│ │ ├── mkbrnimg.c
│ │ ├── mkcameofw.c
│ │ ├── mkcasfw.c
│ │ ├── mkchkimg.c
│ │ ├── mkcsysimg.c
│ │ ├── mkdapimg.c
│ │ ├── mkdir615h1.c
│ │ ├── mkdniimg.c
│ │ ├── mkedimaximg.c
│ │ ├── mkfwimage.c
│ │ ├── mkfwimage2.c
│ │ ├── mkmylofw.c
│ │ ├── mkplanexfw.c
│ │ ├── mktitanimg.c
│ │ ├── mktitanimg.h
│ │ ├── mktplinkfw.c
│ │ ├── mkwrgimg.c
│ │ ├── mkzcfw.c
│ │ ├── mkzynfw.c
│ │ ├── motorola-bin.c
│ │ ├── myloader.h
│ │ ├── nand_ecc.c
│ │ ├── osbridge-crc.c
│ │ ├── pc1crypt.c
│ │ ├── ptgen.c
│ │ ├── readme.txt
│ │ ├── seama.c
│ │ ├── seama.h
│ │ ├── sha1.c
│ │ ├── sha1.h
│ │ ├── spw303v.c
│ │ ├── srec2bin.c
│ │ ├── trx.c
│ │ ├── trx2edips.c
│ │ ├── trx2usr.c
│ │ ├── wndr3700.c
│ │ ├── wrt400n.c
│ │ ├── xorimage.c
│ │ └── zynos.h
│ ├── jffs2/
│ │ ├── mkfs.jffs2
│ │ └── unjffs2
│ ├── lzma/
│ │ ├── .built
│ │ ├── .unpacked
│ │ ├── 7zC.txt
│ │ ├── 7zFormat.txt
│ │ ├── C/
│ │ │ ├── 7zip/
│ │ │ │ ├── Archive/
│ │ │ │ │ └── 7z_C/
│ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ ├── 7zTypes.h
│ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ ├── makefile
│ │ │ │ │ └── makefile.gcc
│ │ │ │ ├── Common/
│ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ └── StreamUtils.h
│ │ │ │ ├── Compress/
│ │ │ │ │ ├── Branch/
│ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ ├── LZ/
│ │ │ │ │ │ ├── BinTree/
│ │ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ │ ├── BinTree4b.h
│ │ │ │ │ │ │ └── BinTreeMain.h
│ │ │ │ │ │ ├── HashChain/
│ │ │ │ │ │ │ ├── HC.h
│ │ │ │ │ │ │ ├── HC2.h
│ │ │ │ │ │ │ ├── HC3.h
│ │ │ │ │ │ │ ├── HC4.h
│ │ │ │ │ │ │ ├── HC4b.h
│ │ │ │ │ │ │ └── HCMain.h
│ │ │ │ │ │ ├── IMatchFinder.h
│ │ │ │ │ │ ├── LZInWindow.cpp
│ │ │ │ │ │ ├── LZInWindow.h
│ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ ├── Patricia/
│ │ │ │ │ │ │ ├── Pat.h
│ │ │ │ │ │ │ ├── Pat2.h
│ │ │ │ │ │ │ ├── Pat2H.h
│ │ │ │ │ │ │ ├── Pat2R.h
│ │ │ │ │ │ │ ├── Pat3H.h
│ │ │ │ │ │ │ ├── Pat4H.h
│ │ │ │ │ │ │ └── PatMain.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── LZMA_C/
│ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── LZMA_Lib/
│ │ │ │ │ │ ├── ZLib.cpp
│ │ │ │ │ │ └── makefile
│ │ │ │ │ └── RangeCoder/
│ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ └── StdAfx.h
│ │ │ │ ├── ICoder.h
│ │ │ │ └── IStream.h
│ │ │ ├── Common/
│ │ │ │ ├── Alloc.cpp
│ │ │ │ ├── Alloc.h
│ │ │ │ ├── CRC.cpp
│ │ │ │ ├── CRC.h
│ │ │ │ ├── C_FileIO.cpp
│ │ │ │ ├── C_FileIO.h
│ │ │ │ ├── ComTry.h
│ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ ├── CommandLineParser.h
│ │ │ │ ├── Defs.h
│ │ │ │ ├── MyCom.h
│ │ │ │ ├── MyGuidDef.h
│ │ │ │ ├── MyInitGuid.h
│ │ │ │ ├── MyUnknown.h
│ │ │ │ ├── MyWindows.h
│ │ │ │ ├── NewHandler.cpp
│ │ │ │ ├── NewHandler.h
│ │ │ │ ├── StdAfx.h
│ │ │ │ ├── String.cpp
│ │ │ │ ├── String.h
│ │ │ │ ├── StringConvert.cpp
│ │ │ │ ├── StringConvert.h
│ │ │ │ ├── StringToInt.cpp
│ │ │ │ ├── StringToInt.h
│ │ │ │ ├── Types.h
│ │ │ │ ├── Vector.cpp
│ │ │ │ └── Vector.h
│ │ │ └── Windows/
│ │ │ ├── Defs.h
│ │ │ ├── FileIO.cpp
│ │ │ ├── FileIO.h
│ │ │ └── StdAfx.h
│ │ ├── CPL.html
│ │ ├── CS/
│ │ │ └── 7zip/
│ │ │ ├── Common/
│ │ │ │ ├── CRC.cs
│ │ │ │ ├── CommandLineParser.cs
│ │ │ │ ├── InBuffer.cs
│ │ │ │ └── OutBuffer.cs
│ │ │ ├── Compress/
│ │ │ │ ├── LZ/
│ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ ├── LZMA/
│ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ ├── LzmaAlone/
│ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ └── Properties/
│ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ ├── Resources.cs
│ │ │ │ │ └── Settings.cs
│ │ │ │ └── RangeCoder/
│ │ │ │ ├── RangeCoder.cs
│ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ └── RangeCoderBitTree.cs
│ │ │ └── ICoder.cs
│ │ ├── Java/
│ │ │ └── SevenZip/
│ │ │ ├── CRC.java
│ │ │ ├── Compression/
│ │ │ │ ├── ICodeProgress.java
│ │ │ │ ├── LZ/
│ │ │ │ │ ├── BinTree.java
│ │ │ │ │ ├── InWindow.java
│ │ │ │ │ └── OutWindow.java
│ │ │ │ ├── LZMA/
│ │ │ │ │ ├── Base.java
│ │ │ │ │ ├── Decoder.java
│ │ │ │ │ └── Encoder.java
│ │ │ │ └── RangeCoder/
│ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ ├── Decoder.java
│ │ │ │ └── Encoder.java
│ │ │ ├── LzmaAlone.java
│ │ │ └── LzmaBench.java
│ │ ├── LGPL.txt
│ │ ├── Methods.txt
│ │ ├── history.txt
│ │ └── lzma.txt
│ ├── motorola-bin.c
│ ├── others/
│ │ ├── Makefile
│ │ ├── squashfs-2.0-nb4/
│ │ │ ├── Makefile
│ │ │ ├── nb4-mksquashfs/
│ │ │ │ ├── Makefile
│ │ │ │ ├── getdelim.c
│ │ │ │ ├── getdelim.h
│ │ │ │ ├── getline.c
│ │ │ │ ├── getline.h
│ │ │ │ ├── lzma/
│ │ │ │ │ ├── compress/
│ │ │ │ │ │ ├── 7z.h
│ │ │ │ │ │ ├── 7zapi.cpp
│ │ │ │ │ │ ├── 7zapi.h
│ │ │ │ │ │ ├── 7zlzma.cpp
│ │ │ │ │ │ ├── AriBitCoder.cpp
│ │ │ │ │ │ ├── AriBitCoder.h
│ │ │ │ │ │ ├── AriConst.h
│ │ │ │ │ │ ├── AriPrice.h
│ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ ├── BinTree2Main.h
│ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ ├── BinTree3Main.h
│ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ ├── BinTree3ZMain.h
│ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ ├── BinTree4Main.h
│ │ │ │ │ │ ├── BinTree4b.h
│ │ │ │ │ │ ├── BinTree4bMain.h
│ │ │ │ │ │ ├── BinTreeMF.h
│ │ │ │ │ │ ├── BinTreeMFMain.h
│ │ │ │ │ │ ├── BinTreeMain.h
│ │ │ │ │ │ ├── BitTreeCoder.h
│ │ │ │ │ │ ├── CRC.h
│ │ │ │ │ │ ├── Const.h
│ │ │ │ │ │ ├── IInOutStreams.cpp
│ │ │ │ │ │ ├── IInOutStreams.h
│ │ │ │ │ │ ├── InByte.cpp
│ │ │ │ │ │ ├── InByte.h
│ │ │ │ │ │ ├── LZMA.cpp
│ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ ├── LenCoder.cpp
│ │ │ │ │ │ ├── LenCoder.h
│ │ │ │ │ │ ├── LiteralCoder.cpp
│ │ │ │ │ │ ├── LiteralCoder.h
│ │ │ │ │ │ ├── OutByte.cpp
│ │ │ │ │ │ ├── OutByte.h
│ │ │ │ │ │ ├── Portable.h
│ │ │ │ │ │ ├── RCDefs.h
│ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── WindowIn.cpp
│ │ │ │ │ │ ├── WindowIn.h
│ │ │ │ │ │ ├── WindowOut.cpp
│ │ │ │ │ │ ├── WindowOut.h
│ │ │ │ │ │ └── lzDecomp.cpp
│ │ │ │ │ └── decompress/
│ │ │ │ │ ├── 7z.h
│ │ │ │ │ ├── 7zlzma.c
│ │ │ │ │ ├── AriBitCoder.h
│ │ │ │ │ ├── BitTreeCoder.h
│ │ │ │ │ ├── IInOutStreams.c
│ │ │ │ │ ├── IInOutStreams.h
│ │ │ │ │ ├── LZMA.h
│ │ │ │ │ ├── LZMADecoder.c
│ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ ├── LenCoder.h
│ │ │ │ │ ├── LiteralCoder.h
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Portable.h
│ │ │ │ │ ├── RCDefs.h
│ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ ├── WindowOut.h
│ │ │ │ │ └── vxTypesOld.h
│ │ │ │ └── squashfs/
│ │ │ │ ├── Makefile
│ │ │ │ ├── mksquashfs.c
│ │ │ │ ├── mksquashfs.h
│ │ │ │ ├── read_fs.c
│ │ │ │ ├── read_fs.h
│ │ │ │ ├── sort.c
│ │ │ │ ├── squashfs_fs.h
│ │ │ │ ├── squashfs_fs_i.h
│ │ │ │ └── squashfs_fs_sb.h
│ │ │ └── nb4-unsquashfs/
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── brcm-lzma/
│ │ │ │ ├── 7z.h
│ │ │ │ ├── 7zlzma.c
│ │ │ │ ├── AriBitCoder.h
│ │ │ │ ├── BitTreeCoder.h
│ │ │ │ ├── IInOutStreams.c
│ │ │ │ ├── IInOutStreams.h
│ │ │ │ ├── LZMA.h
│ │ │ │ ├── LZMADecoder.c
│ │ │ │ ├── LZMADecoder.h
│ │ │ │ ├── LenCoder.h
│ │ │ │ ├── LiteralCoder.h
│ │ │ │ ├── Makefile
│ │ │ │ ├── Portable.h
│ │ │ │ ├── RCDefs.h
│ │ │ │ ├── RangeCoder.h
│ │ │ │ ├── WindowOut.h
│ │ │ │ └── vxTypesOld.h
│ │ │ ├── global.h
│ │ │ ├── nb4-unsquash.c
│ │ │ ├── read_fs.h
│ │ │ └── squashfs_fs.h
│ │ ├── squashfs-3.0-e2100/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── lzma/
│ │ │ │ ├── .built
│ │ │ │ ├── .unpacked
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ └── 7z_C/
│ │ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ │ │ ├── 7zTypes.h
│ │ │ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ └── StreamUtils.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ │ ├── BinTree/
│ │ │ │ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ │ │ │ ├── BinTree4b.h
│ │ │ │ │ │ │ │ │ └── BinTreeMain.h
│ │ │ │ │ │ │ │ ├── HashChain/
│ │ │ │ │ │ │ │ │ ├── HC.h
│ │ │ │ │ │ │ │ │ ├── HC2.h
│ │ │ │ │ │ │ │ │ ├── HC3.h
│ │ │ │ │ │ │ │ │ ├── HC4.h
│ │ │ │ │ │ │ │ │ ├── HC4b.h
│ │ │ │ │ │ │ │ │ └── HCMain.h
│ │ │ │ │ │ │ │ ├── IMatchFinder.h
│ │ │ │ │ │ │ │ ├── LZInWindow.cpp
│ │ │ │ │ │ │ │ ├── LZInWindow.h
│ │ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ │ ├── Patricia/
│ │ │ │ │ │ │ │ │ ├── Pat.h
│ │ │ │ │ │ │ │ │ ├── Pat2.h
│ │ │ │ │ │ │ │ │ ├── Pat2H.h
│ │ │ │ │ │ │ │ │ ├── Pat2R.h
│ │ │ │ │ │ │ │ │ ├── Pat3H.h
│ │ │ │ │ │ │ │ │ ├── Pat4H.h
│ │ │ │ │ │ │ │ │ └── PatMain.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LZMA_C/
│ │ │ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LZMA_Lib/
│ │ │ │ │ │ │ │ ├── ZLib.cpp
│ │ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ └── IStream.h
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── Alloc.cpp
│ │ │ │ │ │ ├── Alloc.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── CRC.h
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── String.cpp
│ │ │ │ │ │ ├── String.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── Vector.cpp
│ │ │ │ │ │ └── Vector.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ └── StdAfx.h
│ │ │ │ ├── CPL.html
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── LGPL.txt
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.2-r2/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.2-r2-hg612-lzma/
│ │ │ ├── Makefile
│ │ │ ├── lzma443/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ └── 7z_C/
│ │ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ │ │ ├── 7zTypes.h
│ │ │ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ └── StreamUtils.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ │ │ ├── BranchTypes.h
│ │ │ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ │ ├── BinTree/
│ │ │ │ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ │ │ │ └── BinTreeMain.h
│ │ │ │ │ │ │ │ ├── HashChain/
│ │ │ │ │ │ │ │ │ ├── HC2.h
│ │ │ │ │ │ │ │ │ ├── HC3.h
│ │ │ │ │ │ │ │ │ ├── HC4.h
│ │ │ │ │ │ │ │ │ └── HCMain.h
│ │ │ │ │ │ │ │ ├── IMatchFinder.h
│ │ │ │ │ │ │ │ ├── LZInWindow.cpp
│ │ │ │ │ │ │ │ ├── LZInWindow.h
│ │ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── comp.cc
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ │ └── sqlzma.mk
│ │ │ │ │ │ │ ├── LZMA_C/
│ │ │ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ │ │ ├── LzmaTypes.h
│ │ │ │ │ │ │ │ ├── kmod/
│ │ │ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ │ │ └── module.c
│ │ │ │ │ │ │ │ ├── kmod.mk
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ │ ├── sqlzma.mk
│ │ │ │ │ │ │ │ ├── testflags.c
│ │ │ │ │ │ │ │ └── uncomp.c
│ │ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ └── IStream.h
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── Alloc.cpp
│ │ │ │ │ │ ├── Alloc.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── CRC.h
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── String.cpp
│ │ │ │ │ │ ├── String.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── Vector.cpp
│ │ │ │ │ │ └── Vector.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ └── StdAfx.h
│ │ │ │ ├── CPL.html
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── LGPL.txt
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ ├── lzma.txt
│ │ │ │ └── sqlzma1-443.patch
│ │ │ ├── sqlzma.h
│ │ │ ├── sqmagic.h
│ │ │ └── squashfs3.2-r2/
│ │ │ ├── ACKNOWLEDGEMENTS
│ │ │ ├── CHANGES
│ │ │ ├── COPYING
│ │ │ ├── INSTALL
│ │ │ ├── PERFORMANCE.README
│ │ │ ├── README
│ │ │ ├── README-3.2
│ │ │ ├── sqlzma2u-3.2-r2.patch
│ │ │ └── squashfs-tools/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.2-r2-lzma/
│ │ │ ├── C/
│ │ │ │ ├── 7zCrc.c
│ │ │ │ ├── 7zCrc.h
│ │ │ │ ├── 7zCrcT8.c
│ │ │ │ ├── Alloc.c
│ │ │ │ ├── Alloc.h
│ │ │ │ ├── Archive/
│ │ │ │ │ └── 7z/
│ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ ├── makefile
│ │ │ │ │ └── makefile.gcc
│ │ │ │ ├── Compress/
│ │ │ │ │ ├── Branch/
│ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ ├── BranchTypes.h
│ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ ├── BranchX86_2.c
│ │ │ │ │ │ └── BranchX86_2.h
│ │ │ │ │ ├── Huffman/
│ │ │ │ │ │ ├── HuffmanEncode.c
│ │ │ │ │ │ └── HuffmanEncode.h
│ │ │ │ │ ├── Lz/
│ │ │ │ │ │ ├── LzHash.h
│ │ │ │ │ │ ├── MatchFinder.c
│ │ │ │ │ │ ├── MatchFinder.h
│ │ │ │ │ │ ├── MatchFinderMt.c
│ │ │ │ │ │ └── MatchFinderMt.h
│ │ │ │ │ └── Lzma/
│ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ ├── LzmaTypes.h
│ │ │ │ │ ├── kmod/
│ │ │ │ │ │ └── uncomp.c
│ │ │ │ │ ├── kmod.mk
│ │ │ │ │ ├── sqlzma.mk
│ │ │ │ │ ├── testflags.c
│ │ │ │ │ └── uncomp.c
│ │ │ │ ├── CpuArch.h
│ │ │ │ ├── IStream.h
│ │ │ │ ├── Sort.c
│ │ │ │ ├── Sort.h
│ │ │ │ ├── Threads.c
│ │ │ │ ├── Threads.h
│ │ │ │ └── Types.h
│ │ │ ├── CPP/
│ │ │ │ ├── 7zip/
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ └── ParseProperties.h
│ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ └── IArchive.h
│ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ ├── BCJ2Register.cpp
│ │ │ │ │ │ │ ├── BCJRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ ├── ByteSwap/
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ ├── Copy/
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ ├── LZMARegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── comp.cc
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ └── sqlzma.mk
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── ICoder.h
│ │ │ │ │ ├── IDecl.h
│ │ │ │ │ ├── IPassword.h
│ │ │ │ │ ├── IProgress.h
│ │ │ │ │ ├── IStream.h
│ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ ├── PropID.h
│ │ │ │ │ └── UI/
│ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ └── Console/
│ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ ├── List.cpp
│ │ │ │ │ ├── List.h
│ │ │ │ │ ├── Main.cpp
│ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ └── afxres.h
│ │ │ │ ├── Build.mak
│ │ │ │ ├── Common/
│ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ ├── Buffer.h
│ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ ├── ComTry.h
│ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ ├── IntToString.h
│ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ ├── MyCom.h
│ │ │ │ │ ├── MyException.h
│ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ ├── MyString.h
│ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ ├── MyVector.h
│ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ ├── Types.h
│ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ └── Wildcard.h
│ │ │ │ └── Windows/
│ │ │ │ ├── DLL.cpp
│ │ │ │ ├── DLL.h
│ │ │ │ ├── Defs.h
│ │ │ │ ├── Error.cpp
│ │ │ │ ├── Error.h
│ │ │ │ ├── FileDir.cpp
│ │ │ │ ├── FileDir.h
│ │ │ │ ├── FileFind.cpp
│ │ │ │ ├── FileFind.h
│ │ │ │ ├── FileIO.cpp
│ │ │ │ ├── FileIO.h
│ │ │ │ ├── FileMapping.cpp
│ │ │ │ ├── FileMapping.h
│ │ │ │ ├── FileName.cpp
│ │ │ │ ├── FileName.h
│ │ │ │ ├── Handle.h
│ │ │ │ ├── MemoryLock.cpp
│ │ │ │ ├── MemoryLock.h
│ │ │ │ ├── PropVariant.cpp
│ │ │ │ ├── PropVariant.h
│ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ ├── PropVariantConversions.h
│ │ │ │ ├── StdAfx.h
│ │ │ │ ├── Synchronization.cpp
│ │ │ │ ├── Synchronization.h
│ │ │ │ ├── System.cpp
│ │ │ │ ├── System.h
│ │ │ │ ├── Thread.h
│ │ │ │ └── Time.h
│ │ │ ├── Makefile
│ │ │ ├── sqlzma.h
│ │ │ ├── sqmagic.h
│ │ │ └── squashfs3.2-r2/
│ │ │ ├── ACKNOWLEDGEMENTS
│ │ │ ├── CHANGES
│ │ │ ├── COPYING
│ │ │ ├── INSTALL
│ │ │ ├── OLD-READMEs/
│ │ │ │ ├── README-2.0
│ │ │ │ ├── README-2.1
│ │ │ │ ├── README-3.0
│ │ │ │ ├── README-3.1
│ │ │ │ └── README-AMD64
│ │ │ ├── PERFORMANCE.README
│ │ │ ├── README
│ │ │ ├── README-3.2
│ │ │ ├── sqlzma2u-3.2-r2.patch
│ │ │ └── squashfs-tools/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.2-r2-rtn12/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── lzma_src/
│ │ │ │ └── C/
│ │ │ │ ├── Alloc.h
│ │ │ │ ├── LzFind.c
│ │ │ │ ├── LzFind.h
│ │ │ │ ├── LzHash.h
│ │ │ │ ├── LzmaDec.c
│ │ │ │ ├── LzmaDec.h
│ │ │ │ ├── LzmaEnc.c
│ │ │ │ ├── LzmaEnc.h
│ │ │ │ └── Types.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── sqlzma.c
│ │ │ ├── sqlzma.h
│ │ │ ├── sqmagic.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.2-r2-wnr1000/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── lzma_src/
│ │ │ │ └── C/
│ │ │ │ ├── Alloc.h
│ │ │ │ ├── LzFind.c
│ │ │ │ ├── LzFind.h
│ │ │ │ ├── LzHash.h
│ │ │ │ ├── LzmaDec.c
│ │ │ │ ├── LzmaDec.h
│ │ │ │ ├── LzmaEnc.c
│ │ │ │ ├── LzmaEnc.h
│ │ │ │ └── Types.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── sqlzma.c
│ │ │ ├── sqlzma.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.3/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── sqmagic.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.3-grml-lzma/
│ │ │ ├── .tmpdeps
│ │ │ ├── .topdeps
│ │ │ ├── .topmsg
│ │ │ ├── Makefile
│ │ │ ├── debian/
│ │ │ │ ├── changelog
│ │ │ │ ├── compat
│ │ │ │ ├── control
│ │ │ │ ├── control.modules.in
│ │ │ │ ├── copyright
│ │ │ │ ├── doc/
│ │ │ │ │ ├── en/
│ │ │ │ │ │ ├── mksquashfs.dbk
│ │ │ │ │ │ └── unsquashfs.dbk
│ │ │ │ │ └── po/
│ │ │ │ │ ├── mksquashfs.fr.add
│ │ │ │ │ ├── mksquashfs.fr.po
│ │ │ │ │ ├── mksquashfs.pot
│ │ │ │ │ └── po4a.cfg
│ │ │ │ ├── rules
│ │ │ │ ├── rules.modules
│ │ │ │ ├── squashfs-lzma-source.NEWS
│ │ │ │ ├── squashfs-lzma-source.README.Debian
│ │ │ │ ├── squashfs-lzma-source.docs
│ │ │ │ ├── squashfs-lzma-source.links
│ │ │ │ ├── squashfs-lzma-tools.README.Debian
│ │ │ │ ├── squashfs-lzma-tools.dirs
│ │ │ │ ├── squashfs-lzma-tools.install
│ │ │ │ ├── squashfs-lzma-tools.manpages
│ │ │ │ └── watch
│ │ │ ├── ksquashfs/
│ │ │ │ ├── fs/
│ │ │ │ │ └── squashfs/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── inode.c
│ │ │ │ │ ├── squashfs.h
│ │ │ │ │ └── squashfs2_0.c
│ │ │ │ └── include/
│ │ │ │ └── linux/
│ │ │ │ ├── squashfs_fs.h
│ │ │ │ ├── squashfs_fs_i.h
│ │ │ │ └── squashfs_fs_sb.h
│ │ │ ├── lzma/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zCrcT8.c
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ │ ├── BranchTypes.h
│ │ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ │ ├── BranchX86_2.c
│ │ │ │ │ │ │ └── BranchX86_2.h
│ │ │ │ │ │ ├── Huffman/
│ │ │ │ │ │ │ ├── HuffmanEncode.c
│ │ │ │ │ │ │ └── HuffmanEncode.h
│ │ │ │ │ │ ├── Lz/
│ │ │ │ │ │ │ ├── LzHash.h
│ │ │ │ │ │ │ ├── MatchFinder.c
│ │ │ │ │ │ │ ├── MatchFinder.h
│ │ │ │ │ │ │ ├── MatchFinderMt.c
│ │ │ │ │ │ │ └── MatchFinderMt.h
│ │ │ │ │ │ └── Lzma/
│ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ ├── LzmaTypes.h
│ │ │ │ │ │ ├── kmod/
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ └── module.c
│ │ │ │ │ │ ├── kmod.mk
│ │ │ │ │ │ ├── sqlzma.mk
│ │ │ │ │ │ ├── testflags.c
│ │ │ │ │ │ └── uncomp.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── IStream.h
│ │ │ │ │ ├── Sort.c
│ │ │ │ │ ├── Sort.h
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ └── Types.h
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ └── ParseProperties.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ └── IArchive.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ │ ├── BCJ2Register.cpp
│ │ │ │ │ │ │ │ ├── BCJRegister.cpp
│ │ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ │ ├── ByteSwap/
│ │ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── Copy/
│ │ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ │ ├── LZMARegister.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── comp.cc
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ │ └── sqlzma.mk
│ │ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── afxres.h
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── LGPL.txt
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── sqlzma.h
│ │ │ ├── sqlzma.txt
│ │ │ ├── sqlzma1-449.patch
│ │ │ ├── sqlzma2k-3.3.patch
│ │ │ ├── sqlzma2u-3.3.patch
│ │ │ ├── sqmagic.h
│ │ │ └── squashfs3.3/
│ │ │ ├── ACKNOWLEDGEMENTS
│ │ │ ├── CHANGES
│ │ │ ├── COPYING
│ │ │ ├── INSTALL
│ │ │ ├── OLD-READMEs/
│ │ │ │ ├── README-2.0
│ │ │ │ ├── README-2.1
│ │ │ │ ├── README-3.0
│ │ │ │ ├── README-3.1
│ │ │ │ ├── README-3.2
│ │ │ │ └── README-AMD64
│ │ │ ├── PERFORMANCE.README
│ │ │ ├── README
│ │ │ ├── README-3.3
│ │ │ ├── kernel-patches/
│ │ │ │ ├── linux-2.6.10/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.12/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.14/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.16/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.18/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.20/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.22/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.23/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.24/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ ├── linux-2.6.6/
│ │ │ │ │ └── squashfs3.3-patch
│ │ │ │ └── linux-2.6.8.1/
│ │ │ │ └── squashfs3.3-patch
│ │ │ └── squashfs-tools/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.3-lzma/
│ │ │ ├── C/
│ │ │ │ ├── 7zCrc.c
│ │ │ │ ├── 7zCrc.h
│ │ │ │ ├── 7zCrcT8.c
│ │ │ │ ├── Alloc.c
│ │ │ │ ├── Alloc.h
│ │ │ │ ├── Archive/
│ │ │ │ │ └── 7z/
│ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ ├── makefile
│ │ │ │ │ └── makefile.gcc
│ │ │ │ ├── Compress/
│ │ │ │ │ ├── Branch/
│ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ ├── BranchTypes.h
│ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ ├── BranchX86_2.c
│ │ │ │ │ │ └── BranchX86_2.h
│ │ │ │ │ ├── Huffman/
│ │ │ │ │ │ ├── HuffmanEncode.c
│ │ │ │ │ │ └── HuffmanEncode.h
│ │ │ │ │ ├── Lz/
│ │ │ │ │ │ ├── LzHash.h
│ │ │ │ │ │ ├── MatchFinder.c
│ │ │ │ │ │ ├── MatchFinder.h
│ │ │ │ │ │ ├── MatchFinderMt.c
│ │ │ │ │ │ └── MatchFinderMt.h
│ │ │ │ │ └── Lzma/
│ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ ├── LzmaTypes.h
│ │ │ │ │ ├── kmod/
│ │ │ │ │ │ └── uncomp.c
│ │ │ │ │ ├── kmod.mk
│ │ │ │ │ ├── sqlzma.mk
│ │ │ │ │ ├── testflags.c
│ │ │ │ │ └── uncomp.c
│ │ │ │ ├── CpuArch.h
│ │ │ │ ├── IStream.h
│ │ │ │ ├── Sort.c
│ │ │ │ ├── Sort.h
│ │ │ │ ├── Threads.c
│ │ │ │ ├── Threads.h
│ │ │ │ └── Types.h
│ │ │ ├── CPP/
│ │ │ │ ├── 7zip/
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ └── ParseProperties.h
│ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ └── IArchive.h
│ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ ├── BCJ2Register.cpp
│ │ │ │ │ │ │ ├── BCJRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ ├── ByteSwap/
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ ├── Copy/
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ ├── LZMARegister.cpp
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── comp.cc
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ └── sqlzma.mk
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── ICoder.h
│ │ │ │ │ ├── IDecl.h
│ │ │ │ │ ├── IPassword.h
│ │ │ │ │ ├── IProgress.h
│ │ │ │ │ ├── IStream.h
│ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ ├── PropID.h
│ │ │ │ │ └── UI/
│ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ └── Console/
│ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ ├── List.cpp
│ │ │ │ │ ├── List.h
│ │ │ │ │ ├── Main.cpp
│ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ └── afxres.h
│ │ │ │ ├── Build.mak
│ │ │ │ ├── Common/
│ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ ├── Buffer.h
│ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ ├── ComTry.h
│ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ ├── IntToString.h
│ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ ├── MyCom.h
│ │ │ │ │ ├── MyException.h
│ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ ├── MyString.h
│ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ ├── MyVector.h
│ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ ├── Types.h
│ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ └── Wildcard.h
│ │ │ │ └── Windows/
│ │ │ │ ├── DLL.cpp
│ │ │ │ ├── DLL.h
│ │ │ │ ├── Defs.h
│ │ │ │ ├── Error.cpp
│ │ │ │ ├── Error.h
│ │ │ │ ├── FileDir.cpp
│ │ │ │ ├── FileDir.h
│ │ │ │ ├── FileFind.cpp
│ │ │ │ ├── FileFind.h
│ │ │ │ ├── FileIO.cpp
│ │ │ │ ├── FileIO.h
│ │ │ │ ├── FileMapping.cpp
│ │ │ │ ├── FileMapping.h
│ │ │ │ ├── FileName.cpp
│ │ │ │ ├── FileName.h
│ │ │ │ ├── Handle.h
│ │ │ │ ├── MemoryLock.cpp
│ │ │ │ ├── MemoryLock.h
│ │ │ │ ├── PropVariant.cpp
│ │ │ │ ├── PropVariant.h
│ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ ├── PropVariantConversions.h
│ │ │ │ ├── StdAfx.h
│ │ │ │ ├── Synchronization.cpp
│ │ │ │ ├── Synchronization.h
│ │ │ │ ├── System.cpp
│ │ │ │ ├── System.h
│ │ │ │ ├── Thread.h
│ │ │ │ └── Time.h
│ │ │ ├── Makefile
│ │ │ ├── sqlzma.h
│ │ │ ├── sqmagic.h
│ │ │ ├── squashfs3.3/
│ │ │ │ └── squashfs-tools/
│ │ │ │ ├── Makefile
│ │ │ │ ├── global.h
│ │ │ │ ├── mksquashfs.c
│ │ │ │ ├── mksquashfs.h
│ │ │ │ ├── read_fs.c
│ │ │ │ ├── read_fs.h
│ │ │ │ ├── sort.c
│ │ │ │ ├── sort.h
│ │ │ │ ├── squashfs_fs.h
│ │ │ │ └── unsquashfs.c
│ │ │ └── unuse/
│ │ │ ├── CS/
│ │ │ │ └── 7zip/
│ │ │ │ ├── Common/
│ │ │ │ │ ├── CRC.cs
│ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ └── OutBuffer.cs
│ │ │ │ ├── Compress/
│ │ │ │ │ ├── LZ/
│ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ └── RangeCoder/
│ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ └── ICoder.cs
│ │ │ └── Java/
│ │ │ └── SevenZip/
│ │ │ ├── CRC.java
│ │ │ ├── Compression/
│ │ │ │ ├── LZ/
│ │ │ │ │ ├── BinTree.java
│ │ │ │ │ ├── InWindow.java
│ │ │ │ │ └── OutWindow.java
│ │ │ │ ├── LZMA/
│ │ │ │ │ ├── Base.java
│ │ │ │ │ ├── Decoder.java
│ │ │ │ │ └── Encoder.java
│ │ │ │ └── RangeCoder/
│ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ ├── Decoder.java
│ │ │ │ └── Encoder.java
│ │ │ ├── ICodeProgress.java
│ │ │ ├── LzmaAlone.java
│ │ │ └── LzmaBench.java
│ │ ├── squashfs-3.4-cisco/
│ │ │ ├── Makefile
│ │ │ ├── lzma/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zBuf.c
│ │ │ │ │ ├── 7zBuf.h
│ │ │ │ │ ├── 7zBuf2.c
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zFile.c
│ │ │ │ │ ├── 7zFile.h
│ │ │ │ │ ├── 7zStream.c
│ │ │ │ │ ├── 7zVersion.h
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7z.dsp
│ │ │ │ │ │ ├── 7z.dsw
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Bcj2.c
│ │ │ │ │ ├── Bcj2.h
│ │ │ │ │ ├── Bra.c
│ │ │ │ │ ├── Bra.h
│ │ │ │ │ ├── Bra86.c
│ │ │ │ │ ├── BraIA64.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── LzFind.c
│ │ │ │ │ ├── LzFind.h
│ │ │ │ │ ├── LzFindMt.c
│ │ │ │ │ ├── LzFindMt.h
│ │ │ │ │ ├── LzHash.h
│ │ │ │ │ ├── LzmaDec.c
│ │ │ │ │ ├── LzmaDec.h
│ │ │ │ │ ├── LzmaEnc.c
│ │ │ │ │ ├── LzmaEnc.h
│ │ │ │ │ ├── LzmaLib/
│ │ │ │ │ │ ├── LzmaLib.def
│ │ │ │ │ │ ├── LzmaLib.dsp
│ │ │ │ │ │ ├── LzmaLib.dsw
│ │ │ │ │ │ ├── LzmaLibExports.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── LzmaLib.c
│ │ │ │ │ ├── LzmaLib.h
│ │ │ │ │ ├── LzmaUtil/
│ │ │ │ │ │ ├── Lzma86Dec.c
│ │ │ │ │ │ ├── Lzma86Dec.h
│ │ │ │ │ │ ├── Lzma86Enc.c
│ │ │ │ │ │ ├── Lzma86Enc.h
│ │ │ │ │ │ ├── LzmaUtil.c
│ │ │ │ │ │ ├── LzmaUtil.dsp
│ │ │ │ │ │ ├── LzmaUtil.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ └── Types.h
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ ├── ParseProperties.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ ├── IArchive.h
│ │ │ │ │ │ │ ├── Lzma/
│ │ │ │ │ │ │ │ ├── LzmaArcRegister.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.h
│ │ │ │ │ │ │ │ ├── LzmaHandler.cpp
│ │ │ │ │ │ │ │ ├── LzmaHandler.h
│ │ │ │ │ │ │ │ ├── LzmaIn.cpp
│ │ │ │ │ │ │ │ ├── LzmaIn.h
│ │ │ │ │ │ │ │ ├── LzmaItem.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Split/
│ │ │ │ │ │ │ │ ├── SplitHandler.cpp
│ │ │ │ │ │ │ │ ├── SplitHandler.h
│ │ │ │ │ │ │ │ ├── SplitHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── SplitRegister.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Bcj2Coder.cpp
│ │ │ │ │ │ │ ├── Bcj2Coder.h
│ │ │ │ │ │ │ ├── Bcj2Register.cpp
│ │ │ │ │ │ │ ├── BcjCoder.cpp
│ │ │ │ │ │ │ ├── BcjCoder.h
│ │ │ │ │ │ │ ├── BcjRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchMisc.cpp
│ │ │ │ │ │ │ ├── BranchMisc.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LzmaDecoder.cpp
│ │ │ │ │ │ │ ├── LzmaDecoder.h
│ │ │ │ │ │ │ ├── LzmaEncoder.cpp
│ │ │ │ │ │ │ ├── LzmaEncoder.h
│ │ │ │ │ │ │ ├── LzmaRegister.cpp
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ ├── Time.cpp
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ ├── lzma.txt
│ │ │ │ ├── lzma465.tar.bz2
│ │ │ │ └── patches/
│ │ │ │ └── lzma465-squashfs.patch
│ │ │ └── squashfs-tools/
│ │ │ ├── Makefile
│ │ │ ├── global.h
│ │ │ ├── lzmainterface.c
│ │ │ ├── lzmainterface.h
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_fs.h
│ │ │ └── unsquashfs.c
│ │ ├── squashfs-3.4-nb4/
│ │ │ ├── Makefile
│ │ │ ├── README.txt
│ │ │ ├── lzma465/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zBuf.c
│ │ │ │ │ ├── 7zBuf.h
│ │ │ │ │ ├── 7zBuf2.c
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zFile.c
│ │ │ │ │ ├── 7zFile.h
│ │ │ │ │ ├── 7zStream.c
│ │ │ │ │ ├── 7zVersion.h
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7z.dsp
│ │ │ │ │ │ ├── 7z.dsw
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Bcj2.c
│ │ │ │ │ ├── Bcj2.h
│ │ │ │ │ ├── Bra.c
│ │ │ │ │ ├── Bra.h
│ │ │ │ │ ├── Bra86.c
│ │ │ │ │ ├── BraIA64.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── LzFind.c
│ │ │ │ │ ├── LzFind.h
│ │ │ │ │ ├── LzFindMt.c
│ │ │ │ │ ├── LzFindMt.h
│ │ │ │ │ ├── LzHash.h
│ │ │ │ │ ├── LzmaDec.c
│ │ │ │ │ ├── LzmaDec.h
│ │ │ │ │ ├── LzmaEnc.c
│ │ │ │ │ ├── LzmaEnc.h
│ │ │ │ │ ├── LzmaLib/
│ │ │ │ │ │ ├── LzmaLib.def
│ │ │ │ │ │ ├── LzmaLib.dsp
│ │ │ │ │ │ ├── LzmaLib.dsw
│ │ │ │ │ │ ├── LzmaLibExports.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── LzmaLib.c
│ │ │ │ │ ├── LzmaLib.h
│ │ │ │ │ ├── LzmaUtil/
│ │ │ │ │ │ ├── Lzma86Dec.c
│ │ │ │ │ │ ├── Lzma86Dec.h
│ │ │ │ │ │ ├── Lzma86Enc.c
│ │ │ │ │ │ ├── Lzma86Enc.h
│ │ │ │ │ │ ├── LzmaUtil.c
│ │ │ │ │ │ ├── LzmaUtil.dsp
│ │ │ │ │ │ ├── LzmaUtil.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ ├── Types.h
│ │ │ │ │ ├── sqlzma.mk
│ │ │ │ │ └── uncomp.c
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ ├── ParseProperties.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ ├── IArchive.h
│ │ │ │ │ │ │ ├── Lzma/
│ │ │ │ │ │ │ │ ├── LzmaArcRegister.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.h
│ │ │ │ │ │ │ │ ├── LzmaHandler.cpp
│ │ │ │ │ │ │ │ ├── LzmaHandler.h
│ │ │ │ │ │ │ │ ├── LzmaIn.cpp
│ │ │ │ │ │ │ │ ├── LzmaIn.h
│ │ │ │ │ │ │ │ ├── LzmaItem.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Split/
│ │ │ │ │ │ │ │ ├── SplitHandler.cpp
│ │ │ │ │ │ │ │ ├── SplitHandler.h
│ │ │ │ │ │ │ │ ├── SplitHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── SplitRegister.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Bcj2Coder.cpp
│ │ │ │ │ │ │ ├── Bcj2Coder.h
│ │ │ │ │ │ │ ├── Bcj2Register.cpp
│ │ │ │ │ │ │ ├── BcjCoder.cpp
│ │ │ │ │ │ │ ├── BcjCoder.h
│ │ │ │ │ │ │ ├── BcjRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchMisc.cpp
│ │ │ │ │ │ │ ├── BranchMisc.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── comp.cc
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ ├── makefile.gcc
│ │ │ │ │ │ │ │ └── sqlzma.mk
│ │ │ │ │ │ │ ├── LzmaDecoder.cpp
│ │ │ │ │ │ │ ├── LzmaDecoder.h
│ │ │ │ │ │ │ ├── LzmaEncoder.cpp
│ │ │ │ │ │ │ ├── LzmaEncoder.h
│ │ │ │ │ │ │ ├── LzmaRegister.cpp
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ ├── Time.cpp
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── mksquashfs
│ │ │ ├── sqlzma.h
│ │ │ ├── sqmagic.h
│ │ │ ├── squashfs3.4/
│ │ │ │ ├── ACKNOWLEDGEMENTS
│ │ │ │ ├── CHANGES
│ │ │ │ ├── COPYING
│ │ │ │ ├── INSTALL
│ │ │ │ ├── OLD-READMEs/
│ │ │ │ │ ├── README-2.0
│ │ │ │ │ ├── README-2.1
│ │ │ │ │ ├── README-3.0
│ │ │ │ │ ├── README-3.1
│ │ │ │ │ ├── README-3.2
│ │ │ │ │ ├── README-3.3
│ │ │ │ │ └── README-AMD64
│ │ │ │ ├── PERFORMANCE.README
│ │ │ │ ├── README
│ │ │ │ ├── kernel-patches/
│ │ │ │ │ ├── README
│ │ │ │ │ ├── linux-2.6.12/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.14/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.16/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.18/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.20/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.22/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.23/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.24/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.25/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.26/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ ├── linux-2.6.27-rc4/
│ │ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ │ └── linux-2.6.27-rc4-next/
│ │ │ │ │ └── squashfs3.4-patch
│ │ │ │ └── squashfs-tools/
│ │ │ │ ├── Makefile
│ │ │ │ ├── global.h
│ │ │ │ ├── mksquashfs.c
│ │ │ │ ├── mksquashfs.h
│ │ │ │ ├── read_fs.c
│ │ │ │ ├── read_fs.h
│ │ │ │ ├── sort.c
│ │ │ │ ├── sort.h
│ │ │ │ ├── squashfs_fs.h
│ │ │ │ └── unsquashfs.c
│ │ │ └── unsquashfs-lzma
│ │ ├── squashfs-4.0-lzma/
│ │ │ ├── Makefile
│ │ │ ├── README-4.0
│ │ │ ├── global.h
│ │ │ ├── lzma/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zBuf.c
│ │ │ │ │ ├── 7zBuf.h
│ │ │ │ │ ├── 7zBuf2.c
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zFile.c
│ │ │ │ │ ├── 7zFile.h
│ │ │ │ │ ├── 7zStream.c
│ │ │ │ │ ├── 7zVersion.h
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7z.dsp
│ │ │ │ │ │ ├── 7z.dsw
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Bcj2.c
│ │ │ │ │ ├── Bcj2.h
│ │ │ │ │ ├── Bra.c
│ │ │ │ │ ├── Bra.h
│ │ │ │ │ ├── Bra86.c
│ │ │ │ │ ├── BraIA64.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── LzFind.c
│ │ │ │ │ ├── LzFind.h
│ │ │ │ │ ├── LzFindMt.c
│ │ │ │ │ ├── LzFindMt.h
│ │ │ │ │ ├── LzHash.h
│ │ │ │ │ ├── LzmaDec.c
│ │ │ │ │ ├── LzmaDec.h
│ │ │ │ │ ├── LzmaEnc.c
│ │ │ │ │ ├── LzmaEnc.h
│ │ │ │ │ ├── LzmaLib/
│ │ │ │ │ │ ├── LzmaLib.def
│ │ │ │ │ │ ├── LzmaLib.dsp
│ │ │ │ │ │ ├── LzmaLib.dsw
│ │ │ │ │ │ ├── LzmaLibExports.c
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── LzmaLib.c
│ │ │ │ │ ├── LzmaLib.h
│ │ │ │ │ ├── LzmaUtil/
│ │ │ │ │ │ ├── Lzma86Dec.c
│ │ │ │ │ │ ├── Lzma86Dec.h
│ │ │ │ │ │ ├── Lzma86Enc.c
│ │ │ │ │ │ ├── Lzma86Enc.h
│ │ │ │ │ │ ├── LzmaUtil.c
│ │ │ │ │ │ ├── LzmaUtil.dsp
│ │ │ │ │ │ ├── LzmaUtil.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ └── Types.h
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ ├── ParseProperties.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ ├── IArchive.h
│ │ │ │ │ │ │ ├── Lzma/
│ │ │ │ │ │ │ │ ├── LzmaArcRegister.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.h
│ │ │ │ │ │ │ │ ├── LzmaHandler.cpp
│ │ │ │ │ │ │ │ ├── LzmaHandler.h
│ │ │ │ │ │ │ │ ├── LzmaIn.cpp
│ │ │ │ │ │ │ │ ├── LzmaIn.h
│ │ │ │ │ │ │ │ ├── LzmaItem.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Split/
│ │ │ │ │ │ │ │ ├── SplitHandler.cpp
│ │ │ │ │ │ │ │ ├── SplitHandler.h
│ │ │ │ │ │ │ │ ├── SplitHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── SplitRegister.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Bcj2Coder.cpp
│ │ │ │ │ │ │ ├── Bcj2Coder.h
│ │ │ │ │ │ │ ├── Bcj2Register.cpp
│ │ │ │ │ │ │ ├── BcjCoder.cpp
│ │ │ │ │ │ │ ├── BcjCoder.h
│ │ │ │ │ │ │ ├── BcjRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchMisc.cpp
│ │ │ │ │ │ │ ├── BranchMisc.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LzmaDecoder.cpp
│ │ │ │ │ │ │ ├── LzmaDecoder.h
│ │ │ │ │ │ │ ├── LzmaEncoder.cpp
│ │ │ │ │ │ │ ├── LzmaEncoder.h
│ │ │ │ │ │ │ ├── LzmaRegister.cpp
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ ├── Time.cpp
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.c.orig
│ │ │ ├── mksquashfs.h
│ │ │ ├── pseudo.c
│ │ │ ├── pseudo.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_compat.h
│ │ │ ├── squashfs_fs.h
│ │ │ ├── squashfs_swap.h
│ │ │ ├── swap.c
│ │ │ ├── uncompress.c
│ │ │ ├── uncompress.h
│ │ │ ├── unsquash-1.c
│ │ │ ├── unsquash-2.c
│ │ │ ├── unsquash-3.c
│ │ │ ├── unsquash-4.c
│ │ │ ├── unsquashfs.c
│ │ │ └── unsquashfs.h
│ │ ├── squashfs-4.0-realtek/
│ │ │ ├── Makefile
│ │ │ ├── compressor.c
│ │ │ ├── compressor.h
│ │ │ ├── global.h
│ │ │ ├── gzip_wrapper.c
│ │ │ ├── lzma/
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zBuf.c
│ │ │ │ │ ├── 7zBuf.h
│ │ │ │ │ ├── 7zBuf2.c
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zFile.c
│ │ │ │ │ ├── 7zFile.h
│ │ │ │ │ ├── 7zStream.c
│ │ │ │ │ ├── 7zVersion.h
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7z.dsp
│ │ │ │ │ │ ├── 7z.dsw
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Bcj2.c
│ │ │ │ │ ├── Bcj2.h
│ │ │ │ │ ├── Bra.c
│ │ │ │ │ ├── Bra.h
│ │ │ │ │ ├── Bra86.c
│ │ │ │ │ ├── BraIA64.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── LzFind.c
│ │ │ │ │ ├── LzFind.h
│ │ │ │ │ ├── LzFindMt.c
│ │ │ │ │ ├── LzFindMt.h
│ │ │ │ │ ├── LzHash.h
│ │ │ │ │ ├── LzmaDec.c
│ │ │ │ │ ├── LzmaDec.h
│ │ │ │ │ ├── LzmaEnc.c
│ │ │ │ │ ├── LzmaEnc.h
│ │ │ │ │ ├── LzmaLib/
│ │ │ │ │ │ ├── LzmaLib.def
│ │ │ │ │ │ ├── LzmaLib.dsp
│ │ │ │ │ │ ├── LzmaLib.dsw
│ │ │ │ │ │ ├── LzmaLibExports.c
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── LzmaLib.c
│ │ │ │ │ ├── LzmaLib.h
│ │ │ │ │ ├── LzmaUtil/
│ │ │ │ │ │ ├── Lzma86Dec.c
│ │ │ │ │ │ ├── Lzma86Dec.h
│ │ │ │ │ │ ├── Lzma86Enc.c
│ │ │ │ │ │ ├── Lzma86Enc.h
│ │ │ │ │ │ ├── LzmaUtil.c
│ │ │ │ │ │ ├── LzmaUtil.dsp
│ │ │ │ │ │ ├── LzmaUtil.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ └── Types.h
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ ├── ParseProperties.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ ├── IArchive.h
│ │ │ │ │ │ │ ├── Lzma/
│ │ │ │ │ │ │ │ ├── LzmaArcRegister.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.h
│ │ │ │ │ │ │ │ ├── LzmaHandler.cpp
│ │ │ │ │ │ │ │ ├── LzmaHandler.h
│ │ │ │ │ │ │ │ ├── LzmaIn.cpp
│ │ │ │ │ │ │ │ ├── LzmaIn.h
│ │ │ │ │ │ │ │ ├── LzmaItem.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Split/
│ │ │ │ │ │ │ │ ├── SplitHandler.cpp
│ │ │ │ │ │ │ │ ├── SplitHandler.h
│ │ │ │ │ │ │ │ ├── SplitHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── SplitRegister.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Bcj2Coder.cpp
│ │ │ │ │ │ │ ├── Bcj2Coder.h
│ │ │ │ │ │ │ ├── Bcj2Register.cpp
│ │ │ │ │ │ │ ├── BcjCoder.cpp
│ │ │ │ │ │ │ ├── BcjCoder.h
│ │ │ │ │ │ │ ├── BcjRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchMisc.cpp
│ │ │ │ │ │ │ ├── BranchMisc.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LzmaDecoder.cpp
│ │ │ │ │ │ │ ├── LzmaDecoder.h
│ │ │ │ │ │ │ ├── LzmaEncoder.cpp
│ │ │ │ │ │ │ ├── LzmaEncoder.h
│ │ │ │ │ │ │ ├── LzmaRegister.cpp
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ ├── Time.cpp
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── lzma_wrapper.c
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── pseudo.c
│ │ │ ├── pseudo.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_compat.h
│ │ │ ├── squashfs_fs.h
│ │ │ ├── squashfs_swap.h
│ │ │ ├── swap.c
│ │ │ ├── unsquash-1.c
│ │ │ ├── unsquash-2.c
│ │ │ ├── unsquash-3.c
│ │ │ ├── unsquash-4.c
│ │ │ ├── unsquashfs.c
│ │ │ └── unsquashfs.h
│ │ ├── squashfs-4.2/
│ │ │ ├── ACKNOWLEDGEMENTS
│ │ │ ├── CHANGES
│ │ │ ├── COPYING
│ │ │ ├── DONATIONS
│ │ │ ├── INSTALL
│ │ │ ├── Makefile
│ │ │ ├── OLD-READMEs/
│ │ │ │ ├── README-2.0
│ │ │ │ ├── README-2.1
│ │ │ │ ├── README-3.0
│ │ │ │ ├── README-3.1
│ │ │ │ ├── README-3.2
│ │ │ │ ├── README-3.3
│ │ │ │ ├── README-4.0
│ │ │ │ ├── README-4.1
│ │ │ │ └── README-AMD64
│ │ │ ├── PERFORMANCE.README
│ │ │ ├── README
│ │ │ ├── README-4.2
│ │ │ ├── lzma-4.65/
│ │ │ │ ├── .built
│ │ │ │ ├── .built_check
│ │ │ │ ├── .configured
│ │ │ │ ├── .prepared1a23cc84ca172080ca2c2f332cb31052
│ │ │ │ ├── .prepared1a23cc84ca172080ca2c2f332cb31052_check
│ │ │ │ ├── 7zC.txt
│ │ │ │ ├── 7zFormat.txt
│ │ │ │ ├── C/
│ │ │ │ │ ├── 7zBuf.c
│ │ │ │ │ ├── 7zBuf.h
│ │ │ │ │ ├── 7zBuf2.c
│ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ ├── 7zFile.c
│ │ │ │ │ ├── 7zFile.h
│ │ │ │ │ ├── 7zStream.c
│ │ │ │ │ ├── 7zVersion.h
│ │ │ │ │ ├── Alloc.c
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z/
│ │ │ │ │ │ ├── 7z.dsp
│ │ │ │ │ │ ├── 7z.dsw
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Bcj2.c
│ │ │ │ │ ├── Bcj2.h
│ │ │ │ │ ├── Bra.c
│ │ │ │ │ ├── Bra.h
│ │ │ │ │ ├── Bra86.c
│ │ │ │ │ ├── BraIA64.c
│ │ │ │ │ ├── CpuArch.h
│ │ │ │ │ ├── LzFind.c
│ │ │ │ │ ├── LzFind.h
│ │ │ │ │ ├── LzFindMt.c
│ │ │ │ │ ├── LzFindMt.h
│ │ │ │ │ ├── LzHash.h
│ │ │ │ │ ├── LzmaDec.c
│ │ │ │ │ ├── LzmaDec.h
│ │ │ │ │ ├── LzmaEnc.c
│ │ │ │ │ ├── LzmaEnc.h
│ │ │ │ │ ├── LzmaLib/
│ │ │ │ │ │ ├── LzmaLib.def
│ │ │ │ │ │ ├── LzmaLib.dsp
│ │ │ │ │ │ ├── LzmaLib.dsw
│ │ │ │ │ │ ├── LzmaLibExports.c
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── resource.rc
│ │ │ │ │ ├── LzmaLib.c
│ │ │ │ │ ├── LzmaLib.h
│ │ │ │ │ ├── LzmaUtil/
│ │ │ │ │ │ ├── Lzma86Dec.c
│ │ │ │ │ │ ├── Lzma86Dec.h
│ │ │ │ │ │ ├── Lzma86Enc.c
│ │ │ │ │ │ ├── Lzma86Enc.h
│ │ │ │ │ │ ├── LzmaUtil.c
│ │ │ │ │ │ ├── LzmaUtil.dsp
│ │ │ │ │ │ ├── LzmaUtil.dsw
│ │ │ │ │ │ ├── lzma
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Threads.c
│ │ │ │ │ ├── Threads.h
│ │ │ │ │ └── Types.h
│ │ │ │ ├── CPP/
│ │ │ │ │ ├── 7zip/
│ │ │ │ │ │ ├── Archive/
│ │ │ │ │ │ │ ├── 7z/
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.cpp
│ │ │ │ │ │ │ │ ├── 7zCompressionMode.h
│ │ │ │ │ │ │ │ ├── 7zDecode.cpp
│ │ │ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ │ │ ├── 7zEncode.cpp
│ │ │ │ │ │ │ │ ├── 7zEncode.h
│ │ │ │ │ │ │ │ ├── 7zExtract.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderInStream.h
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.cpp
│ │ │ │ │ │ │ │ ├── 7zFolderOutStream.h
│ │ │ │ │ │ │ │ ├── 7zHandler.cpp
│ │ │ │ │ │ │ │ ├── 7zHandler.h
│ │ │ │ │ │ │ │ ├── 7zHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.cpp
│ │ │ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ │ │ ├── 7zIn.cpp
│ │ │ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ │ │ ├── 7zOut.cpp
│ │ │ │ │ │ │ │ ├── 7zOut.h
│ │ │ │ │ │ │ │ ├── 7zProperties.cpp
│ │ │ │ │ │ │ │ ├── 7zProperties.h
│ │ │ │ │ │ │ │ ├── 7zRegister.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.cpp
│ │ │ │ │ │ │ │ ├── 7zSpecStream.h
│ │ │ │ │ │ │ │ ├── 7zUpdate.cpp
│ │ │ │ │ │ │ │ ├── 7zUpdate.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Archive.def
│ │ │ │ │ │ │ ├── Archive2.def
│ │ │ │ │ │ │ ├── ArchiveExports.cpp
│ │ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ │ ├── CoderMixer2.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2.h
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.cpp
│ │ │ │ │ │ │ │ ├── CoderMixer2MT.h
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.cpp
│ │ │ │ │ │ │ │ ├── CrossThreadProgress.h
│ │ │ │ │ │ │ │ ├── DummyOutStream.cpp
│ │ │ │ │ │ │ │ ├── DummyOutStream.h
│ │ │ │ │ │ │ │ ├── HandlerOut.cpp
│ │ │ │ │ │ │ │ ├── HandlerOut.h
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── InStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ItemNameUtils.cpp
│ │ │ │ │ │ │ │ ├── ItemNameUtils.h
│ │ │ │ │ │ │ │ ├── MultiStream.cpp
│ │ │ │ │ │ │ │ ├── MultiStream.h
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.cpp
│ │ │ │ │ │ │ │ ├── OutStreamWithCRC.h
│ │ │ │ │ │ │ │ ├── ParseProperties.cpp
│ │ │ │ │ │ │ │ ├── ParseProperties.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── DllExports2.cpp
│ │ │ │ │ │ │ ├── IArchive.h
│ │ │ │ │ │ │ ├── Lzma/
│ │ │ │ │ │ │ │ ├── LzmaArcRegister.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.cpp
│ │ │ │ │ │ │ │ ├── LzmaFiltersDecode.h
│ │ │ │ │ │ │ │ ├── LzmaHandler.cpp
│ │ │ │ │ │ │ │ ├── LzmaHandler.h
│ │ │ │ │ │ │ │ ├── LzmaIn.cpp
│ │ │ │ │ │ │ │ ├── LzmaIn.h
│ │ │ │ │ │ │ │ ├── LzmaItem.h
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ ├── Split/
│ │ │ │ │ │ │ │ ├── SplitHandler.cpp
│ │ │ │ │ │ │ │ ├── SplitHandler.h
│ │ │ │ │ │ │ │ ├── SplitHandlerOut.cpp
│ │ │ │ │ │ │ │ ├── SplitRegister.cpp
│ │ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── Bundles/
│ │ │ │ │ │ │ ├── Alone7z/
│ │ │ │ │ │ │ │ ├── Alone.dsp
│ │ │ │ │ │ │ │ ├── Alone.dsw
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ ├── Format7zExtractR/
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ │ └── Format7zR/
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── resource.rc
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── CreateCoder.cpp
│ │ │ │ │ │ │ ├── CreateCoder.h
│ │ │ │ │ │ │ ├── FilePathAutoRename.cpp
│ │ │ │ │ │ │ ├── FilePathAutoRename.h
│ │ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ │ ├── FilterCoder.cpp
│ │ │ │ │ │ │ ├── FilterCoder.h
│ │ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ │ ├── InOutTempBuffer.cpp
│ │ │ │ │ │ │ ├── InOutTempBuffer.h
│ │ │ │ │ │ │ ├── LimitedStreams.cpp
│ │ │ │ │ │ │ ├── LimitedStreams.h
│ │ │ │ │ │ │ ├── LockedStream.cpp
│ │ │ │ │ │ │ ├── LockedStream.h
│ │ │ │ │ │ │ ├── MethodId.cpp
│ │ │ │ │ │ │ ├── MethodId.h
│ │ │ │ │ │ │ ├── MethodProps.cpp
│ │ │ │ │ │ │ ├── MethodProps.h
│ │ │ │ │ │ │ ├── OffsetStream.cpp
│ │ │ │ │ │ │ ├── OffsetStream.h
│ │ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ │ ├── ProgressUtils.cpp
│ │ │ │ │ │ │ ├── ProgressUtils.h
│ │ │ │ │ │ │ ├── RegisterArc.h
│ │ │ │ │ │ │ ├── RegisterCodec.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── StreamBinder.cpp
│ │ │ │ │ │ │ ├── StreamBinder.h
│ │ │ │ │ │ │ ├── StreamObjects.cpp
│ │ │ │ │ │ │ ├── StreamObjects.h
│ │ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ │ ├── StreamUtils.h
│ │ │ │ │ │ │ ├── VirtThread.cpp
│ │ │ │ │ │ │ └── VirtThread.h
│ │ │ │ │ │ ├── Compress/
│ │ │ │ │ │ │ ├── Bcj2Coder.cpp
│ │ │ │ │ │ │ ├── Bcj2Coder.h
│ │ │ │ │ │ │ ├── Bcj2Register.cpp
│ │ │ │ │ │ │ ├── BcjCoder.cpp
│ │ │ │ │ │ │ ├── BcjCoder.h
│ │ │ │ │ │ │ ├── BcjRegister.cpp
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchMisc.cpp
│ │ │ │ │ │ │ ├── BranchMisc.h
│ │ │ │ │ │ │ ├── BranchRegister.cpp
│ │ │ │ │ │ │ ├── ByteSwap.cpp
│ │ │ │ │ │ │ ├── ByteSwap.h
│ │ │ │ │ │ │ ├── ByteSwapRegister.cpp
│ │ │ │ │ │ │ ├── CodecExports.cpp
│ │ │ │ │ │ │ ├── CopyCoder.cpp
│ │ │ │ │ │ │ ├── CopyCoder.h
│ │ │ │ │ │ │ ├── CopyRegister.cpp
│ │ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ │ ├── Exception.h
│ │ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.cpp
│ │ │ │ │ │ │ │ ├── LzmaBenchCon.h
│ │ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ │ ├── lzma
│ │ │ │ │ │ │ │ ├── lzma_alone
│ │ │ │ │ │ │ │ ├── lzma_version.h
│ │ │ │ │ │ │ │ ├── lzmp.cpp
│ │ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ │ ├── LzmaDecoder.cpp
│ │ │ │ │ │ │ ├── LzmaDecoder.h
│ │ │ │ │ │ │ ├── LzmaEncoder.cpp
│ │ │ │ │ │ │ ├── LzmaEncoder.h
│ │ │ │ │ │ │ ├── LzmaRegister.cpp
│ │ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── ICoder.h
│ │ │ │ │ │ ├── IDecl.h
│ │ │ │ │ │ ├── IPassword.h
│ │ │ │ │ │ ├── IProgress.h
│ │ │ │ │ │ ├── IStream.h
│ │ │ │ │ │ ├── MyVersion.h
│ │ │ │ │ │ ├── MyVersionInfo.rc
│ │ │ │ │ │ ├── PropID.h
│ │ │ │ │ │ └── UI/
│ │ │ │ │ │ ├── Client7z/
│ │ │ │ │ │ │ ├── Client7z.cpp
│ │ │ │ │ │ │ ├── Client7z.dsp
│ │ │ │ │ │ │ ├── Client7z.dsw
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ ├── Common/
│ │ │ │ │ │ │ ├── ArchiveCommandLine.cpp
│ │ │ │ │ │ │ ├── ArchiveCommandLine.h
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveExtractCallback.h
│ │ │ │ │ │ │ ├── ArchiveName.cpp
│ │ │ │ │ │ │ ├── ArchiveName.h
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.cpp
│ │ │ │ │ │ │ ├── ArchiveOpenCallback.h
│ │ │ │ │ │ │ ├── DefaultName.cpp
│ │ │ │ │ │ │ ├── DefaultName.h
│ │ │ │ │ │ │ ├── DirItem.h
│ │ │ │ │ │ │ ├── EnumDirItems.cpp
│ │ │ │ │ │ │ ├── EnumDirItems.h
│ │ │ │ │ │ │ ├── ExitCode.h
│ │ │ │ │ │ │ ├── Extract.cpp
│ │ │ │ │ │ │ ├── Extract.h
│ │ │ │ │ │ │ ├── ExtractMode.h
│ │ │ │ │ │ │ ├── ExtractingFilePath.cpp
│ │ │ │ │ │ │ ├── ExtractingFilePath.h
│ │ │ │ │ │ │ ├── IFileExtractCallback.h
│ │ │ │ │ │ │ ├── LoadCodecs.cpp
│ │ │ │ │ │ │ ├── LoadCodecs.h
│ │ │ │ │ │ │ ├── OpenArchive.cpp
│ │ │ │ │ │ │ ├── OpenArchive.h
│ │ │ │ │ │ │ ├── PropIDUtils.cpp
│ │ │ │ │ │ │ ├── PropIDUtils.h
│ │ │ │ │ │ │ ├── Property.h
│ │ │ │ │ │ │ ├── SetProperties.cpp
│ │ │ │ │ │ │ ├── SetProperties.h
│ │ │ │ │ │ │ ├── SortUtils.cpp
│ │ │ │ │ │ │ ├── SortUtils.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── TempFiles.cpp
│ │ │ │ │ │ │ ├── TempFiles.h
│ │ │ │ │ │ │ ├── Update.cpp
│ │ │ │ │ │ │ ├── Update.h
│ │ │ │ │ │ │ ├── UpdateAction.cpp
│ │ │ │ │ │ │ ├── UpdateAction.h
│ │ │ │ │ │ │ ├── UpdateCallback.cpp
│ │ │ │ │ │ │ ├── UpdateCallback.h
│ │ │ │ │ │ │ ├── UpdatePair.cpp
│ │ │ │ │ │ │ ├── UpdatePair.h
│ │ │ │ │ │ │ ├── UpdateProduce.cpp
│ │ │ │ │ │ │ ├── UpdateProduce.h
│ │ │ │ │ │ │ ├── WorkDir.cpp
│ │ │ │ │ │ │ ├── WorkDir.h
│ │ │ │ │ │ │ └── ZipRegistry.h
│ │ │ │ │ │ └── Console/
│ │ │ │ │ │ ├── ConsoleClose.cpp
│ │ │ │ │ │ ├── ConsoleClose.h
│ │ │ │ │ │ ├── ExtractCallbackConsole.cpp
│ │ │ │ │ │ ├── ExtractCallbackConsole.h
│ │ │ │ │ │ ├── List.cpp
│ │ │ │ │ │ ├── List.h
│ │ │ │ │ │ ├── Main.cpp
│ │ │ │ │ │ ├── MainAr.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.cpp
│ │ │ │ │ │ ├── OpenCallbackConsole.h
│ │ │ │ │ │ ├── PercentPrinter.cpp
│ │ │ │ │ │ ├── PercentPrinter.h
│ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── UpdateCallbackConsole.cpp
│ │ │ │ │ │ ├── UpdateCallbackConsole.h
│ │ │ │ │ │ ├── UserInputUtils.cpp
│ │ │ │ │ │ ├── UserInputUtils.h
│ │ │ │ │ │ └── makefile
│ │ │ │ │ ├── Build.mak
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoPtr.h
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ │ ├── ComTry.h
│ │ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ │ ├── Defs.h
│ │ │ │ │ │ ├── DynamicBuffer.h
│ │ │ │ │ │ ├── IntToString.cpp
│ │ │ │ │ │ ├── IntToString.h
│ │ │ │ │ │ ├── ListFileUtils.cpp
│ │ │ │ │ │ ├── ListFileUtils.h
│ │ │ │ │ │ ├── MyCom.h
│ │ │ │ │ │ ├── MyException.h
│ │ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ │ ├── MyString.cpp
│ │ │ │ │ │ ├── MyString.h
│ │ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ │ ├── MyVector.cpp
│ │ │ │ │ │ ├── MyVector.h
│ │ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StdInStream.cpp
│ │ │ │ │ │ ├── StdInStream.h
│ │ │ │ │ │ ├── StdOutStream.cpp
│ │ │ │ │ │ ├── StdOutStream.h
│ │ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ │ ├── Types.h
│ │ │ │ │ │ ├── UTFConvert.cpp
│ │ │ │ │ │ ├── UTFConvert.h
│ │ │ │ │ │ ├── Wildcard.cpp
│ │ │ │ │ │ └── Wildcard.h
│ │ │ │ │ └── Windows/
│ │ │ │ │ ├── DLL.cpp
│ │ │ │ │ ├── DLL.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Error.cpp
│ │ │ │ │ ├── Error.h
│ │ │ │ │ ├── FileDir.cpp
│ │ │ │ │ ├── FileDir.h
│ │ │ │ │ ├── FileFind.cpp
│ │ │ │ │ ├── FileFind.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ ├── FileMapping.cpp
│ │ │ │ │ ├── FileMapping.h
│ │ │ │ │ ├── FileName.cpp
│ │ │ │ │ ├── FileName.h
│ │ │ │ │ ├── Handle.h
│ │ │ │ │ ├── MemoryLock.cpp
│ │ │ │ │ ├── MemoryLock.h
│ │ │ │ │ ├── PropVariant.cpp
│ │ │ │ │ ├── PropVariant.h
│ │ │ │ │ ├── PropVariantConversions.cpp
│ │ │ │ │ ├── PropVariantConversions.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── Synchronization.cpp
│ │ │ │ │ ├── Synchronization.h
│ │ │ │ │ ├── System.cpp
│ │ │ │ │ ├── System.h
│ │ │ │ │ ├── Thread.h
│ │ │ │ │ ├── Time.cpp
│ │ │ │ │ └── Time.h
│ │ │ │ ├── CS/
│ │ │ │ │ └── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── CRC.cs
│ │ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ │ └── OutBuffer.cs
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ │ └── ICoder.cs
│ │ │ │ ├── Java/
│ │ │ │ │ └── SevenZip/
│ │ │ │ │ ├── CRC.java
│ │ │ │ │ ├── Compression/
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LzmaAlone.java
│ │ │ │ │ └── LzmaBench.java
│ │ │ │ ├── Methods.txt
│ │ │ │ ├── history.txt
│ │ │ │ └── lzma.txt
│ │ │ ├── pseudo-file.example
│ │ │ └── squashfs-tools/
│ │ │ ├── Makefile
│ │ │ ├── compressor.c
│ │ │ ├── compressor.h
│ │ │ ├── gzip_wrapper.c
│ │ │ ├── lzma_wrapper.c
│ │ │ ├── lzma_xz_options.c
│ │ │ ├── lzma_xz_options.h
│ │ │ ├── lzma_xz_wrapper.c
│ │ │ ├── lzo_wrapper.c
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── pseudo.c
│ │ │ ├── pseudo.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── read_xattrs.c
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_compat.h
│ │ │ ├── squashfs_fs.h
│ │ │ ├── squashfs_swap.h
│ │ │ ├── swap.c
│ │ │ ├── unsquash-1.c
│ │ │ ├── unsquash-2.c
│ │ │ ├── unsquash-3.c
│ │ │ ├── unsquash-4.c
│ │ │ ├── unsquashfs.c
│ │ │ ├── unsquashfs.h
│ │ │ ├── unsquashfs_xattr.c
│ │ │ ├── xattr.c
│ │ │ ├── xattr.h
│ │ │ ├── xz_wrapper.c
│ │ │ └── xz_wrapper.h
│ │ ├── squashfs-4.2-official/
│ │ │ ├── Makefile
│ │ │ ├── compressor.c
│ │ │ ├── compressor.h
│ │ │ ├── gzip_wrapper.c
│ │ │ ├── lzma_wrapper.c
│ │ │ ├── lzma_xz_wrapper.c
│ │ │ ├── lzo_wrapper.c
│ │ │ ├── mksquashfs.c
│ │ │ ├── mksquashfs.h
│ │ │ ├── pseudo.c
│ │ │ ├── pseudo.h
│ │ │ ├── read_fs.c
│ │ │ ├── read_fs.h
│ │ │ ├── read_xattrs.c
│ │ │ ├── sort.c
│ │ │ ├── sort.h
│ │ │ ├── squashfs_compat.h
│ │ │ ├── squashfs_fs.h
│ │ │ ├── squashfs_swap.h
│ │ │ ├── swap.c
│ │ │ ├── unsquash-1.c
│ │ │ ├── unsquash-2.c
│ │ │ ├── unsquash-3.c
│ │ │ ├── unsquash-4.c
│ │ │ ├── unsquashfs.c
│ │ │ ├── unsquashfs.h
│ │ │ ├── unsquashfs_xattr.c
│ │ │ ├── xattr.c
│ │ │ ├── xattr.h
│ │ │ ├── xz_wrapper.c
│ │ │ └── xz_wrapper.h
│ │ └── squashfs-hg55x-bin/
│ │ ├── README
│ │ └── unsquashfs
│ ├── splitter3.cc
│ ├── squashfs-2.1-r2/
│ │ ├── Makefile
│ │ ├── mksquashfs.c
│ │ ├── mksquashfs.h
│ │ ├── read_fs.c
│ │ ├── read_fs.h
│ │ ├── sort.c
│ │ ├── squashfs_fs.h
│ │ └── unsquashfs.c
│ ├── squashfs-3.0/
│ │ ├── Makefile
│ │ ├── global.h
│ │ ├── mksquashfs.c
│ │ ├── mksquashfs.h
│ │ ├── read_fs.c
│ │ ├── read_fs.h
│ │ ├── sort.c
│ │ ├── sort.h
│ │ ├── squashfs_fs.h
│ │ └── unsquashfs.c
│ ├── squashfs-3.0-lzma-damn-small-variant/
│ │ ├── Makefile
│ │ ├── global.h
│ │ ├── lzma/
│ │ │ ├── .built
│ │ │ ├── .unpacked
│ │ │ ├── 7zC.txt
│ │ │ ├── 7zFormat.txt
│ │ │ ├── C/
│ │ │ │ ├── 7zip/
│ │ │ │ │ ├── Archive/
│ │ │ │ │ │ └── 7z_C/
│ │ │ │ │ │ ├── 7zAlloc.c
│ │ │ │ │ │ ├── 7zAlloc.h
│ │ │ │ │ │ ├── 7zBuffer.c
│ │ │ │ │ │ ├── 7zBuffer.h
│ │ │ │ │ │ ├── 7zCrc.c
│ │ │ │ │ │ ├── 7zCrc.h
│ │ │ │ │ │ ├── 7zDecode.c
│ │ │ │ │ │ ├── 7zDecode.h
│ │ │ │ │ │ ├── 7zExtract.c
│ │ │ │ │ │ ├── 7zExtract.h
│ │ │ │ │ │ ├── 7zHeader.c
│ │ │ │ │ │ ├── 7zHeader.h
│ │ │ │ │ │ ├── 7zIn.c
│ │ │ │ │ │ ├── 7zIn.h
│ │ │ │ │ │ ├── 7zItem.c
│ │ │ │ │ │ ├── 7zItem.h
│ │ │ │ │ │ ├── 7zMain.c
│ │ │ │ │ │ ├── 7zMethodID.c
│ │ │ │ │ │ ├── 7zMethodID.h
│ │ │ │ │ │ ├── 7zTypes.h
│ │ │ │ │ │ ├── 7z_C.dsp
│ │ │ │ │ │ ├── 7z_C.dsw
│ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ ├── StreamUtils.cpp
│ │ │ │ │ │ └── StreamUtils.h
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ │ ├── BranchSPARC.c
│ │ │ │ │ │ │ ├── BranchSPARC.h
│ │ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ ├── SPARC.cpp
│ │ │ │ │ │ │ ├── SPARC.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree/
│ │ │ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ │ │ ├── BinTree4b.h
│ │ │ │ │ │ │ │ └── BinTreeMain.h
│ │ │ │ │ │ │ ├── HashChain/
│ │ │ │ │ │ │ │ ├── HC.h
│ │ │ │ │ │ │ │ ├── HC2.h
│ │ │ │ │ │ │ │ ├── HC3.h
│ │ │ │ │ │ │ │ ├── HC4.h
│ │ │ │ │ │ │ │ ├── HC4b.h
│ │ │ │ │ │ │ │ └── HCMain.h
│ │ │ │ │ │ │ ├── IMatchFinder.h
│ │ │ │ │ │ │ ├── LZInWindow.cpp
│ │ │ │ │ │ │ ├── LZInWindow.h
│ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ ├── Patricia/
│ │ │ │ │ │ │ │ ├── Pat.h
│ │ │ │ │ │ │ │ ├── Pat2.h
│ │ │ │ │ │ │ │ ├── Pat2H.h
│ │ │ │ │ │ │ │ ├── Pat2R.h
│ │ │ │ │ │ │ │ ├── Pat3H.h
│ │ │ │ │ │ │ │ ├── Pat4H.h
│ │ │ │ │ │ │ │ └── PatMain.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ ├── LzmaRam.cpp
│ │ │ │ │ │ │ ├── LzmaRam.h
│ │ │ │ │ │ │ ├── LzmaRamDecode.c
│ │ │ │ │ │ │ ├── LzmaRamDecode.h
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ ├── LZMA_C/
│ │ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ │ ├── LzmaDecodeSize.c
│ │ │ │ │ │ │ ├── LzmaStateDecode.c
│ │ │ │ │ │ │ ├── LzmaStateDecode.h
│ │ │ │ │ │ │ ├── LzmaStateTest.c
│ │ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ │ ├── makefile
│ │ │ │ │ │ │ └── makefile.gcc
│ │ │ │ │ │ ├── LZMA_Lib/
│ │ │ │ │ │ │ ├── ZLib.cpp
│ │ │ │ │ │ │ ├── lzmaext.h
│ │ │ │ │ │ │ └── makefile
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── ICoder.h
│ │ │ │ │ └── IStream.h
│ │ │ │ ├── Common/
│ │ │ │ │ ├── Alloc.cpp
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ ├── CRC.h
│ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ ├── ComTry.h
│ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── MyCom.h
│ │ │ │ │ ├── MyGuidDef.h
│ │ │ │ │ ├── MyInitGuid.h
│ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── String.cpp
│ │ │ │ │ ├── String.h
│ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ ├── Types.h
│ │ │ │ │ ├── Vector.cpp
│ │ │ │ │ └── Vector.h
│ │ │ │ └── Windows/
│ │ │ │ ├── Defs.h
│ │ │ │ ├── FileIO.cpp
│ │ │ │ ├── FileIO.h
│ │ │ │ └── StdAfx.h
│ │ │ ├── CPL.html
│ │ │ ├── CS/
│ │ │ │ └── 7zip/
│ │ │ │ ├── Common/
│ │ │ │ │ ├── CRC.cs
│ │ │ │ │ ├── CommandLineParser.cs
│ │ │ │ │ ├── InBuffer.cs
│ │ │ │ │ └── OutBuffer.cs
│ │ │ │ ├── Compress/
│ │ │ │ │ ├── LZ/
│ │ │ │ │ │ ├── IMatchFinder.cs
│ │ │ │ │ │ ├── LzBinTree.cs
│ │ │ │ │ │ ├── LzInWindow.cs
│ │ │ │ │ │ └── LzOutWindow.cs
│ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ ├── LzmaBase.cs
│ │ │ │ │ │ ├── LzmaDecoder.cs
│ │ │ │ │ │ └── LzmaEncoder.cs
│ │ │ │ │ ├── LzmaAlone/
│ │ │ │ │ │ ├── LzmaAlone.cs
│ │ │ │ │ │ ├── LzmaAlone.csproj
│ │ │ │ │ │ ├── LzmaAlone.sln
│ │ │ │ │ │ ├── LzmaBench.cs
│ │ │ │ │ │ └── Properties/
│ │ │ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ │ │ ├── Resources.cs
│ │ │ │ │ │ └── Settings.cs
│ │ │ │ │ └── RangeCoder/
│ │ │ │ │ ├── RangeCoder.cs
│ │ │ │ │ ├── RangeCoderBit.cs
│ │ │ │ │ └── RangeCoderBitTree.cs
│ │ │ │ └── ICoder.cs
│ │ │ ├── Java/
│ │ │ │ └── SevenZip/
│ │ │ │ ├── CRC.java
│ │ │ │ ├── Compression/
│ │ │ │ │ ├── ICodeProgress.java
│ │ │ │ │ ├── LZ/
│ │ │ │ │ │ ├── BinTree.java
│ │ │ │ │ │ ├── InWindow.java
│ │ │ │ │ │ └── OutWindow.java
│ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ ├── Base.java
│ │ │ │ │ │ ├── Decoder.java
│ │ │ │ │ │ └── Encoder.java
│ │ │ │ │ └── RangeCoder/
│ │ │ │ │ ├── BitTreeDecoder.java
│ │ │ │ │ ├── BitTreeEncoder.java
│ │ │ │ │ ├── Decoder.java
│ │ │ │ │ └── Encoder.java
│ │ │ │ ├── LzmaAlone.java
│ │ │ │ └── LzmaBench.java
│ │ │ ├── LGPL.txt
│ │ │ ├── Methods.txt
│ │ │ ├── history.txt
│ │ │ └── lzma.txt
│ │ ├── mksquashfs.c
│ │ ├── mksquashfs.h
│ │ ├── read_fs.c
│ │ ├── read_fs.h
│ │ ├── sort.c
│ │ ├── sort.h
│ │ ├── squashfs_fs.h
│ │ └── unsquashfs.c
│ ├── tpl-tool/
│ │ ├── doc/
│ │ │ ├── Image_layout
│ │ │ └── Readme
│ │ └── src/
│ │ ├── Makefile
│ │ ├── md5.c
│ │ ├── md5.h
│ │ ├── tpl-factory-to-sysupgrade.sh
│ │ └── tpl-tool.c
│ ├── uncramfs/
│ │ ├── Makefile
│ │ ├── README
│ │ ├── USE_CRAMFSCK_TO_EXTRACT_INSTEAD_SEE_CRAMFS-2.X_FOLDER
│ │ ├── VERSION
│ │ ├── cramfs.h
│ │ ├── uncramfs-w.pl
│ │ └── uncramfs.c
│ ├── uncramfs-lzma/
│ │ ├── Makefile
│ │ ├── README
│ │ ├── VERSION
│ │ ├── cramfs.h
│ │ ├── cramfs_fs.h
│ │ ├── lzma-rg/
│ │ │ ├── CPL.html
│ │ │ ├── LGPL.txt
│ │ │ ├── Makefile
│ │ │ ├── SRC/
│ │ │ │ ├── .cvsignore
│ │ │ │ ├── 7zip/
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── FileStreams.cpp
│ │ │ │ │ │ ├── FileStreams.h
│ │ │ │ │ │ ├── InBuffer.cpp
│ │ │ │ │ │ ├── InBuffer.h
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── OutBuffer.cpp
│ │ │ │ │ │ ├── OutBuffer.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── Compress/
│ │ │ │ │ │ ├── Branch/
│ │ │ │ │ │ │ ├── ARM.cpp
│ │ │ │ │ │ │ ├── ARM.h
│ │ │ │ │ │ │ ├── ARMThumb.cpp
│ │ │ │ │ │ │ ├── ARMThumb.h
│ │ │ │ │ │ │ ├── BranchARM.c
│ │ │ │ │ │ │ ├── BranchARM.h
│ │ │ │ │ │ │ ├── BranchARMThumb.c
│ │ │ │ │ │ │ ├── BranchARMThumb.h
│ │ │ │ │ │ │ ├── BranchCoder.cpp
│ │ │ │ │ │ │ ├── BranchCoder.h
│ │ │ │ │ │ │ ├── BranchIA64.c
│ │ │ │ │ │ │ ├── BranchIA64.h
│ │ │ │ │ │ │ ├── BranchPPC.c
│ │ │ │ │ │ │ ├── BranchPPC.h
│ │ │ │ │ │ │ ├── BranchX86.c
│ │ │ │ │ │ │ ├── BranchX86.h
│ │ │ │ │ │ │ ├── IA64.cpp
│ │ │ │ │ │ │ ├── IA64.h
│ │ │ │ │ │ │ ├── PPC.cpp
│ │ │ │ │ │ │ ├── PPC.h
│ │ │ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ │ │ ├── x86.cpp
│ │ │ │ │ │ │ ├── x86.h
│ │ │ │ │ │ │ ├── x86_2.cpp
│ │ │ │ │ │ │ └── x86_2.h
│ │ │ │ │ │ ├── LZ/
│ │ │ │ │ │ │ ├── BinTree/
│ │ │ │ │ │ │ │ ├── BinTree.h
│ │ │ │ │ │ │ │ ├── BinTree2.h
│ │ │ │ │ │ │ │ ├── BinTree3.h
│ │ │ │ │ │ │ │ ├── BinTree3Z.h
│ │ │ │ │ │ │ │ ├── BinTree3ZMain.h
│ │ │ │ │ │ │ │ ├── BinTree4.h
│ │ │ │ │ │ │ │ ├── BinTree4b.h
│ │ │ │ │ │ │ │ ├── BinTreeMF.h
│ │ │ │ │ │ │ │ ├── BinTreeMFMain.h
│ │ │ │ │ │ │ │ └── BinTreeMain.h
│ │ │ │ │ │ │ ├── HashChain/
│ │ │ │ │ │ │ │ ├── HC.h
│ │ │ │ │ │ │ │ ├── HC2.h
│ │ │ │ │ │ │ │ ├── HC3.h
│ │ │ │ │ │ │ │ ├── HC4.h
│ │ │ │ │ │ │ │ ├── HC4b.h
│ │ │ │ │ │ │ │ ├── HCMF.h
│ │ │ │ │ │ │ │ ├── HCMFMain.h
│ │ │ │ │ │ │ │ └── HCMain.h
│ │ │ │ │ │ │ ├── IMatchFinder.h
│ │ │ │ │ │ │ ├── LZInWindow.cpp
│ │ │ │ │ │ │ ├── LZInWindow.h
│ │ │ │ │ │ │ ├── LZOutWindow.cpp
│ │ │ │ │ │ │ ├── LZOutWindow.h
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ ├── Patricia/
│ │ │ │ │ │ │ │ ├── Pat.h
│ │ │ │ │ │ │ │ ├── Pat2.h
│ │ │ │ │ │ │ │ ├── Pat2H.h
│ │ │ │ │ │ │ │ ├── Pat2R.h
│ │ │ │ │ │ │ │ ├── Pat3H.h
│ │ │ │ │ │ │ │ ├── Pat4H.h
│ │ │ │ │ │ │ │ └── PatMain.h
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA/
│ │ │ │ │ │ │ ├── LZMA.h
│ │ │ │ │ │ │ ├── LZMADecoder.cpp
│ │ │ │ │ │ │ ├── LZMADecoder.h
│ │ │ │ │ │ │ ├── LZMAEncoder.cpp
│ │ │ │ │ │ │ ├── LZMAEncoder.h
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA_Alone/
│ │ │ │ │ │ │ ├── AloneLZMA.dsp
│ │ │ │ │ │ │ ├── AloneLZMA.dsw
│ │ │ │ │ │ │ ├── LzmaAlone.cpp
│ │ │ │ │ │ │ ├── LzmaBench.cpp
│ │ │ │ │ │ │ ├── LzmaBench.h
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ ├── Makefile.rg
│ │ │ │ │ │ │ ├── StdAfx.cpp
│ │ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ │ ├── LZMA_C/
│ │ │ │ │ │ │ ├── LzmaDecode.c
│ │ │ │ │ │ │ ├── LzmaDecode.h
│ │ │ │ │ │ │ ├── LzmaTest.c
│ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ ├── Makefile.rg
│ │ │ │ │ │ │ ├── decode.c
│ │ │ │ │ │ │ ├── decode.c.orig
│ │ │ │ │ │ │ └── decode.h
│ │ │ │ │ │ └── RangeCoder/
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── RangeCoder.h
│ │ │ │ │ │ ├── RangeCoderBit.cpp
│ │ │ │ │ │ ├── RangeCoderBit.h
│ │ │ │ │ │ ├── RangeCoderBitTree.h
│ │ │ │ │ │ ├── RangeCoderOpt.h
│ │ │ │ │ │ └── StdAfx.h
│ │ │ │ │ ├── ICoder.h
│ │ │ │ │ ├── IStream.h
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── lzma_encode.cpp
│ │ │ │ ├── Common/
│ │ │ │ │ ├── Alloc.cpp
│ │ │ │ │ ├── Alloc.h
│ │ │ │ │ ├── CRC.cpp
│ │ │ │ │ ├── CRC.h
│ │ │ │ │ ├── C_FileIO.cpp
│ │ │ │ │ ├── C_FileIO.h
│ │ │ │ │ ├── ComTry.h
│ │ │ │ │ ├── CommandLineParser.cpp
│ │ │ │ │ ├── CommandLineParser.h
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── MyCom.h
│ │ │ │ │ ├── MyUnknown.h
│ │ │ │ │ ├── MyWindows.h
│ │ │ │ │ ├── NewHandler.cpp
│ │ │ │ │ ├── NewHandler.h
│ │ │ │ │ ├── StdAfx.h
│ │ │ │ │ ├── String.cpp
│ │ │ │ │ ├── String.h
│ │ │ │ │ ├── StringConvert.cpp
│ │ │ │ │ ├── StringConvert.h
│ │ │ │ │ ├── StringToInt.cpp
│ │ │ │ │ ├── StringToInt.h
│ │ │ │ │ ├── Types.h
│ │ │ │ │ ├── Vector.cpp
│ │ │ │ │ └── Vector.h
│ │ │ │ ├── Makefile
│ │ │ │ ├── Windows/
│ │ │ │ │ ├── Defs.h
│ │ │ │ │ ├── FileIO.cpp
│ │ │ │ │ ├── FileIO.h
│ │ │ │ │ └── StdAfx.h
│ │ │ │ ├── lzma.mak
│ │ │ │ └── lzma_encode.h
│ │ │ ├── history.txt
│ │ │ └── lzma.txt
│ │ └── lzma-uncramfs.c
│ ├── untrx.cc
│ ├── untrx.h
│ ├── webcomp-tools/
│ │ ├── Makefile
│ │ ├── README
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── webdecomp.c
│ │ └── webdecomp.h
│ └── wrt_vx_imgtool/
│ ├── Makefile
│ ├── imghdr.h
│ ├── stdafx.cpp
│ ├── stdafx.h
│ └── wrt54gv5_img.cpp
├── trunk/
│ ├── NOTE_no_need_to_sync_ver_file.txt
│ ├── README
│ └── firmware_mod_kit_version.txt
├── uncpio.sh
├── uncramfs_all.sh
└── unsquashfs_all.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: build-firmware.sh
================================================
#!/bin/bash
DIR="$1"
NEXT_PARAM=""
if [ "$1" == "-h" ]
then
echo "Usage: $0 [FMK directory] [-nopad | -min]"
exit 1
fi
if [ "$DIR" == "" ] || [ "$DIR" == "-nopad" ] || [ "$DIR" == "-min" ]
then
DIR="fmk"
NEXT_PARAM="$1"
else
NEXT_PARAM="$2"
fi
# Need to extract file systems as ROOT
if [ "$UID" != "0" ]
then
SUDO="sudo"
else
SUDO=""
fi
DIR=$(readlink -f $DIR)
# Make sure we're operating out of the FMK directory
cd $(dirname $(readlink -f $0))
# Order matters here!
eval $(cat shared-ng.inc)
eval $(cat $CONFLOG)
FSOUT="$DIR/new-filesystem.$FS_TYPE"
printf "Firmware Mod Kit (build-ng) ${VERSION}, (c)2011-2013 Craig Heffner, Jeremy Collake\n\n"
if [ ! -d "$DIR" ]
then
echo -e "Usage: $0 [build directory] [-nopad]\n"
exit 1
fi
# Check if FMK has been built, and if not, build it
if [ ! -e "./src/crcalc/crcalc" ]
then
echo "Firmware-Mod-Kit has not been built yet. Building..."
cd src && ./configure && make
if [ $? -eq 0 ]
then
cd -
else
echo "Build failed! Quitting..."
exit 1
fi
fi
echo "Building new $FS_TYPE file system..."
# Clean up any previously created files
rm -rf "$FWOUT" "$FSOUT"
# Build the appropriate file system
case $FS_TYPE in
"squashfs")
# Check for squashfs 4.0 realtek, which requires the -comp option to build lzma images.
if [ "$(echo $MKFS | grep 'squashfs-4.0-realtek')" != "" ] && [ "$FS_COMPRESSION" == "lzma" ]
then
COMP="-comp lzma"
else
COMP=""
fi
# Mksquashfs 4.0 tools don't support the -le option; little endian is built by default
if [ "$(echo $MKFS | grep 'squashfs-4.')" != "" ] && [ "$ENDIANESS" == "-le" ]
then
ENDIANESS=""
fi
# Increasing the block size minimizes the resulting image size (larger dictionary). Max block size of 1MB.
if [ "$NEXT_PARAM" == "-min" ]
then
echo "Blocksize override (-min). Original used $((FS_BLOCKSIZE/1024))KB blocks. New firmware uses 1MB blocks."
FS_BLOCKSIZE="$((1024*1024))"
fi
# if blocksize var exists, then add '-b' parameter
if [ "$FS_BLOCKSIZE" != "" ]
then
BS="-b $FS_BLOCKSIZE"
fi
$SUDO $MKFS "$ROOTFS" "$FSOUT" $ENDIANESS $BS $COMP -all-root
;;
"cramfs")
$SUDO $MKFS "$ROOTFS" "$FSOUT"
if [ "$ENDIANESS" == "-be" ]
then
mv "$FSOUT" "$FSOUT.le"
./src/cramfsswap/cramfsswap "$FSOUT.le" "$FSOUT"
rm -f "$FSOUT.le"
fi
;;
*)
echo "Unsupported file system '$FS_TYPE'!"
;;
esac
if [ ! -e $FSOUT ]
then
echo "Failed to create new file system! Quitting..."
exit 1
fi
# Append the new file system to the first part of the original firmware file
cp $HEADER_IMAGE $FWOUT
$SUDO cat $FSOUT >> $FWOUT
# Calculate and create any filler bytes required between the end of the file system and the footer / EOF.
CUR_SIZE=$(ls -l $FWOUT | awk '{print $5}')
((FILLER_SIZE=$FW_SIZE-$CUR_SIZE-$FOOTER_SIZE))
if [ "$FILLER_SIZE" -lt 0 ]
then
echo "ERROR: New firmware image will be larger than original image!"
echo " Building firmware images larger than the original can brick your device!"
echo " Try re-running with the -min option, or remove any unnecessary files from the file system."
echo " Refusing to create new firmware image."
echo ""
echo " Original file size: $FW_SIZE"
echo " Current file size: $CUR_SIZE"
echo ""
echo " Quitting..."
rm -f "$FWOUT" "$FSOUT"
exit 1
else
if [ "$NEXT_PARAM" != "-nopad" ]; then
echo "Remaining free bytes in firmware image: $FILLER_SIZE"
perl -e "print \"\xFF\"x$FILLER_SIZE" >> "$FWOUT"
else
echo "Padding of firmware image disabled via -nopad"
fi
fi
# Append the footer to the new firmware image, if there is any footer
if [ "$FOOTER_SIZE" -gt "0" ]
then
cat $FOOTER_IMAGE >> "$FWOUT"
fi
# Calculate new checksum values for the firmware header
# trx, dlob, uimage
./src/crcalc/crcalc "$FWOUT" "$BINLOG"
if [ $? -eq 0 ]
then
echo -n "Finished! "
else
echo -n "Firmware header not supported; firmware checksums may be incorrect. "
fi
# if a Buffalo image, then run encrypter - base on image name
if [ "$(echo $FWOUT | grep -i 'buffalo')" != "" ]
then
# product name, version, key, encryption type can be specified here
$KEY="" # specify full param, e.g. -k mykey
$MAGIC=""
$PRODUCT=""
$LONGSTATE=""
./src/firmware-tools/buffalo-enc -i $FWOUT -o $FWOUT.buffalo.enc $KEY $MAGIC $PRODUCT $LONGSTATE
#if [ $? -eq 0 ]
#then
# echo "Encrypted Buffalo image created."
#else
# echo "ERROR creating an encrypted Buffalo image"
#fi
fi
echo "New firmware image has been saved to: $FWOUT"
================================================
FILE: check_for_upgrade.sh
================================================
#!/bin/sh
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 20110224-1507-MCT - Needed quotes around a string compare.
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo " Checking for updates ..."
mkdir update_check
cd update_check
SYSNAME=`uname`
if [ `expr "$SYSNAME" : "Darwin"` = 6 ]; then
curl -O -s --connect-timeout 4 --retry 1 http://firmware-mod-kit.googlecode.com/svn/trunk/firmware_mod_kit_version.txt
else
wget --quiet --timeout=4 --tries=1 http://firmware-mod-kit.googlecode.com/svn/trunk/firmware_mod_kit_version.txt
fi
cd ..
if [ ! -f "update_check/firmware_mod_kit_version.txt" ]; then
echo " ! WARNING: Could not check for update. No connectivity or server down?"
rm -rf update_check
exit 1
fi
NEW_VERSION=`cat update_check/firmware_mod_kit_version.txt`
CUR_VERSION=`cat firmware_mod_kit_version.txt`
if [ "$NEW_VERSION" != "$CUR_VERSION" ]; then
echo " !!! There is a newer version available: $NEW_VERSION"
echo " You are currently using $CUR_VERSION"
else
echo " You have the latest version of this kit."
fi
rm -rf update_check
exit 0
================================================
FILE: cleanup.sh
================================================
#!/bin/sh
. ./shared.inc
Cleanup
================================================
FILE: creating_ipkg_packages.htm
================================================
This document attempts to outline the process of creation of IPKG format
packages with the IPK Creation Kit, giving specific emphasis on usage for
embedded linux platforms such as OpenWrt
and DD-WRT. It is a quick draft intended to
encourage people to develop IPKs specific to certain firmwares for use with the
Firmware Modification Kit,
a kit that allows easy modification of firmware images without recompiling the
sources.
The IPK template directory contained in the Firmware Modification Kit makes
it particularly easy to create IPK files without having to manually create them
each time.
\n\n"
exit 1
fi
if [ ! -f "${IMG}" ];
then
echo "File does not exist!"
exit 1
fi
if [ -e "${DIR}" ]
then
echo "Directory ${DIR} already exists! Quitting..."
exit 1
fi
# Check if FMK has been built, and if not, build it
if [ ! -e "./src/crcalc/crcalc" ]
then
echo "Firmware-Mod-Kit has not been built yet. Building..."
cd src && ./configure && make
if [ ${?} -eq 0 ]
then
cd -
else
echo "Build failed! Quitting..."
exit 1
fi
fi
# Get the size, in bytes, of the target firmware image
FW_SIZE=$(ls -l "${IMG}" | cut -d' ' -f5)
# Create output directories
mkdir -p "${DIR}/logs"
mkdir -p "${DIR}/image_parts"
echo "Scanning firmware..."
# Log binwalk results to the ${BINLOG} file, disable default filters, exclude invalid results,
# and search only for trx, uimage, dlob, squashfs, and cramfs results.
#${BINWALK} -f "${BINLOG}" -d -x invalid -y trx -y uimage -y dlob -y squashfs -y cramfs "${IMG}"
${BINWALK} -f "${BINLOG}" "${IMG}"
# Set Internal Field Separator (IFS) via two lines to newline only (bashism would be $'\n')
IFS='
'
# Header image offset is ALWAYS 0. Header checksums are simply updated by build-ng.sh.
HEADER_IMAGE_OFFSET=0
# Loop through binwalk log file
for LINE in IFS='
'$(sort -n ${BINLOG} | grep -v -e '^DECIMAL' -e '^---')
do
# Get decimal file offset and the first word of the description
OFFSET=$(echo ${LINE} | awk '{print $1}')
DESCRIPTION=$(echo ${LINE} | awk '{print tolower($3)}')
# Offset 0 is firmware header
if [ "${OFFSET}" = "0" ]
then
HEADER_OFFSET=${OFFSET}
HEADER_TYPE=${DESCRIPTION}
HEADER_SIZE=$(echo ${LINE} | sed -e 's/.*header size: //' | cut -d' ' -f1)
HEADER_IMAGE_SIZE=$(echo ${LINE} | sed -e 's/.*image size: //' | cut -d' ' -f1)
# Check to see if this line is a file system entry
elif [ "$(echo ${LINE} | grep -i filesystem)" != "" ]
then
FS_OFFSET=${OFFSET}
FS_TYPE=${DESCRIPTION}
# Need to know endianess for re-assembly
if [ "$(echo ${LINE} | grep -i 'big endian')" != "" ]
then
ENDIANESS="-be"
else
ENDIANESS="-le"
fi
# Check for LZMA compression in the file system. If not present, assume gzip.
# This is only used for squashfs 4.0 images.
if [ "$(echo ${LINE} | grep -i 'lzma')" != "" ]
then
FS_COMPRESSION="lzma"
else
FS_COMPRESSION="gzip"
fi
# Check for a block size (used only by mksquashfs)
if [ "$(echo ${LINE} | grep -i 'blocksize')" != "" ]
then
set -f
IFS=,
for fsparam in ${LINE}
do
if [[ $fsparam = *blocksize* ]]; then
fsparam="${fsparam##*blocksize: }"
FS_BLOCKSIZE="${fsparam%* bytes}"
break
fi
done
fi
set +f; unset IFS
fi
done
# Header image size is everything from the header image offset (0) up to the file system
HEADER_IMAGE_SIZE=$((${FS_OFFSET}-${HEADER_IMAGE_OFFSET}))
# Extract the header + image up to the file system
echo "Extracting ${HEADER_IMAGE_SIZE} bytes of ${HEADER_TYPE} header image at offset ${HEADER_IMAGE_OFFSET}"
dd if="${IMG}" bs=${HEADER_IMAGE_SIZE} skip=${HEADER_IMAGE_OFFSET} count=1 of="${HEADER_IMAGE}" 2>/dev/null
if [ "${FS_OFFSET}" != "" ]
then
echo "Extracting ${FS_TYPE} file system at offset ${FS_OFFSET}"
dd if="${IMG}" bs=${FS_OFFSET} skip=1 of="${FSIMG}" 2>/dev/null
else
echo "ERROR: No supported file system found! Aborting..."
rm -rf "${DIR}"
exit 1
fi
FOOTER_SIZE=0
FOOTER_OFFSET=0
# Try to determine if there is a footer at the end of the firmware image.
# Grab the last 10 lines of a hexdump of the firmware image, excluding the
# last line in the hexdump. Reverse the line order and replace any lines
# that start with '*' with the word 'FILLER'.
for LINE in $(hexdump -C ${IMG} | tail -11 | head -10 | sed -n '1!G;h;$p' | sed -e 's/^*/FILLER/')
do
if [ "${LINE}" = "FILLER" ]
then
break
else
FOOTER_SIZE=$((${FOOTER_SIZE}+16))
fi
done
# If a footer was found, dump it out
if [ "${FOOTER_SIZE}" != "0" ]
then
FOOTER_OFFSET=$((${FW_SIZE}-${FOOTER_SIZE}))
echo "Extracting ${FOOTER_SIZE} byte footer from offset ${FOOTER_OFFSET}"
dd if="${IMG}" bs=1 skip=${FOOTER_OFFSET} count=${FOOTER_SIZE} of="${FOOTER_IMAGE}" 2>/dev/null
else
FOOTER_OFFSET=${FW_SIZE}
fi
# Log the parsed values to the CONFLOG for use when re-building the firmware
echo "FW_SIZE='${FW_SIZE}'" > ${CONFLOG}
echo "HEADER_TYPE='${HEADER_TYPE}'" >> ${CONFLOG}
echo "HEADER_SIZE='${HEADER_SIZE}'" >> ${CONFLOG}
echo "HEADER_IMAGE_SIZE='${HEADER_IMAGE_SIZE}'" >> ${CONFLOG}
echo "HEADER_IMAGE_OFFSET='${HEADER_IMAGE_OFFSET}'" >> ${CONFLOG}
echo "FOOTER_SIZE='${FOOTER_SIZE}'" >> ${CONFLOG}
echo "FOOTER_OFFSET='${FOOTER_OFFSET}'" >> ${CONFLOG}
echo "FS_TYPE='${FS_TYPE}'" >> ${CONFLOG}
echo "FS_OFFSET='${FS_OFFSET}'" >> ${CONFLOG}
echo "FS_COMPRESSION='${FS_COMPRESSION}'" >> ${CONFLOG}
echo "FS_BLOCKSIZE='${FS_BLOCKSIZE}'" >> ${CONFLOG}
echo "ENDIANESS='${ENDIANESS}'" >> ${CONFLOG}
# Extract the file system and save the MKFS variable to the CONFLOG
case ${FS_TYPE} in
"squashfs")
echo "Extracting squashfs files..."
${SUDO} ./unsquashfs_all.sh "${FSIMG}" "${ROOTFS}" 2>/dev/null | grep MKFS >> "${CONFLOG}"
;;
"cramfs")
echo "Extracting CramFS file system..."
${SUDO} ./uncramfs_all.sh "${FSIMG}" "${ROOTFS}" ${ENDIANESS} 2>/dev/null | grep MKFS >> "${CONFLOG}"
;;
*)
echo "Unsupported file system '${FS_TYPE}'! Quitting..."
rm -rf "${DIR}"
exit 1
;;
esac
# Check if file system extraction was successful
if [ ${?} -eq 0 ]
then
echo "Firmware extraction successful!"
echo "Firmware parts can be found in '${DIR}/*'"
else
echo "Firmware extraction failed!"
rm -rf "${DIR}"
exit 1
fi
exit 0
================================================
FILE: firmware_mod_kit.htm
================================================
Firmware Modification Kit
Firmware Modification Kit
Giving YOU the power to customize your firmware
documentation version 0.78 beta
all scripts, untrx, wrt_vx_imgtool, crcalc, binwalk and docs (c) 2006-2011
Craig Heffner <heffnercj@gmail.com>, Jeremy Collake <jeremy.collake@gmail.com>, and other contributors (see project page)
other portions (c) their respective holders
THERE ARE NEW DOCS: This documentation may be superseded or extended by documentation at the Google Code project site. An essentially new, and much improved, rendition is now available. Firmware-Mod-Kit-Ng ;)
Contents
I. Description
II. Why is this useful?
III. Where to get the kit
IV. Requirements
V. Compatibility
VI. Instructions
A.
extracting firmware
B.
modifying
firmware
1.
installing packages
2.
removing packages
C.
re-building firmware
VII. Caveats
A. binary
compatibility issues
B. maximum firmware size
C. solutions to file
system incompatibilities
VIII. Acknowledgements and more
IX. Links
X. Revision history
I. Description
This kit gives the user the ability to make changes to a firmware image without
recompiling the firmware sources. It works by extracting the firmware into
its component parts, then extracting the file system image (assuming its in one
the supported formats). The user can then make modifications
to the extracted file system, and rebuild the firmware image.
Although this kit completely automates the process, it is also useful for
those who need a handy collection of utilities to manipulate firmware images. The following utilities are included in this kit, along with scripts to
automate their use:
| ASUSTRX |
An extended version of ASUSTRX that can build both
'normal' TRX files and, optionally, those with an ASUS addver
style header appended. It can also, uniquely, force segment offsets
in the TRX (with -b switch) for compatibility with Marvell ASUS devices
like the WL-530g.
This tool replaces both 'normal' trx tool and addver. Current versions
included are: 0.90 beta. |
| ADDPATTERN |
Utility to pre-pend Linksys style HDR0
header to a TRX. |
| ADDVER |
ASUS utility to append a header to a TRX image that
contains version information. ASUSTRX includes this capability. Current
version: unversioned. |
| BINWALK |
Firmware analysis tool, used for searching firmware images
for known file types. Used by the extract-ng.sh script to identify valid
file systems inside firmware images. Current version included is 0.3.9.
Tool home page: http://binwalk.googlecode.com. |
| CRAMFSCK |
CRAMFS file system image checker and extractor. Current
versions included are: 2.4x. |
| CRCALC |
Re-calculates and patches header checksums for TRX and
uImage firmware headers. |
| MKSQUASHFS |
Builds a squashfs file system image.
Current versions included are: 2.1-r2, 3.0. |
| MKCRAMFS |
Builds a cramfs file system image. Coming
in next version. Current versions included are: 2.4x. |
| MOTOROLA_BIN |
A utility that prepends 8 byte headers to TRX images
for Motorola devices WR850G, WA840G, WE800G. Current version:
unversioned. |
| UNCRAMFS |
Alternate tool to extracts a cramfs file system image.
Use cramfsck instead whenever possible as it seems to be more reliable. Current versions
included are: 0.7 (for cramfs v2.x). |
| UNCRAMFS-LZMA |
Extracts an lzma cramfs file system image, specifically
those included in OpenRG based firmware. Current version included is 0.7rg. |
| UNSQUASHFS |
Extracts a zlib squashfs file system image. Current
versions included are 1.0 for 3.0 images and 1.0 for 2.x images (my own
blend). |
| UNSQUASHFS-LZMA |
Extracts an lzma squashfs file system image. Current
versions included are 1.0 for 3.0 images and 1.0 for 2.x images (my own
blend). Note: Not all squashfs-lzma patches are compatible with one
another. I'm working on adding support for all common squashfs-lzma
variations. |
| UNTRX |
Splits TRX style firmwares into their component
parts. Also supports pre-pended addpattern HDR0 style headers. This was
developed exclusively for this kit. Current versions included are: 0.45. |
| WRT_VX_IMGTOOL |
Utility to generate VxWorks compatible
firmware images for the WRT54G(S) v5 series. |
Tools/changes unique to this kit
This kit doesn't just collect existing tools, it also offers new ones and
modifications to existing ones. Custom code currently is:
ASUSTRX - Modified to allow '-b' switch to force segment offsets
(needed for some devices, like the WL-530g).
CRCALC - A new tool to re-calculate and patch the checksum fields for common
firmware headers. Currently TRX and uImage headers are supported.
UNTRX - A new tool to extract the contents of a TRX image into its component
parts.
UNSQUASHFS - Custom blend that supports extraction of 2.x squashfs
images. This tool wasn't officially made available until squashfs 3.0, so up
until now it wasn't available for 2.x images.
WRT-VX-IMGTOOL - A new tool to view, extract, build, and fix VxWorks
compatible firmware images for the WRT54G(S) v5 series.
SPLITTER3 - Custom file splitter for certain types of linux firmware images.
II. Why is this useful?
A list of some of the many reasons this might be desired are:
- add initialization scripts
- install new packages
- extend/change HTTP managed console
- remove un-needed packages
- mix-and-match packages from various flavors of the firmware image.
III. Where to get the kit
The best way to download and use this kit is to check out the sources from
the repository. The automated scripts all automatically build the executables,
and the sources. It is easy as downloading something and using it that way. Also, if you are unable to use a simple SVN checkout, then
it is likely that this kit is a danger to you because it is for advanced users.
To anonymously check out the firmware-mod-kit:
mkdir firmware_mod_kit
cd firmware_mod_kit
svn checkout http://firmware-mod-kit.googlecode.com/svn/trunk/ firmware-mod-kit-read-only |
Kit downloads and links:
Project hosting and repository (new):
http://code.google.com/p/firmware-mod-kit/
Guest SVN Checkout: svn checkout http://firmware-mod-kit.googlecode.com/svn/trunk/ firmware-mod-kit-read-only
User forums can be found
here.
Packages:
All of the many OpenWrt packages should work with OpenWrt images and many
other firmware images.
An old (2009) specific collection of DD-WRT packages for use with the kit:
http://www.bitsum.com/files/ddwrt_packages.tar.gz .
IV. Requirements
I've worked to make sure the requirements are low enough for anyone to
use this kit. However, to reduce distribution costs and better represent the
multi-platform capabilities of this kit, the binary tools in the kit do
automatically build themselves the first time you run one of the scripts. Any
machine set up to build anything C or C++ on the machine will probably be ready.
The few requirements are all basic items that everyone has easy access to:
- A compatible platform. The following are specifically supported (or
specifically unsupported):
- LINUX (recommended)
- OS X **warning:
I don't test every build under OS X. It's up to you to email me if you have
problems under it. Current builds may have issues.**
- CYGWIN **alpha stage testing (!! built firmwares may not boot
!!)**
- GNU C (gcc)
- GNU C++ (g++)
- GNU make
- Standard C runtime library development
- Standard C++ runtime library development
- Zlib library development (for Ubuntu it is zlib1g-dev)
- TAR and GZIP (optional, used by ipkg_install.sh)
OS/X is not supported at this time. The kit is probably not far from compatibility, but easier to just install a linux VM.
V. Compatibility
Any TRX style firmware image format should that uses squashfs-lzma as a root
file system work fine. Firmwares that use regular zlib squashfs or unsupported
file systems will work if the steps that extract the file system and rebuild the
file system are tweaked.
The kit can build firmware images for the following devices, amongst many
others:
- WRT54G v1 - v6
- WRT54GS v1 - v6
- WRTSL54G v?
- ASUS WL-330g
- ASUS WL-500g/p
- ASUS WL-520g
- ASUS WL-530g
- Belkin 7230-4 (some versions)
- Belkin 7231-4 (?)
- Buffalo WHR-G54S
- Buffalo WHR-HP-G54
- Siemens SE505
- Trendnet TEW-632BRP
- D-Link DIR-615 (maybe)
- ... lots of others* ...
The kit is known (or thought) to be compatible with the following firmwares:
| DD-WRT v23 |
tested - versions v23 SP1 and later are compatible (soon older
versions too). WARNING: Builds of
DD-WRT later than 08/04/2006 (v23 SP2) have some protections against
changing the web UI. |
| DD-WRT v24 |
tested |
| OpenWrt White Russian |
tested |
| OpenWrt Kamikaze |
untested (should work) - not really necessary, based on
OpenWrt has its Image Builder. |
| FreeWrt |
untested - should work ok |
| HyperWrt |
untested |
| Ewrt |
untested |
| Sveasoft Alchemy |
untested |
| Sveasoft Talisman |
untested |
| Linksys / other vendor |
not supported by scripts yet - haven't added cramfs handling |
| ASUS WL-330G |
untested - should work ok |
| ASUS WL-520G |
untested - should work ok |
| ASUS WL-530G |
supported |
| ASUS WL-550G |
untested - should work ok |
| Trendnet TEW-632BRP |
tested |
| DLink DIR-615 |
untested |
| many others* |
untested |
* Even if the kit doesn't automatically support the firmware or device you want,
you can manually use the tools inside to manipulate many firmware images, or
request support be added.
VI. Instructions
I've scripts that simply and abstract the firmware modification process. Basically, it's a
one-step process to extract the firmware, and a one-step process to rebuild the
firmware. There are also scripts to install or remove individual packages or
entire directories of packages.
The procedure of calls is:
- extract_firmware.sh ....
- (optional) ipkg_install[_all]).sh ...
- (optional) ipkg_remove[_all].sh ...
- build_firmware.sh
A.
Extracting the firmware
(extract_firmware.sh, extract-ng.sh)
Simply run extract_firmware.sh with the following parameters. You must
run this tool from inside the directory it exists in.
$ ./extract_firmware.sh firmware.bin working_directory/ |
- firmware.bin is the firmware image you want to extract, i.e.
DD-WRT.v23_MICRO_GENERIC.BIN.
- working_directory is the working directory you want to use. This is
where the intermediate files and the extracted file system will be stored. Note
that files in the working directory may be deleted!
It doesn't matter which firmware image you supply, i.e. for a WRT54G or an ASUS
WL-500G. These images are usually all the same and differ only in the header
format. The rebuilding process will create images for the various models.
An extraction log is created as extract.log.
If extract_firmware.sh fails, the newer extract-ng.sh can be used. Although newer and
less thoroughly tested than extract_firmware.sh, it is more flexible and can often
extract file systems that extract_firmware.sh cannot:
$ ./extract-ng.sh firmware.bin working_directory/ |
B.
Making changes
to the firmware's file system
Modifying the firmware is simple. The file system is stored in the working
directory you supplied to extract_firmware.sh. Here are the subfolders of this
directory:
rootfs/
This is where the file system is.
Make modifications here.
image_parts/
This is where intermediate files are stored. If you need to replace the
kernel (not at all recommended), you can do so by replacing the appropriate
file here (usually segment2).
installed_packages/
If you use the ipkg_install.sh
tool, this is where packages you've installed after firmware extraction will
reside.
One can manually change the files in rootfs and/or use the
automated package scripts.
Installing packages (.IPK)
In compliment to manually making changes, one can use pre-built IPKG
format package files with the ipkg_install/remove scripts. Although not
all will work and a repository for packages verified to work has not yet
been produced, many packages work just fine.
Packages are pre-built collections of files pertaining to a set of software.
OpenWrt and DD-WRT both use packages, and most are cross-compatible. These
packages are stored in a tar/gzip archive of a pre-defined structure that
includes some control files. You can extract and copy the files manually, or use
the ipkg_install.sh script included with this kit. For a list of some of the
available packages (not all may work), see
http://downloads.openwrt.org/whiterussian/packages/ and
http://ftp.selfnet.de/pub/openwrt/backports/rc5/ .
We are currently in the process of compiling a set of packages known
to be good for DD-WRT ... to help in this matter please visit
here.
For information on how to create IPKs, see the
IPK Creation Kit.
Example use:
$ ./ipkg_install.sh some_package-1.2.5.ipk working_directory/ |
some_package-1.2.5.ipkg would be the filename of the package.
working_directory is the same working directory you supplied to the
extract_firmware.sh script.
Notes:
A script, ipkg_install_all.sh is also available to install an entire
folder of packages.
The collection of installed packages will be stored in
working_directory/installed_packages .
Removing packages (.IPK)
To remove packages there is the ipkg_remove.sh script.
Example use:
$ ./ipkg_remove.sh some_package-1.2.5.ipk working_directory/ |
some_package-1.2.5.ipkg would be the filename of the package.
working_directory is the same working directory you supplied to the
extract_firmware.sh script.
Notes:
A script, ipkg_remove_all.sh is also available to install an entire
folder of packages.
The collection of installed packages stored
working_directory/installed_packages will be updated to reflect
the change if successful.
C.
Re-building the firmware
(build_firmware.sh, build-ng.sh)
Rebuilding the firmware is as easy as extracting it. Use the
build_firmware.sh script to automate the process. You must run this
tool from inside the directory it exists in.
Example use:
$ ./build_firmware.sh output_directory/ working_directory/ |
- output_directory is the path to which the created firmware images
should be stored. If images already exist here, they will be over-written.
Firmware images for various models will be emitted (these images are all the
same but have different header patterns so they are accepted by the target
models).
- working_directory is the working directory supplied to
extract_firmware.sh.
A building log is created as build.log.
If extract-ng.sh was used to extract the firmware image, build-ng.sh must be used
to rebuild it:
$ ./build-ng.sh working_directory/ |
VIII. Caveats
There are a few things to watch out for when modifying firmware images. If
you make reasonable changes these problems will probably never affect you. Be
warned, this section may be technical in parts.
A. Binary compatibility issues
- If installing a binary package:
- It is possible the uclibc or glibc library was pruned (unused
objects removed). In the unlikely event the binary package requires some of these
previously unused (and now missing) functions, you may need to install
to the firmware file system a new uclibc or glibc library. If you are
installing another pruned uclibc or glibc library, then it is remotely
possible some pre-existing package requires objects not found in this
new library. In such a very rare case you can re-link the library or
find a full copy of the library to install.
- Different firmwares may use different kernel versions, or have
different kernel modules installed. If you get too wild with your
mix-and-matching (i.e. use older versions with newer, or mixtures of
different firmwares all-together), problems can result. To install a new
kernel (not at all recommended), replace the segment2 (or other) file found found in
the intermediate directory with an appropriate one (can be from another
firmware as long as lzma compression is used).
- Make sure any dependencies are also installed to the file system,
along with initialization scripts.
- If making web UI changes:
- WARNING: DD-WRT builds dated later than 08/04/2006
have some protections against modifying the web UI.
B. Maximum firmware size
Currently, the maximum firmware image size supported by this kit is 5,898,240
(0x5A0000) bytes, but can be adjusted through the "-m [size]" parameter of the
asustrx tool.
C. Solutions to file system
incompatibilities
! This section is very much a work in progress !
The squashfs file system is case sensitive (i.e. teSt.bin ! = test.bin) and
adheres to EXT2 naming rules. To support proper extraction of the file system,
the working directory should be on a case sensitive file system and support
symbolic links. The scripts
will warn you if you attempt to use as working directory on a case INsensitive
file system. You'll see a number of errors if you extract to a file system that
doesn't support symbolic links.
Note: Case insensitivity doesn't always cause problems, especially if the file
system preserves case ok. It depends on the firmware and version. Most of the
time for DD-WRT as long as a case preserving file system is used as a working
directory, all should work fine.
These solutions apply to those using CYGWIN, or some other environment
that may not have a case sensitive file system by default. Linux users typically
do not have this problem since EXT2 and EXT3 file systems are case sensitive.
WARNING: THESE ARE IN EARLY STAGES OF TESTING AND MAY NOT WORK.
| |
Applies to |
Description |
| SOLUTION 1 |
CYGWIN, OTHER |
It's reported this does not work under
CYGWIN due to the CYGWIN utilities all being case INsensitive
(thanks pagedude).
Use a network share to a case sensitive file system. This is, by far,
the easiest solution. Simply use an appropriate network share for the
working directory.
|
| SOLUTION 2 |
CYGWIN |
For NT partitions it's reported you can enable case sensitivity through
the following registry key, but I do not know if this works or not. \HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\kernel\obcaseinsensitive [REG_DWORD] = 0
|
| SOLUTION 3 |
OS X (not usually needed, at
least for DD-WRT) |
One can either
Turn on HSFX for the boot disk, or (more easily) create a temporary
HSFX case sensitive file system to use as a working directory.Example
of how to create a temporary HSFX case sensitive file system:
to create:
$ hdiutil create -size 20m -fs HFSX -volname db90h -nouuid
test-image
to mount:
$ hdiutil attach test-image.dmg
to un-mount:
$ hdiutil detach /Volumes/db90h
(thanks solarflare for this information)
|
| SOLUTION 4 |
CYGWIN
|
Mount an ext2 files system. Eko, of DD-WRT forums, contributes this tip.
Make a partition on a hard drive or USB thumb drive, then install "Ext2
Installable File System For Windows". 10MB should generally be
plenty of working directory space, but 20MB is suggested for more
optimal file system performance.
|
IV.
Acknowledgments and more
The authors and maintainers of this kit are Jeremy Collake (db90h) and Craig Heffner.
Special thanks to Solarflare, TexHex <floh@fbesser.de>,
and others.
If YOU would like to contribute to this kit, send me an email at
jeremy.collake@gmail.com or visit
the current project hosting at
http://code.google.com/p/firmware-mod-kit/ . Developers are welcome.
X. Links
X. Revision history
0.73
- New pre-req check and more modern build system (by Craig)
0.72
- Fix for recent updates to linux build tools that mandated different command line ordering (by Craig)
0.64-0.71
- See Google Code
- NG edition created by Craig Heffner (total new generation of kit)
0.63
- Added support for a new raw linux type of firmware (completely untested on the rebuild side flash, so beware)
- Added new splitter3.cc to split up this linux raw firmware type into its segments
- Other misc tweaks
0.60
- Fixed issue with non-standard du switches, i.e. under OS X.
- Fixed untrx inability to recognize squashfs signatures on big endian systems (patch from Jaifu Gao)
0.58
- Removed multi-threaded brute testing of LZMA compression params from the 'damn small' variant DD-WRT v24 uses. This may fix some
reported problems of failed thread creation.
0.56
- Add support DD-WRT v24 firmware images
- New unsquashfs variant written for DD-WRT v24
- Cleanup script output indentation, it was quite sloppy
- Apply some fixes and other tweaks
0.54
- Add support for Trendnet TEW-632BRP images
- Add support for OpenWrt White Russian images
- Don't force root user, just warn
- Other maintenance and tweaks
0.51
- Increased maximum supported size of TRX images (now can handle > 4MB images).
0.50
- Removed unnecessary -lz parameter (zlib) from gcc.
0.49
- unsquashfs: created first ever (afaik) blend of unsquashfs for squashfs
2.x images.
- mksquashfs: added 2-1.r2. Script support remains todo.
- other misc. changes.
0.48
- scripts: now use cramfsck -x to extract cramfs images instead of
uncramfs. uncramfs proved to fail to extract some images.
- dirs: renamed cramfs-1.1 to cramfs-2.x to reflect the accurate version
number.
0.471
- motorola_bin: added source code.
0.47
- wrt_vx_imgtool: added this utility, which can build, extract, view, and
fix firmware images for WRT54G(s) v5/v6 series running VxWorks.
- motorola_bin: added this binary only (linux) utility. Build script
doesn't invoke it yet, but it's easy to use for those who need it.
- untrx: minor memory leak fixed.
- docs: added some device compatibility notes and other edits.
0.46:
- scripts: added support for cramfs (testing)
- scripts: added support for WL-520/530/550G images (only 530g tested).
- sources: added cramfs 1.1 tools (mkcramfs, cramfsck)
- images: a symlink is now used between the TRX and generic image.
Previously, the intermediate TRX image was just renamed to the generic
image.
- scripts: no longer show untrx output
- docs: minor additions
0.45:
- untrx: added support for attempted detection of file system and version
and emission of appropriately named segment.
- untrx: can now handle trx's that have less than 3 segments.
- untrx: complete overhauled (needed it). many changes.
- sources: moved squashfs 3.0 stuff to a dedicated directory.
- packages: added dd-wrt package for Samba. thanks TexHex <floh@fbesser.de>.
- asustrx: updated to add -b switch for padding segments (used by
ASUS).
- asustrx: other misc. enhancements.
- scripts: added check_for_upgrade.sh which automatically checks for a
newer version of the kit. It's launched when you use extract or build
firmware.
- scripts: many other fixes and enhancements.
0.43:
- scripts: ipkg_remove.sh - rewritten core templated file removal. It
actually works now.
- scripts: moved build stuff to shared.inc, as appropriate.
- packages: added dd-wrt package KAID, mainly for removal of this
gargantuan (nearly 1MB uncompressed) package. Note: you can easily create
your own packages for easier removal of things you don't want by using the
IPK template.
0.42:
- ipk_template: added new ipk_template directory and make_ipk.sh script to
create IPKG format packages (.IPK).
- packages: added my newly created ssmtp package with nvram->conf file
startup script. Installs completely into the DD-WRT file system.
- packages: added ddwrt_packages subdirectory which will include pre-built
packages custom tailored or known to work
- scripts: ipkg_install.sh numerous improvements and fixes.
- scripts: ipkg_remove.sh numerous improvements and fixes.
- scripts: ipkg_install.sh has new untested/alpha stage capabilities to
handle IPKs with remote sources.
- docs: several updates
0.40 beta (md5: 786472cfa03fb1cd70e1b025d091168b)
- scripts: ipkg_remove.sh - new script for basic IPK package removal
- scripts: ipkg_install.sh possible OS X fixes
- scripts: ipkg_install.sh changed technique of recording installed
packages
- scripts: ipkg_install.sh outputs control file so user can see
dependencies and more
- scripts: several improvements
- docs: hopefully more readable format in places
- docs: many mods and extensions
0.33 beta
- structure: moved tool source codes to src subfolder
- scripts: added ipkg_install_all.sh to install an entire folder of
packages.
- scripts: consolidated shared code into an 'include' script
- scripts: added forgotten parameter count check to ipkg_install.sh
- scripts other minor changes
0.31 beta
- new tests indicate OS X with native HFS+ file system results in firmware
images that work just fine! This build should be fully compatible with OS X
without even necessitating HSFX use for most firmwares.
- mksquashfs: fix for big endian machines (specifically ppc / OS X)
resulting from change to support dd-wrt 08/10/06+ builds.
0.30 beta
- scripts: created symlinks that omit the .sh extension
- scripts: expanded build success check
- scripts: fixed failure to exit if tools build failed
- scripts: other minor cosmetic improvements
- untrx: fixed a file handle leak in v0.28 beta
- docs: added example procedure to install SSMTP into DD-WRT image
- docs: added table of contents
- docs: misc. additions and revisions
0.29 beta
- scripts: added ipkg_install.sh to install .IPK format packages.
0.28 beta
- the v0.26 fix for changed signature of 08/10/06 builds was
incomplete (test was flawed), resulting in builds that wouldn't run. fixed
properly now.
- mksquashfs: added -magic [file] parameter to embed whichever is used in
the original firmware
- untrx: added extraction of squashfs signature/magic for passing to
mksquashfs
- docs: added more stuff
0.27 beta
- scripts: changed warning about file system.
0.26 beta
- Fixed compatibility with DD-WRT builds 08/10/06 and higher. Brainslayer
played a joke on me.
0.25 beta
- OS X now works. When using case insensitive file system though built
firmwares might have errata.
- trx: removed this tool due to odd command line parsing bug on (big
endian?) OS X systems. asustrx now used in its place.
- scripts: file system case insensitive now warning, can be continued in
default settings.
- untrx: fixed some endian problems.
- untrx: fixed a problem with U2ND headers (previous version only worked
on trx/generic firmwares).
- docs: minor additions.
0.23 beta
- package: removed linux executables, download now half size. Surely
everyone can install basic build tools..
- scripts: added working directory file system test for case insensitivity
and write access
- scripts: added option to continue on after warning when OS X or CYGWIN
present
- scripts: removed pre-fixed script name, much cleaner looking output now
- scripts: added variable to choose whether or not to abort if file system
found incompatible
- scripts: added cleanup.sh script to clean tools and logs.
- untrx: renamed extfirmware to untrx, much more intuitive name
0.22 beta
- scripts: added support for OS X
- scripts: added support for CYGWIN
- scripts: minor cosmetic work
- extfirmware: added endian neutrality
- trx: fixed OS X support
- asustrx: fixed OS X support
0.20 beta
- scripts: added check for Linux and OS X and appropriate compatibility
messages
- extfirmware: added GNU license header
- extfirmware: removed some unnecessary header includes
- extfirmware: switched to u_int32_t for wider compatibility
- extfirmware: other minor improvements
- trx: increased maximum firmware size to 0x5A0000 (OpenWrt) from 0x3A0000
(DD-WRT).
- trx: switched to u_int32_t for wider compatibility
- makefile: uses gcc instead of cc now
- docs: several updates
v0.15 beta
- Reworked scripts so they have cleaner, clearer output and use a log file
(build.log and extract.log)
- Added more sanity checks in the scripts
- Documentation additions
- Misc. polishing
v0.13 alpha: Documentation updates, re-included pre-built executables
v0.10 alpha: First decent public release.
This document (c)2006-2011 Jeremy Collake and Craig Heffner.
All Rights reserved. This document may be freely republished in its unaltered
and whole form only. Alterations or partial publishing requires approval of
creator(s).
This kit is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
================================================
FILE: firmware_mod_kit_version.txt
================================================
0.82
================================================
FILE: ipk_template/conffiles
================================================
test
================================================
FILE: ipk_template/control
================================================
Package: package_name
Priority: optional
Section: net
Depends: libncurses
Description: Some package description.
Maintainer: Some guy
Source: N/A
Version: 1.01-1
Architecture: mipsel
================================================
FILE: ipk_template/debian_binary
================================================
2.0
================================================
FILE: ipk_template/make_ipk.sh
================================================
#!/bin/sh
VERSION="0.01 alpha"
#
# Title: make_ipk.sh
# Author: Jeremy Collake
#
# Creates a IPK from the given directory
#
#
echo "$0 (c)2006 Jeremy Collake make_ipkg.log
OLD_DIR=`pwd`
if [ -f "$2" ]; then
echo " Erasing existing $2 ..."
rm $2
#>> make_ipkg.log 2>&1
fi
##############################################
# change to package ipk folder
#
cd "$2"
##############################################
# do some cleanup from any previous runs
#
rm "packagetemp.tar"
##############################################
# create control.tar
#
echo " Creating control.tar ..."
tar -cf "control.tar" "./control" "./conffiles"
if [ $? != 0 ] || [ ! -f "control.tar" ]; then
echo " ERROR: creation of $2/control.tar failed!"
exit 2
fi
##############################################
# create control.tar.gz
#
echo " Creating control.tar.gz ..."
gzip < "control.tar" > "control.tar.gz"
if [ $? != 0 ] || [ ! -f "control.tar.gz" ]; then
echo " ERROR: creation of $2/control.tar.gz failed!"
exit 2
fi
##############################################
# create data.tar
#
# exclude control, conffiles, this script (if it exists),
# and anything else prudent to ignore
#
echo " Creating data.tar ..."
OUR_BASENAME=`basename $0`
IPK_BASENAME=`basename $1`
# just get top-level directories actually
ALL_FILES=`find "./" -maxdepth 1 | sed 1d`
rm data.tar
INPUT_FILES=" "
for i in $ALL_FILES; do
echo " Processing $i "
if [ -d $i ]; then
INPUT_FILES=`echo $INPUT_FILES "$i"`
fi
done
echo " dbg.infiles: $INPUT_FILES"
tar "--exclude=./control.tar" "--exclude=./control" "--exclude=./conffile*" "--exclude=./$OUR_BASENAME" "--exclude=./$IPK_BASENAME" "--exclude=./make_ipk*.log" -cvf data.tar $INPUT_FILES
echo " -------- current data.tar ----------"
tar -tvf data.tar
if [ $? != 0 ] || [ ! -f "data.tar" ]; then
echo " ERROR: creation of $2/data.tar failed!"
exit 2
fi
##############################################
# create data.tar.gz
#
# exclude control, conffiles, and this script if it's there..
#
echo " Creating data.tar.gz ..."
OUR_BASENAME=`basename $0`
gzip < "data.tar" > "data.tar.gz"
if [ $? != 0 ] || [ ! -f "data.tar.gz" ]; then
echo " ERROR: creation of $2/data.tar.gz failed!"
exit 2
fi
##############################################
# create PACKAGE.tar
#
tar -cf "packagetemp.tar" "./control.tar.gz" "./data.tar.gz" "./debian_binary"
if [ $? != 0 ] || [ ! -f "packagetemp.tar" ]; then
echo " ERROR: creation of packagetemp.tar failed!"
exit 2
fi
##############################################
# finally gzip the result to PACKAGE.ipk
#
gzip < "packagetemp.tar" > "$1"
if [ $? != 0 ] || [ ! -f $1 ]; then
echo " ERROR: creation of $1 failed!"
exit 2
fi
echo " Done. Created: $1"
cd $OLD_DIR
================================================
FILE: ipkg_install.sh
================================================
#!/bin/sh
#
# $Id: ipkg_install.sh 336 2012-08-04 00:12:14Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: ipkg_install.sh
# Author: Jeremy Collake
# Site: http://code.google.com/p/firmware-mod-kit/
#
# Do a really dumb package install. No dependencies,
# removal, or anything. Just extract the data files
# to the file system.
#
# See documentation at:
# http://www.bitsum.com/firmware_mod_kit.htm
#
# USAGE: ipkg_install.sh PACKAGE_SOURCE WORKING_DIRECTORY/
#
# PACKAGE_SOURCE is the path to the .PKG file.
#
# WORKING_DIRECTORY is the working directory supplied to
# extract_firmware.sh.
#
# Example:
#
# ./ipkg_install.sh nano_1.3.8-1_mipsel.ipk ../working_dir/
#
# todo: need to get full path of log file because directory
# change causes log files in both.
#
# todo: this does NOT work with sources that aren't local
# yet..
#
#
#
echo "$0 v$VERSION, (c)2006-2012 Jeremy Collake"
echo " !!WARNING!!! This script is in early alpha stage of development"
############################################333
# CleanupTmp [base_dir] [package basename]
#
# basename=name w/o IPK (contrasts below labels)
CleanupTmp()
{
echo " Cleanup" >> /dev/null 2>&1
rm -rf "$1/tmp" >> /dev/null 2>&1
rm -f "$1/$2" >> /dev/null 2>&1
}
##################################################
if [ ! $# = "2" ]; then
echo " Invalid usage"
echo " USAGE: $0 PACKAGE_PATH WORKING_DIRECTORY"
exit 1
fi
BASE_NAME=`basename $1`
echo " Installing $BASE_NAME"
####################################################
if [ ! -e "$1" ]; then
echo " ERROR: $1 does not exist."
exit 1
fi
OLD_DIR=`pwd`
##################################################
# notes:
# OS X's tar utility doesn't like GZIP'd TARs .. (re: not TAR'd GZIPs ..),
# else we could just use tar (which under linux accepts GZIPs as well).
#
mkdir -p "$2/installed_packages/" >> ipkg_install.log 2>&1
cp $1 "$2/installed_packages/"
cd "$2/installed_packages"
INSIDE_NAME=`echo "$BASE_NAME" | sed "s/.ipk/ /"`
gunzip < "$BASE_NAME" > "$INSIDE_NAME"
echo " Assuming contents bore $INSIDE_NAME"
rm -rf tmp
mkdir tmp
tar -xf "$INSIDE_NAME" -C "tmp/"
if [ $? != 0 ]; then
echo " ERROR: Extraction failed or incompatible format."
CleanupTmp "." "$INSIDE_NAME"
exit 1
fi
##################################################
echo " --------------------------------------------"
echo " Examining control files $2/rootfs ..."
echo " Pay attention to the dependencies as you"
echo " may need to install some of them ..."
echo
tar -xzvf "tmp/control.tar.gz" -C "tmp/"
if [ $? != "0" ] || [ ! -e "tmp/control" ]; then
echo " ERROR: Extraction failed of control files (missing from IPK?)"
CleanupTmp "." "$INSIDE_NAME"
cd "$OLD_DIR"
exit 1
else
# todo: add proper dependency checking and more
#
OLD_IFS="$IFS"
IFS="NEWLINE"
cat "tmp/control"
for i in $( cat "tmp/control" | sed "s/N\/A/ /" ); do
#echo " | $i"
if [ `expr "$i" : "Source"` = 7 ]; then
SOURCE_PATH=`echo $i | sed s/Source:/ /`
#echo " dbg: handling SOURCE of $SOURCE_PATH"
if [ `expr "$SOURCE_PATH" : "http://"` = 7 ] || [ `expr "$SOURCE_PATH" : "ftp://"` = 7 ]; then
echo " Found remote source .. downloading"
echo " !! THIS PART IS UNTESTED. WHO KNOWS IF IT WORKS ATM ;p"
wget "$SOURCE_PATH"
fi
fi
done
fi
IFS="$OLD_IFS"
echo " --------------------------------------------"
##################################################
echo " Extracting data files to $2/rootfs ..."
tar --overwrite -xzvf "tmp/data.tar.gz" -C "../rootfs"
# no longer do this, we'll let the user evaluate the tar output..
#if [ "$?" != "0" ]; then
# echo " ERROR: Extraction failed of data.tar.gz - missing from IPK?"
# CleanupTmp "." "$INSIDE_NAME"
# cd "$OLD_DIR"
# exit 1
#else
echo " Package installed !"
#fi
##################################################
CleanupTmp "." "$INSIDE_NAME"
cd "$OLD_DIR"
exit 0
================================================
FILE: ipkg_install_all.sh
================================================
#!/bin/sh
#
# $Id: ipkg_install_all.sh 336 2012-08-04 00:12:14Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: ipkg_install_all.sh
# Author: Jeremy Collake
# Site: hhttp://code.google.com/p/firmware-mod-kit/
#
# Invoke ipkg_install for every package in the given
# folder.
#
# See documentation at:
# http://www.bitsum.com/firmware_mod_kit.htm
#
# USAGE: ipkg_install_all.sh PACKAGES_FOLDER WORKING_DIRECTORY/
#
# PACKAGE_SOURCE is the path to the .PKG file(s).
#
# WORKING_DIRECTORY is the working directory supplied to
# extract_firmware.sh.
#
# Example:
#
# ./ipkg_install_all.sh ../packages ../working_dir/
#
echo "$0 v$VERSION, (c)2006-2012 Jeremy Collake"
##################################################
if [ ! $# = "2" ]; then
echo " Invalid usage"
echo " USAGE: $0 PACKAGE_PATH WORKING_DIRECTORY"
exit 1
fi
BASE_NAME=`basename $1`
echo " Installing $BASE_NAME"
##################################################
if [ ! -e "$1" ]; then
echo " ERROR: $1 does not exist."
exit 1
fi
##################################################
for i in $( ls "$1" ); do
./ipkg_install.sh $1/$i $2
done
================================================
FILE: ipkg_remove.sh
================================================
#!/bin/sh
#
# $Id: ipkg_remove.sh 336 2012-08-04 00:12:14Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
##################################################
#
# Title: ipkg_remove.sh
# Author: Jeremy Collake
# Site: hhttp://code.google.com/p/firmware-mod-kit/
#
#
# USAGE: ipkg_remove.sh nano_1.3.8-1_mipsel.ipk WORKING_DIRECTORY/
#
#
# Example:
#
# ./ipkg_remove.sh dd-wrt.v23_generic.bin std_generic
#
#
echo "$0 v$VERSION, (c)2006-2012 Jeremy Collake"
echo " !!WARNING!!! This script is in early alpha stage of development"
##################################################
# CleanupTmp [base_dir] [package basename]
#
CleanupTmp()
{
rm -rf "$1/tmp" >> /dev/null 2>&1
rm "$/control.tar.gz" >> /dev/null 2>&1
rm "$/data.tar.gz" >> /dev/null 2>&1
rm "$1/$2" >> /dev/null 2>&1
}
###########################################################
# DeleteWithFolderTemplate ( target_dir , template_dir )
#
# deletes files and folders from a target folder
# based on their presence in a template folder
# (all files/dirs in template folder deleted from
# target folder).
#
# This function calls itself recursively.
#
# One would think there'd be an easier way to accomplish
# this, and maybe there is... I am not a bash guru.
#
DeleteWithFolderTemplate()
{
local TARGET_DIR=$1
local TEMPLATE_DIR=$2
#echo " Processing folder $TEMPLATE_DIR .."
##################################################
for i in `ls $TEMPLATE_DIR`; do
#echo " dbg: $TEMPLATE_DIR/$i"
if [ -d $TEMPLATE_DIR/$i ]; then
if [ -L $TEMPLATE_DIR/$i ]; then
echo " Removing symbolic link $TARGET_DIR/$i"
rm $TARGET_DIR/$i >> /dev/null 2>&1
else
DeleteWithFolderTemplate $TARGET_DIR/$i $TEMPLATE_DIR/$i
# now remove folder if empty
rmdir $TARGET_DIR/$i >> /dev/null 2>&1
fi
elif [ -f $TEMPLATE_DIR/$i ]; then
echo " Removing file at $TARGET_DIR/$i"
rm $TARGET_DIR/$i >> /dev/null 2>&1
else
echo " WARNING: Unknown file type at $TEMPLATE_DIR/$i"
fi
done
}
##################################################
if [ ! $# = "2" ]; then
echo " Invalid usage"
echo " USAGE: $0 PACKAGE_PATH WORKING_DIRECTORY"
exit 1
fi
BASE_NAME=`basename $1`
echo " Removing $BASE_NAME"
####################################################
if [ ! -e "$1" ]; then
echo " ERROR: $1 does not exist."
exit 1
fi
OLD_DIR=`pwd`
##################################################
# notes:
# OS X's tar utility doesn't like GZIP'd TARs .. (re: not TAR'd GZIPs ..),
# else we could just use tar (wh##################################################ich under linux accepts GZIPs as well).
#
mkdir -p "$2/installed_packages/" >> ipkg_remove.log 2>&1
cp $1 "$2/installed_packages/"
cd "$2/installed_packages"
INSIDE_NAME=`echo "$BASE_NAME" | sed "s/.ipk/ /"`
gunzip < "$BASE_NAME" > "$INSIDE_NAME"
echo " Assuming contents bore $INSIDE_NAME"
rm -rf tmp
mkdir tmp
tar -xf "$INSIDE_NAME" -C "tmp/" >> /dev/null 2>&1
if [ $? != 0 ]; then
echo " ERROR: Extraction failed or incompatible format."
#CleanupTmp "." "$INSIDE_NAME"
exit 1
fi
##################################################
echo " Removing files from $2/rootfs ..."
rm -rf "tmp/data" >> /dev/null 2>&1
mkdir -p "tmp/data" >> /dev/null 2>&1
tar -xzvf "tmp/data.tar.gz" -C "tmp/data" >> /dev/null 2>&1
if [ $? != 0 ]; then
echo " ERROR: Extraction failed of data.tar.gz (missing from IPK?)"
CleanupTmp "." "$INSIDE_NAME"
cd "$OLD_DIR"
exit 1
else
echo " Package removed successfully!"
fi
#
# using . as a template, delete from working rootfs
#
cd "$OLD_DIR"
DeleteWithFolderTemplate $2/rootfs "$2/installed_packages/tmp/data"
cd "$2/installed_packages"
##################################################
echo " --------------------------------------------"
echo " Examining control files $2/rootfs ..."
echo " Pay attention to the dependencies as you"
echo " may want to remove some of them if not"
echo " used by any other installed package."
echo
tar -xzf "tmp/control.tar.gz" -C "tmp/"
if [ $? != 0 ] || [ ! -e "tmp/control" ]; then
echo " ERROR: Extraction failed of control files (missing from IPK?)"
CleanupTmp "." "$INSIDE_NAME"
cd "$OLD_DIR"
exit 1
else
# todo: add proper dependency checking and more
cat "tmp/control"
# if successeful, remove the package from the installed_packages
# folder
CleanupTmp "." "$INSIDE_NAME"
echo " Removing package IPK from installed_packages ..."
cd "$OLD_DIR"
fi
echo " --------------------------------------------"
##################################################
exit 0
================================================
FILE: ipkg_remove_all.sh
================================================
#!/bin/sh
#
# $Id: ipkg_remove_all.sh 336 2012-08-04 00:12:14Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: ipkg_install_all.sh
# Author: Jeremy Collake
# Site: http://code.google.com/p/firmware-mod-kit/
#
# Invoke ipkg_install for every package in the given
# folder.
#
# See documentation at:
# http://www.bitsum.com/firmware_mod_kit.htm
#
# USAGE: ipkg_remove_all.sh PACKAGES_FOLDER WORKING_DIRECTORY/
#
# PACKAGE_SOURCE is the path to the .PKG file(s).
#
# WORKING_DIRECTORY is the working directory supplied to
# extract_firmware.sh.
#
# Example:
#
# ./ipkg_remove_all.sh ../packages ../working_dir/
#
echo "$0 v$VERSION, (c)2006-2012 Jeremy Collake"
##################################################
if [ ! $# = "2" ]; then
echo " Invalid usage"
echo " USAGE: $0 PACKAGE_PATH WORKING_DIRECTORY"
exit 1
fi
BASE_NAME=`basename $1`
echo " Installing $BASE_NAME"
##################################################
if [ ! -e "$1" ]; then
echo " ERROR: $1 does not exist."
exit 1
fi
##################################################
for i in $( ls "$1" ); do
"./ipkg_remove.sh" "$1/$i" "$2"
done
================================================
FILE: old-build.sh
================================================
#!/bin/sh
#
# $Id: build_firmware.sh 333 2012-08-03 22:59:39Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: build_firmware.sh
# Author: Jeremy Collake
# Site: http://code.google.com/p/firmware-mod-kit/
#
# USAGE: old-build.sh OUTPUT_DIRECTORY/ WORKING_DIRECOTRY/
#
# This scripts builds the firmware image from [WORKING_DIRECTORY],
# with the following subdirectories:
#
# image_parts/ <- firmware seperated
# rootfs/ <- filesystem
#
# Example:
#
# ./old-build.sh new_firmwares/ std_generic/
#
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 20110225-0746-MCT - Added rebuild number.
# + Enhanced previous patch to include a rebuild
# number that increments.
# + Moved this log to below the authors space.
# 20110224-1507-MCT - Two simple mods.
# + Put the name of the build into an external file so that
# it's easier to customize.
# + Modified a var to correct the spelling. :)
# Changed FIRMARE_BASE_NAME to FIRMWARE_BASE_NAME
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
EXIT_ON_FS_PROBLEM="0"
echo
echo " Firmware Mod Kit (extract) v$VERSION, (c)2010-2012 Jeremy Collake, - Newer NG edition by Craig Heffner"
#################################################################
# function: BuildLinuxRawFirmwareType
# puts together firmwares types like the TEW-632BRP
#################################################################
BuildLinuxRawFirmwareType() {
OUTPUT_PATH=$1
PARTS_PATH=$2
OUTPUT_FIRMWARE_FILENAME="output-firmware.bin"
echo " Building firmware from directory $2 ..."
if [ ! -e "$PARTS_PATH/rootfs/" ]; then
echo " ERROR: rootfs must exist"
exit 1
fi
mkdir -p "$OUTPUT_PATH"
rm -f "$PARTS_PATH/image_parts/squashfs-3-lzma.img" "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME" "$PARTS_PATH/image_parts/rootfs.img" "$PARTS_PATH/image_parts/*.new"
if [ -f "$PARTS_PATH/.squashfs3_lzma_fs" ]; then
# make squashfs image if marker present
echo " Building squashfs-lzma file system (big endian) ..."
if [ -f "$2/.linux_raw_type3" ]; then
echo " !!! WARNING: This raw embedded linux image type is UNTESTED - added Nov 6 2010"
echo " !!! DO NOT FLASH UNLESS YOU ARE PREPARED TO RECOVER FROM A BRICKED ROUTER"
echo " !!! YOU HAVE BEEN WARNED AND ASSUME LIABILITY FOR DAMAGES IF YOU DO FLASH IT"
./src/squashfs-3.0/mksquashfs-lzma "$PARTS_PATH/rootfs/" "$PARTS_PATH/image_parts/squashfs-3-lzma.img" -all-root -be -noappend -b 65536 2>/dev/null >> build.log
else
./src/squashfs-3.0/mksquashfs-lzma "$PARTS_PATH/rootfs/" "$PARTS_PATH/image_parts/squashfs-3-lzma.img" -all-root -be -noappend 2>/dev/null >> build.log
fi
ln -s "squashfs-3-lzma.img" "$PARTS_PATH/image_parts/rootfs.img"
filesize=$(du -b "$PARTS_PATH/image_parts/squashfs-3-lzma.img" | cut -f 1)
else
# make jffs2 image if marker not present
echo " Building JFFS2 file system (big endian) ..."
./src/jffs2/mkfs.jffs2 -r "$PARTS_PATH/rootfs/" -o "$PARTS_PATH/image_parts/jffs2.img" --big-endian --squash # 2>/dev/null >> build.log
ln -s "jffs2.img" "$PARTS_PATH/image_parts/rootfs.img"
filesize=$(du -b "$PARTS_PATH/image_parts/jffs2.img" | cut -f 1)
fi
# build firmware image
cp "$PARTS_PATH/image_parts/vmlinuz" "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME"
if [ -f "$2/.linux_raw_type3" ]; then
echo " Building RAW IMAGE TYPE 3"
cat "$PARTS_PATH/image_parts/rootfs.img" >> "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME"
else
dd "if=$PARTS_PATH/image_parts/rootfs.img" "of=$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME" bs=1K seek=1024 2>/dev/null >> build.log
fi
if [ -f "$PARTS_PATH/image_parts/hwid.txt" ]; then
# user report: prepend four NULL bytes to the platform ID, causes image to be accepted on
# either TEW-632BRP A1.0 or A1.1 by effectively nullifying the platform ID
# "\000\000\000\000" >> "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME"
# now write platform ID
cat "$PARTS_PATH/image_parts/hwid.txt" >> "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME"
else
echo " ERROR: hwid.txt not found. This image needs a TARGET."
exit 1
fi
filesize=$(du -b "$OUTPUT_PATH/$OUTPUT_FIRMWARE_FILENAME" | cut -f 1)
if [ $filesize -ge 3866649 ]; then
echo " WARNING: firmware image may be too large for routers with 4MB ROM ..."
fi
}
#################################################################
# InvokeTRX ( OutputDir, WorkingDir, filesystem image filename )
#################################################################
InvokeTRX ()
{
echo " Building base firmware image (generic) ..."
SEGMENT_1="$2/image_parts/segment1"
if [ -f "$2/image_parts/segment2" ]; then
SEGMENT_2="$2/image_parts/segment2"
else
SEGMENT_2=""
fi
# I switched to asustrx due to bug in trx with big endian OS X.
# it works just like trx if you don't supply a version number (skips addver appendage)
"src/asustrx" -o "$1/$FIRMWARE_BASE_NAME.trx" \
$SEGMENT_1 $SEGMENT_2 \
"$2/image_parts/$3" \
>> build.log 2>&1
echo " Building base firmware image (asus) ..."
"src/asustrx" -p WL500gx -v 1.9.2.7 -o "$1/$FIRMWARE_BASE_NAME-asus.trx" \
$SEGMENT_1 $SEGMENT_2 \
"$2/image_parts/$3" \
>> build.log 2>&1
}
#################################################################
# CreateTargetImages ( OutputDir, WorkingDir )
#
# addpattern (HDR0) images. Maybe other model specific stuff
# later.
#################################################################
CreateTargetImages ()
{
echo " Making $1/$FIRMWARE_BASE_NAME-wrtsl54gs.bin"
if [ ! -f "$1/$FIRMWARE_BASE_NAME.trx" ]; then
echo " ERROR: Sanity check failed."
exit 1
fi
"src/addpattern" -4 -p W54U -v v4.20.6 -i "$1/$FIRMWARE_BASE_NAME.trx" \
-o "$1/$FIRMWARE_BASE_NAME-wrtsl54gs.bin" -g >> build.log 2>&1
echo " Making $1/$FIRMWARE_BASE_NAME-wrt54g.bin"
"src/addpattern" -4 -p W54G -v v4.20.6 -i "$1/$FIRMWARE_BASE_NAME.trx" \
-o "$1/$FIRMWARE_BASE_NAME-wrt54g.bin" -g >> build.log 2>&1
echo " Making $1/$FIRMWARE_BASE_NAME-wrt54gs.bin"
"src/addpattern" -4 -p W54S -v v4.70.6 -i "$1/$FIRMWARE_BASE_NAME.trx" \
-o "$1/$FIRMWARE_BASE_NAME-wrt54gs.bin" -g >> build.log 2>&1
echo " Making $1/$FIRMWARE_BASE_NAME-wrt54gsv4.bin"
"src/addpattern" -4 -p W54s -v v1.05.0 -i "$1/$FIRMWARE_BASE_NAME.trx" \
-o "$1/$FIRMWARE_BASE_NAME-wrt54gsv4.bin" -g >> build.log 2>&1
echo " Making $1/$FIRMWARE_BASE_NAME-generic.bin"
ln -s "$FIRMWARE_BASE_NAME.trx" "$1/$FIRMWARE_BASE_NAME-generic.bin" >> build.log 2>&1
}
#################################################################
# Build_WRT_Images( OutputDir, WorkingDir )
#################################################################
Build_WRT_Images ()
{
echo " Building squashfs-lzma filesystem ..."
if [ -e "$2/image_parts/squashfs-lzma-image-3_0" ]; then
if [ -f "$2/image_parts/.sq_lzma_damn_small_variant_marker" ]; then
echo " Utilizing lzma damn small variant ..."
echo " WARNING: Support for these recently added, not fully tested... be careful."
echo " Please report to jeremy.collake@gmail.com success or failure."
echo " This may take a while ..."
"src/squashfs-3.0-lzma-damn-small-variant/mksquashfs-lzma" "$2/rootfs/" "$2/image_parts/squashfs-lzma-image-new" \
-noappend -root-owned -le >> build.log
else
echo " Utilizing lzma standard variant ..."
"src/squashfs-3.0/mksquashfs-lzma" "$2/rootfs/" "$2/image_parts/squashfs-lzma-image-new" \
-noappend -root-owned -le -magic "$2/image_parts/squashfs_magic" >> build.log
fi
# -magic to fix brainslayer changing squashfs signature in 08/10/06+ firmware images
if [ $? != 0 ]; then
echo " ERROR - mksquashfs failed."
exit 1
fi
elif [ -f "$2/image_parts/squashfs-lzma-image-2_x" ]; then
echo " Utilizing squashfs lzma 2.1-r2 ..."
"src/squashfs-2.1-r2/mksquashfs-lzma" "$2/rootfs/" "$2/image_parts/squashfs-lzma-image-new" \
-noappend -le >> build.log
else
echo " ERROR - Working directory contains no sqfs filesystem?"
exit 1
fi
#################################################################
InvokeTRX "$1" "$2" "squashfs-lzma-image-new"
CreateTargetImages "$1" "$2"
}
#################################################################
# MakeCramfs (output file, root dir)
#
# invokes mkcramfs
#
#################################################################
MakeCramfs ()
{
echo " Building cramfs file system ..."
./src/cramfs-2.x/mkcramfs "$2" "$1" >> build.log 2>&1
if [ $? != 0 ]; then
echo " ERROR: creating cramfs file system failed.".
exit "$?"
else
echo " Successfully created cramfs image."
fi
}
#################################################################
# Build_WL530G_Image (OutputDir, WorkingDir, fs image filename [only] )
#
# Builds an ASUS WL530/520/550G image.
#
#################################################################
Build_WL530G_Image ()
{
echo " Building wl-530/520/550g style image (static TRX offsets)."
./src/asustrx -p WL530g -v 1.9.4.6 -o "$1/$FIRMWARE_BASE_NAME-wl530g.trx" -b 32 "$2/image_parts/segment1" -b 655360 "$2/image_parts/$3" >> build.log 2>&1
}
#################################################################
#################################################################
#################################################################
if [ $# = 2 ]; then
PlatformIdentify
#################################################################
TestFileSystemExit "$1" "$2"
#################################################################
TestIsRoot
#################################################################
if [ ! -f "./old-build.sh" ]; then
echo " ERROR - You must run this script from the same directory as it is in!"
exit 1
fi
#################################################################
if [ ! -f .firmware_rebuild_number ] ; then
FIRMWARE_REBUILD_NUMBER=1
echo ${FIRMWARE_REBUILD_NUMBER} > .firmware_rebuild_number
else
FIRMWARE_REBUILD_NUMBER=$( cat .firmware_rebuild_number )
(( FIRMWARE_REBUILD_NUMBER+=1 ))
echo ${FIRMWARE_REBUILD_NUMBER} > .firmware_rebuild_number
fi
if [ ! -f .firmware_base_name ] ; then
FIRMWARE_BASE_NAME=custom_image
echo $FIRMWARE_BASE_NAME > .firmware_base_name
else
FIRMWARE_BASE_NAME="$( cat .firmware_base_name )"
fi
FIRMWARE_BASE_NAME=$( printf "%s_%05d" ${FIRMWARE_BASE_NAME} ${FIRMWARE_REBUILD_NUMBER} )
echo "Rebuilt: ${FIRMWARE_BASE_NAME} With: Firmware Mod Kit (build) v$VERSION, (c)2010 Jeremy Collake" > "$2/rootfs/etc/rebuild_info"
#################################################################
# remove deprecated stuff
if [ -f "./src/mksquashfs.c" ] || [ -f "mksquashfs.c" ]; then
DeprecateOldVersion
fi
#################################################################
# Invoke BuildTools, which tries to build everything and then
# sets up appropriate symlinks.
#
BuildTools "build.log"
#################################################################
echo " Preparing output directory $1 ..."
mkdir -p $1 >> build.log 2>&1
rm "$1/$FIRMWARE_BASE_NAME*.*" "$1" >> build.log 2>&1
if [ -f "$2/.linux_raw_type" ]; then
echo " Detected linux raw type firmware."
BuildLinuxRawFirmwareType "$1" "$2"
elif [ -f "$2/.linux_raw_type3" ]; then
echo " Detected linux raw type firmware."
BuildLinuxRawFirmwareType "$1" "$2"
elif [ -f "$2/image_parts/.trx-sqfs" ]; then
echo " Detected WRT squashfs-lzma style."
Build_WRT_Images "$1" "$2"
elif [ -f "$2/image_parts/cramfs-image-x_x" ]; then
echo " Detected cramfs file system."
TestIsRoot
# remove old filename of new image..
rm -f "$2/image_parts/cramfs-image-1.1"
MakeCramfs "$2/image_parts/cramfs-image-new" "$2/rootfs"
# todo: rewrite this terrible test
grep "530g" "$2/image_parts/cramfs-image-x_x" >> build.log 2>&1
if [ $? = "0" ]; then
IS_530G_STYLE=1
fi
grep "550g" "$2/image_parts/cramfs-image-x_x" >> build.log 2>&1
if [ $? = "0" ]; then
IS_530G_STYLE=1
fi
grep "520g" "$2/image_parts/cramfs-image-x_x" >> build.log 2>&1
if [ $? = "0" ]; then
IS_530G_STYLE=1
fi
if [ "$IS_530G_STYLE" = "1" ]; then
Build_WL530G_Image "$1" "$2" "cramfs-image-new"
else
echo " No specific firmware type known, so am making standard images."
InvokeTRX "$1" "$2" "cramfs-image-new"
CreateTargetImages "$1" "$2"
fi
else
echo " ERROR: Unknown or unsupported firmware image."
exit 1
fi
echo " Firmware images built."
ls -l "$1"
md5sum -b "$1"/${FIRMWARE_BASE_NAME}* > "$1"/${FIRMWARE_BASE_NAME}.md5sums
echo " All done!"
else
#################################################################
echo " Incorrect usage."
echo " USAGE: $0 OUTPUT_DIR WORKING_DIR"
exit 1
fi
exit 0
================================================
FILE: old-extract.sh
================================================
#!/bin/sh
#
# $Id: extract_firmware.sh 336 2012-08-04 00:12:14Z jeremy.collake@gmail.com $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: extract_firmware.sh
# Author: Jeremy Collake
# Site: http://code.google.com/p/firmware-mod-kit/
#
# USAGE: old-extract.sh FIRMWARE_IMAGE.BIN WORKING_DIRECTORY/
#
# This scripts extacts the firmware image to [WORKING_DIRECTORY],
# with the following subdirectories:
#
# image_parts/ <- firmware seperated
# rootfs/ <- extracted filesystem
#
# Example:
#
# ./old-extract.sh dd-wrt.v23_generic.bin std_generic
#
#
EXIT_ON_FS_PROBLEM="0"
echo
echo " Firmware Mod Kit (extract) v$VERSION, (c)2010-2012 Jeremy Collake, - Newer NG edition by Craig Heffner"
#################################################################
#
# function: ExtractLinuxRawFirmwareType ()
#
# Extracts essentially 'raw' firmware images with kernel, filesystem, and hardware id
# Example is the TrendNET TEW-632BRP router.
#
ExtractLinuxRawFirmwareType ()
{
# $1 = input firmware
PARTS_PATH=$2
echo " Extracting $1 to $2 ..."
mkdir -p "$PARTS_PATH/image_parts"
if [ $? = 0 ]; then
dd "if=$1" "of=$PARTS_PATH/image_parts/vmlinuz" bs=1K count=1024 2>/dev/null >> extract.log
dd "if=$1" "of=$PARTS_PATH/image_parts/squashfs-3-lzma.img" bs=1K skip=1024 2>/dev/null >> extract.log
SYSNAME=`uname`
if [ `expr "$SYSNAME" : "Darwin"` = 6 ]; then
filesize=$(ls -la $1 | awk '{print $5}')
else
filesize=$(du --apparent-size --block-size=1 $1 | cut -f 1)
fi
filesize=$((filesize - 24))
dd "if=$1" "of=$PARTS_PATH/image_parts/hwid.txt" bs=1 skip=$filesize 2>/dev/null >> extract.log
"./src/squashfs-3.0/unsquashfs-lzma" -dest "$PARTS_PATH/rootfs" \
"$PARTS_PATH/image_parts/squashfs-3-lzma.img" 2>/dev/null >> extract.log
if [ -e "$PARTS_PATH/rootfs/" ]; then
# write a marker to indicate the firmware image type and filesystem type
touch "$PARTS_PATH/.linux_raw_type"
touch "$PARTS_PATH/.squashfs3_lzma_fs"
fi
else
echo " ERROR: Creating output directory.."
fi
}
#################################################################
#
# Main script entry
#
#################################################################
if [ $# = 2 ]; then
PlatformIdentify
#################################################################
TestFileSystemExit $1 $2
#################################################################
TestIsRoot
#################################################################
if [ -f "$1" ]; then
if [ ! -f "./old-extract.sh" ]; then
echo " ERROR - You must run this script from the same directory as it is in!"
exit 1
fi
#################################################################
# remove deprecated stuff
if [ -f "./src/mksquashfs.c" ] || [ -f "mksquashfs.c" ]; then
DeprecateOldVersion
fi
#################################################################
# Invoke BuildTools, which tries to build everything and then
# sets up appropriate symlinks.
#
BuildTools "extract.log"
#################################################################
echo " Preparing working directory ..."
echo " Removing any previous files ..."
rm -rf "$2/rootfs" >> extract.log 2>&1
rm -rf "$2/image_parts" >> extract.log 2>&1
rm -rf "$2/installed_packages" >> extract.log 2>&1
echo " Creating directories ..."
mkdir -p "$2/image_parts" >> extract.log 2>&1
mkdir -p "$2/installed_packages" >> extract.log 2>&1
echo " Extracting firmware"
"src/untrx" "$1" "$2/image_parts" >> extract.log 2>&1
if [ $? != 0 ]; then
echo "! untrx failed, trying splitter3";
"src/splitter3" "$1" "$2/image_parts" >> extract.log 2>&1
if [ $? != 0 ]; then
echo " Not recognized by splitter3";
# exit 1
else
touch "$2/.linux_raw_type3"
touch "$2/.squashfs3_lzma_fs"
fi
fi
# if unknown version, then we'll just try to use the latest UnSquashFS we have
if [ -f "$2/image_parts/squashfs-lzma-image-x_x" ]; then
ln -s "squashfs-lzma-image-x_x" "$2/image_parts/squashfs-lzma-image-3_0"
fi
# if squashfs 3.1 or 3.2, symlink it to 3.0 image, since they are compatible
if [ -f "$2/image_parts/squashfs-lzma-image-3_1" ]; then
ln -s "squashfs-lzma-image-3_1" "$2/image_parts/squashfs-lzma-image-3_0"
fi
if [ -f "$2/image_parts/squashfs-lzma-image-3_2" ]; then
ln -s "squashfs-lzma-image-3_2" "$2/image_parts/squashfs-lzma-image-3_0"
fi
if [ -f "$2/image_parts/squashfs-lzma-image-3_x" ]; then
ln -s "squashfs-lzma-image-3_x" "$2/image_parts/squashfs-lzma-image-3_0"
fi
if [ -f "$2/image_parts/squashfs-lzma-image-2_0" ]; then
ln -s "squashfs-lzma-image-2_0" "$2/image_parts/squashfs-lzma-image-2_x"
fi
if [ -f "$2/image_parts/squashfs-lzma-image-2_1" ]; then
ln -s "squashfs-lzma-image-2_1" "$2/image_parts/squashfs-lzma-image-2_x"
fi
# now unsquashfs, if filesystem is squashfs
if [ -f "$2/image_parts/squashfs-lzma-image-3_0" ]; then
echo " Attempting squashfs 3.0 lzma ..."
"src/squashfs-3.0/unsquashfs-lzma" \
-dest "$2/rootfs" "$2/image_parts/squashfs-lzma-image-3_0" 2>/dev/null >> extract.log
if [ ! -e "$2/rootfs" ]; then
echo " Trying 'damn small' variant - used by DD-WRT v24 ..."
"src/squashfs-3.0-lzma-damn-small-variant/unsquashfs-lzma" \
-dest "$2/rootfs" "$2/image_parts/squashfs-lzma-image-3_0" 2>/dev/null >> extract.log
if [ -e "$2/rootfs" ]; then
# if it worked, then write a tag so we know which squashfs variant to build the fs with
touch "$2/image_parts/.sq_lzma_damn_small_variant_marker"
touch "$2/image_parts/.trx-sqfs"
fi
else
touch "$2/image_parts/.trx-sqfs"
fi
elif [ -f "$2/image_parts/squashfs-lzma-image-2_x" ]; then
"src/squashfs-2.1-r2/unsquashfs-lzma" \
-dest "$2/rootfs" "$2/image_parts/squashfs-lzma-image-2_x" 2>/dev/null >>extract.log
if [ -e "$2/rootfs" ]; then
touch "$2/image_parts/.trx-sqfs"
else
echo " ERROR: extracting filesystem."
fi
elif [ -f "$2/image_parts/cramfs-image-x_x" ]; then
TestIsRoot
"src/cramfs-2.x/cramfsck" \
-v -x "$2/rootfs" "$2/image_parts/cramfs-image-x_x" >> extract.log 2>&1
else
echo " Attempting raw linux style firmware package (i.e. TEW-632BRP) ..."
ExtractLinuxRawFirmwareType "$1" "$2"
fi
if [ -e "$2/rootfs" ]; then
echo " Firmware appears extracted correctly!"
echo " Now make changes and run build_firmware.sh."
else
echo " Error: filesystem not extracted properly."
echo " firmware image format not compatible?"
exit 1
fi
else
echo " $1 does not exist.. give me something to work with man!"
fi
else
echo " Incorrect usage."
echo " USAGE: $0 FIRMWARE_IMAGE.BIN WORKING_DIR"
exit 1
fi
exit 0
================================================
FILE: shared-ng.inc
================================================
VERSION=$(cat firmware_mod_kit_version.txt)
IMAGE_PARTS="$DIR/image_parts"
LOGS="$DIR/logs"
CONFLOG="$LOGS/config.log"
BINLOG="$LOGS/binwalk.log"
ROOTFS="$DIR/rootfs"
FSIMG="$IMAGE_PARTS/rootfs.img"
HEADER_IMAGE="$IMAGE_PARTS/header.img"
FOOTER_IMAGE="$IMAGE_PARTS/footer.img"
FWOUT="$DIR/new-firmware.bin"
BINWALK="./src/binwalk-1.0/src/bin/binwalk-script -v -m ./src/binwalk-1.0/src/binwalk/magic/binwalk"
================================================
FILE: shared.inc
================================================
#!/bin/sh
SHARED_VERSION="$( cat firmware_mod_kit_version.txt )"
#
# Title: shared.inc
# Author: Jeremy Collake
#
# Shared functions
#
#
#
#################################################################
WarningPrompt ()
{
read -p " [ Press any key to contrinue, or abort now with break signal (CTRL-C) ]"
}
#################################################################
PlatformIdentify ()
{
SYSNAME=`uname`
if [ "$SYSNAME" = "Linux" ]; then
echo " LINUX system detected. Compatibility ok."
elif [ `expr "$SYSNAME" : "Darwin"` = 6 ]; then
echo " OS X system detected. **BETA TESTING**"
echo " This platform is not well tested."
WarningPrompt
elif [ `expr "$SYSNAME" : "CYGWIN"` = 6 ]; then
echo " CYGWIN system detected. **BETA TESTING** Built images may have problems."
echo " This platform is not well tested."
WarningPrompt
else
echo " Unknown system detected. Compatibility state is unknown."
WarningPrompt
fi
}
#################################################################
TestFileSystemExit ()
{
INPUT_FILE=$1
WORKING_DIR=$2
echo " Testing file system of $WORKING_DIR ..."
mkdir -p "$WORKING_DIR" >> /dev/null 2>&1
rm "$WORKING_DIR/test12345612.tmp" >> /dev/null 2>&1
echo test > "$WORKING_DIR/test12345612.tmp"
if [ -e "$WORKING_DIR/teST12345612.tmp" ]; then
echo " WARNING: File system $WORKING_DIR is not case sensitive."
echo " For some firmwares this can cause troubles in the"
echo " built images that result in runtime errata or"
echo " even refuse to boot."
if [ $EXIT_ON_FS_PROBLEM = "1" ]; then
rm "$WORKING_DIR/test12345612.tmp" >> /dev/null 2>&1
exit 2
else
WarningPrompt
fi
fi
if [ ! -e "$WORKING_DIR/test12345612.tmp" ]; then
echo " ERROR: File system $WORKING_DIR is not writable."
rm "$WORKING_DIR/test12345612.tmp" >> /dev/null 2>&1
exit 3
fi
rm "$WORKING_DIR/test12345612.tmp" >> /dev/null 2>&1
}
#################################################################
# LinkToolsBinraries (srcfolder, destfolder)
#LinkToolsBinaries ()
#{
## deprecated v0.44
# ln -s -f $1/asustrx $2/asustrx
# ln -s -f $1/untrx $2/untrx
# ln -s -f $1/mksquashfs $2/mksquashfs
# ln -s -f $1/mksquashfs-lzma $2/mksquashfs-lzma
# ln -s -f $1/unsquashfs $2/unsquashfs
# ln -s -f $1/unsquashfs-lzma $2/unsquashfs-lzma
# ln -s -f $1/addpattern $2/addpattern
#}
#################################################################
CleanCWD ()
{
make clean >> cleanup.log 2>&1
rm -f src/*.log >> cleanup.log 2>&1
rm -f *.log >> cleanup.log 2>&1
rm -f *.o >> cleanup.log 2>&1
rm -f asustrx >> cleanup.log 2>&1
rm -f trx >> cleanup.log 2>&1
rm -f untrx >> cleanup.log 2>&1
rm -f addpattern >> cleanup.log 2>&1
rm -f mksquashfs >> cleanup.log 2>&1
rm -f mksquashfs-lzma >> cleanup.log 2>&1
rm -f unsquashfs >> cleanup.log 2>&1
rm -f unsquashfs-lzma >> cleanup.log 2>&1
# cygwin
rm -f asustrx.exe >> cleanup.log 2>&1
rm -f trx.exe >> cleanup.log 2>&1
rm -f untrx.edxe >> cleanup.log 2>&1
rm -f addpattern.exe >> cleanup.log 2>&1
rm -f mksquashfs.exe >> cleanup.log 2>&1
rm -f mksquashfs-lzma.exe >> cleanup.log 2>&1
rm -f unsquashfs.exe >> cleanup.log 2>&1
rm -f unsquashfs-lzma.exe >> cleanup.log 2>&1
# old name for untrx, deprecated
rm -f extfirmware* >> cleanup.log 2>&1
# trx replaced with asustrx
rm -f trx.c >> cleanup.log 2>&1
}
Cleanup ()
{
CleanCWD
cd src
CleanCWD
cd ..
}
#################################################################
# BuildTools ( LOG_FILE )
#
#
BuildTools ()
{
local LOG_FILE="$1"
#################################################################
echo " Building tools ..."
#make -C src > $LOG_FILE 2>&1
cd src
./configure && make > $LOG_FILE 2>&1
cd -
if [ $? = 0 ]; then
echo " Build seems successful."
else
echo " ERROR - Build did not succeed. Check log file, you are probably"
echo " missing one or more necessary pre-requisites. See docs for"
echo " a list of pre-requsites."
if [ -e "src/untrx" ]; then
echo " CONTINUING anyway, attempting to use pre-built binaries (x32 linux)"
else
exit 1
fi
fi
#################################################################
local UNAME2=`uname`
if [ `expr "$UNAME2" : "CYGWIN"` = 6 ]; then
ln -s -f "src/asustrx.exe" "src/asustrx" >> $LOG_FILE 2>&1
ln -s -f "src/untrx.exe" "src/untrx" >> $LOG_FILE 2>&1
ln -s -f "src/addpattern.exe" "src/addpattern" >> $LOG_FILE 2>&1
ln -s -f "src/squashfs-3.0/mksquashfs-lzma.exe" "src/squashfs-3.0/mksquashfs-lzma" >> $LOG_FILE 2>&1
ln -s -f "src/squashfs-3.0/unsquashfs-lzma.exe" "src/squashfs-3.0/unsquashfs-lzma" >> $LOG_FILE 2>&1
ln -s -f "src/squashfs-3.0/mksquashfs.exe" "src/squashfs-3.0/mksquashfs" >> $LOG_FILE 2>&1
ln -s -f "src/squashfs-3.0/unsquashfs.exe" "src/squashfs-3.0/unsquashfs" >> $LOG_FILE 2>&1
fi
#################################################################
# cygwin: this can not be called before above block (no *. bins exist)
#LinkToolsBinaries "src" "."
}
#################################################################
# DeprecateOldVersion ()
#
# This is to automatically cleanup stuff that's been moved or removed
# since older versions. Aren't I nice?
#
DeprecateOldVersion ()
{
echo " Detected leftover stuff from an old version, cleaning"
mkdir "src_backup" >> upgrade.log 2>&1
mv "*.c" "src_old_backup" >> upgrade.log 2>&1
mv "*.h" "src_old_backup" >> upgrade.log 2>&1
mv "lzma" "src_old_backup" >> upgrade.log 2>&1
mv "Makefile" "src_old_backup" >> upgrade.log 2>&1
mv src/cramfs-1.1 src_backup/ >> upgrade.log 2>&1
# remove symbolic links from v0.43 and below
rm "mksquashfs" >> upgrade.log 2>&1
rm "unsquashfs" >> upgrade.log 2>&1
rm "mksquashfs-lzma" >> upgrade.log 2>&1
rm "unsquashfs-lzma" >> upgrade.log 2>&1
rm "untrx" >> upgrade.log 2>&1
rm "asustrx" >> upgrade.log 2>&1
rm "addpattern" >> upgrade.log 2>&1
# remove old sources
mv src/untrx.c src_old_backup >> upgrade.log 2>&1
mv src/mksquashfs* src_old_backup >> upgrade.log 2>&1
mv src/unsquashfs* src_old_backup >> upgrade.log 2>&1
mv src/read_* src_old_backup >> upgrade.log 2>&1
mv src/sort* src_old_backup >> upgrade.log 2>&1
mv src/global.h src_old_backup >> upgrade.log 2>&1
Cleanup
}
TestIsRootAndExitIfNot()
{
if [ $(id -u) != "0" ]; then
echo " ERROR: You must be 'root' when extracting and building some images."
echo " This is because some images need to create devices in your fs."
echo " For DD-WRT, do NOT extract or build as root, use standard user."
exit 1
fi
}
TestIsRoot()
{
if [ $(id -u) != "0" ]; then
echo " WARNING: You must be 'root' when extracting and building some images."
echo " This is because some images need to create devices in your fs."
echo " For DD-WRT, do NOT extract or build as root, use standard user."
fi
}
================================================
FILE: src/Makefile.in
================================================
CC := gcc
CXX := g++
INCLUDEDIR = .
CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2
all: asustrx addpattern untrx motorola-bin splitter3 bffutils
make -C ./uncramfs/
make -C ./uncramfs-lzma/
make -C ./cramfs-2.x/
make -C ./cramfsswap/
make -C ./squashfs-2.1-r2/
make -C ./squashfs-3.0/
make -C ./squashfs-3.0-lzma-damn-small-variant/
make -C ./wrt_vx_imgtool/
make -C ./others/
make -C ./crcalc/
make -C ./webcomp-tools/
make -C ./firmware-tools/
addpattern: addpattern.o
$(CC) addpattern.o -o $@
untrx: untrx.o
$(CXX) untrx.o -o $@
splitter3: splitter3.o
$(CXX) splitter3.o -o $@
asustrx: asustrx.o
$(CC) asustrx.o -o $@
motorola-bin: motorola-bin.o
$(CC) motorola-bin.o -o $@
bffutils:
make -C ./bff/
clean:
rm -f *.o
rm -f motorola-bin
rm -f untrx
rm -f asustrx
rm -f addpattern
rm -f splitter3
rm -f binwalk
make -C ./squashfs-2.1-r2/ clean
make -C ./squashfs-3.0 clean
make -C ./squashfs-3.0-lzma-damn-small-variant clean
make -C ./cramfs-2.x clean
make -C ./uncramfs clean
make -C ./uncramfs-lzma clean
make -C ./cramfsswap clean
make -C ./wrt_vx_imgtool clean
make -C ./others clean
make -C ./crcalc clean
make -C ./webcomp-tools clean
make -C ./binwalk*/src/ cleanall
make -C ./firmware-tools/ clean
make -C ./bff/ clean
cleanall: clean
rm -rf Makefile config.* *.cache
================================================
FILE: src/addpattern.c
================================================
/*
* Copyright (C) 2004 Manuel Novoa III
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* July 29, 2004
*
* This is a hacked replacement for the 'addpattern' utility used to
* create wrt54g .bin firmware files. It isn't pretty, but it does
* the job for me.
*
* Extensions:
* -v allows setting the version string on the command line.
* -{0|1} sets the (currently ignored) hw_ver flag in the header
* to 0 or 1 respectively.
*/
/* January 12, 2005
*
* Modified by rodent at rodent dot za dot net
* Support added for the new WRT54G v2.2 and WRT54GS v1.1 "flags"
* Without the flags set to 0x7, the above units will refuse to flash.
*
* Extensions:
* -{0|1|2} sets {0|1} sets hw_ver flag to 0/1. {2} sets hw_ver to 1
* and adds the new hardware "flags" for the v2.2/v1.1 units
*/
#include
#include
#include
#include
#include
#include
/**********************************************************************/
#define CODE_ID "U2ND" /* from code_pattern.h */
#define CODE_PATTERN "W54S" /* from code_pattern.h */
#define CYBERTAN_VERSION "v3.37.2" /* from cyutils.h */
/* WRT54G v2.2 and WRT54GS v1.1 "flags" (from 3.37.32 firmware cyutils.h) */
#define SUPPORT_4712_CHIP 0x0001
#define SUPPORT_INTEL_FLASH 0x0002
#define SUPPORT_5325E_SWITCH 0x0004
struct code_header { /* from cyutils.h */
char magic[4];
char res1[4]; /* for extra magic */
char fwdate[3];
char fwvern[3];
char id[4]; /* U2ND */
char hw_ver; /* 0: for 4702, 1: for 4712 -- new in 2.04.3 */
unsigned short flags; /* SUPPORT_ flags new for 3.37.2 (WRT54G v2.2 and WRT54GS v1.1) */
unsigned char res2[10];
} ;
/**********************************************************************/
void usage(void) __attribute__ (( __noreturn__ ));
void usage(void)
{
fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-v v#.#.#] [-{0|1|2|4}]\n");
exit(EXIT_FAILURE);
}
int main(int argc, char **argv)
{
char buf[1024]; /* keep this at 1k or adjust garbage calc below */
struct code_header *hdr;
FILE *in = stdin;
FILE *out = stdout;
char *ifn = NULL;
char *ofn = NULL;
char *pattern = CODE_PATTERN;
char *version = CYBERTAN_VERSION;
int gflag = 0;
int c;
int v0, v1, v2;
size_t off, n;
time_t t;
struct tm *ptm;
fprintf(stderr, "mjn3's addpattern replacement - v0.81\n");
hdr = (struct code_header *) buf;
memset(hdr, 0, sizeof(struct code_header));
while ((c = getopt(argc, argv, "i:o:p:gv:0124")) != -1) {
switch (c) {
case 'i':
ifn = optarg;
break;
case 'o':
ofn = optarg;
break;
case 'p':
pattern = optarg;
break;
case 'g':
gflag = 1;
break;
case 'v': /* extension to allow setting version */
version = optarg;
break;
case '0':
hdr->hw_ver = 0;
break;
case '1':
hdr->hw_ver = 1;
break;
case '2': /* new 54G v2.2 and 54GS v1.1 flags */
hdr->hw_ver = 1;
hdr->flags |= SUPPORT_4712_CHIP;
hdr->flags |= SUPPORT_INTEL_FLASH;
hdr->flags |= SUPPORT_5325E_SWITCH;
break;
case '4':
/* V4 firmware sets the flags to 0x1f */
hdr->hw_ver = 1;
hdr->flags = 0x1f;
break;
default:
usage();
}
}
if (optind != argc) {
fprintf(stderr, "illegal arg \"%s\"\n", argv[optind]);
usage();
}
if (strlen(pattern) != 4) {
fprintf(stderr, "illegal pattern \"%s\": length != 4\n", pattern);
usage();
}
if (ifn && !(in = fopen(ifn, "r"))) {
fprintf(stderr, "can not open \"%s\" for reading\n", ifn);
usage();
}
if (ofn && !(out = fopen(ofn, "w"))) {
fprintf(stderr, "can not open \"%s\" for writing\n", ofn);
usage();
}
if (time(&t) == (time_t)(-1)) {
fprintf(stderr, "time call failed\n");
return EXIT_FAILURE;
}
ptm = localtime(&t);
if (3 != sscanf(version, "v%d.%d.%d", &v0, &v1, &v2)) {
fprintf(stderr, "bad version string \"%s\"\n", version);
return EXIT_FAILURE;
}
memcpy(&hdr->magic, pattern, 4);
hdr->fwdate[0] = ptm->tm_year % 100;
hdr->fwdate[1] = ptm->tm_mon + 1;
hdr->fwdate[2] = ptm->tm_mday;
hdr->fwvern[0] = v0;
hdr->fwvern[1] = v1;
hdr->fwvern[2] = v2;
memcpy(&hdr->id, CODE_ID, strlen(CODE_ID));
off = sizeof(struct code_header);
fprintf(stderr, "writing firmware v%d.%d.%d on %d/%d/%d (y/m/d)\n",
v0, v1, v2,
hdr->fwdate[0], hdr->fwdate[1], hdr->fwdate[2]);
while ((n = fread(buf + off, 1, sizeof(buf)-off, in) + off) > 0) {
off = 0;
if (n < sizeof(buf)) {
if (ferror(in)) {
FREAD_ERROR:
fprintf(stderr, "fread error\n");
return EXIT_FAILURE;
}
if (gflag) {
gflag = sizeof(buf) - n;
memset(buf + n, 0xff, gflag);
fprintf(stderr, "adding %d bytes of garbage\n", gflag);
n = sizeof(buf);
}
}
if (!fwrite(buf, n, 1, out)) {
FWRITE_ERROR:
fprintf(stderr, "fwrite error\n");
return EXIT_FAILURE;
}
}
if (ferror(in)) {
goto FREAD_ERROR;
}
if (fflush(out)) {
goto FWRITE_ERROR;
}
fclose(in);
fclose(out);
return EXIT_SUCCESS;
}
================================================
FILE: src/asustrx.c
================================================
/*
* Copyright (C) 2004 Manuel Novoa III
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* July 29, 2004
*
* This is a hacked replacement for the 'trx' utility used to create
* wrt54g .trx firmware files. It isn't pretty, but it does the job
* for me.
*
* As an extension, you can specify a larger maximum length for the
* .trx file using '-m'. It will be rounded up to be a multiple of 4K.
* NOTE: This space will be malloc()'d.
*
* August 16, 2004
*
* Sigh... Make it endian-neutral.
*
* TODO: Support '-b' option to specify offsets for each file.
*/
/* March 04, 2005
*
* Copyright(c) 2005 Konstantin A. Klubnichkin and Oleg I. Vdovikin
*
* Added ASUS addver functionality, which is binary only
*
* addver is no longer needed, use utility like this
*
* asustrx -p WL500g -v 1.9.2.7 -o image.trx file [ file [ file ] ]
*/
/* September 22, 2006
*
* Copyright(c) 2006 Jeremy Collake
*
* Added -b switch to force a segment start offset, padding up
* to that point. This switch should immediately preceed filenames.
*
* Example of ASUS calls to their trx (addver called sperately):
*
* trx -o WL530g_$(KVER).$(FVER)_$(LANGUAGE).bin -b 32 zImage -b 655360 target.cramfs
*
*
* Also several other misc. changes where I saw appropriate.
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// always flip, regardless of endianness of machine
u_int32_t flip_endian(u_int32_t nValue)
{
// my crappy endian switch
u_int32_t nR;
u_int32_t nByte1=(nValue&0xff000000)>>24;
u_int32_t nByte2=(nValue&0x00ff0000)>>16;
u_int32_t nByte3=(nValue&0x0000ff00)>>8;
u_int32_t nByte4=nValue&0x0ff;
nR=nByte4<<24;
nR|=(nByte3<<16);
nR|=(nByte2<<8);
nR|=nByte1;
return nR;
}
#if __BYTE_ORDER == __BIG_ENDIAN
#define STORE32_LE(X) bswap_32(X)
#define READ32_LE(X) bswap_32(X)
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define STORE32_LE(X) (X)
#define READ32_LE(X) (X)
#else
#error unkown endianness!
#endif
/*jc end */
uint32_t crc32buf(char *buf, size_t len);
/**********************************************************************/
/* from trxhdr.h */
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define TRX_VERSION 1
#define TRX_MAX_LEN 0x9A0000 /* jc: change from 0x3A0000 */
#define TRX_NO_HEADER 1 /* Do not write TRX header */
struct trx_header {
uint32_t magic; /* "HDR0" */
uint32_t len; /* Length of file including header */
uint32_t crc32; /* 32-bit CRC from flag_version to end of file */
uint32_t flag_version; /* 0:15 flags, 16:31 version */
uint32_t offsets[3]; /* Offsets of partitions from start of header */
};
/**********************************************************************/
void usage(void) __attribute__ (( __noreturn__ ));
void usage(void)
{
fprintf(stderr, "Use: trx [-p prodid] [-v ver] [-o ofile] [-m maxlen] [-b offs] file [-b offs] [file [file]]\n");
exit(EXIT_FAILURE);
}
int main(int argc, char **argv)
{
FILE *out = stdout;
FILE *in;
char *ofn = NULL;
char *buf;
char *e;
int c, i;
size_t n;
uint32_t cur_len;
int boolSegmentSizesGiven=0; /* jc */
int nSegementCount=0;
unsigned long maxlen = TRX_MAX_LEN;
struct trx_header *p;
struct trx_header trxtemp;
memset(&trxtemp,0,sizeof(struct trx_header));
struct {
uint8_t version[4]; /* Firmware version */
uint8_t prod_id[12]; /* Product Id */
uint8_t comp_hw[4][4]; /* Compatible hw list maj-min min/maj-min max */
uint8_t pad[32]; /* Padding */
} asus = {
.prod_id = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* jc: initialize .prod_id */
.version = { 1, 9, 2, 7 }, /* version is set to 1.9.2.7 by default */
.comp_hw[0] = { 0, 2, 2, 99 } /* hardcoded hw compat list 0.02 - 2.99 */
};
fprintf(stderr, "mjn3's trx replacement - v0.90, modified to pack ASUS compatible trx\n");
while ((c = getopt(argc, argv, "b:o:m:p:v:")) != -1) {
switch (c) {
/* jc */
case 'b':
boolSegmentSizesGiven=1;
trxtemp.offsets[nSegementCount++]=STORE32_LE(strtoul(optarg, &e, 0));
if ((e == optarg) || *e)
{
fprintf(stderr, "illegal numeric string\n");
usage();
}
break;
/* jc end */
case 'o':
ofn = optarg;
break;
case 'm':
errno = 0;
maxlen = strtoul(optarg, &e, 0);
if (errno || (e == optarg) || *e) {
fprintf(stderr, "illegal numeric string\n");
usage();
}
#undef ROUND
#define ROUND 0x1000
if (maxlen & (ROUND-1)) {
maxlen += (ROUND - (maxlen & (ROUND-1)));
}
if (maxlen < ROUND) {
fprintf(stderr, "maxlen too small (or wrapped)\n");
usage();
}
break;
case 'p':
if ((n = strlen(optarg)) > sizeof(asus.prod_id)) {
fprintf(stderr, "product id too long\n");
usage();
}
memset(asus.prod_id, ' ', sizeof(asus.prod_id));
memcpy(asus.prod_id, optarg, n);
break;
case 'v':
for (n = 0; n < sizeof(asus.version) / sizeof(asus.version[0]); n++)
{
if (n != 0 && optarg[0] == '.' && optarg[1]) optarg++;
else if (n != 0) break;
asus.version[n] = strtoul(optarg, &optarg, 10);
}
if (*optarg)
{
fprintf(stderr, "invalid version string\n");
usage();
}
break;
default:
usage();
}
}
if (ofn && !(out = fopen(ofn, "w")))
{
fprintf(stderr, "can not open \"%s\" for writing\n", ofn);
usage();
}
if (optind == argc)
{
fprintf(stderr, "we require at least one arg\n");
usage();
}
if (argc - optind > 3)
{
fprintf(stderr, "too many args: %d > 3\n", argc - optind);
usage();
}
if (maxlen > TRX_MAX_LEN)
{
fprintf(stderr, "WARNING: maxlen exceeds default maximum! Beware of overwriting nvram!\n");
}
if (!(buf = malloc(maxlen)))
{
fprintf(stderr, "malloc failed\n");
return EXIT_FAILURE;
}
memset(buf,0,maxlen); /* jc */
p = (struct trx_header *) buf;
memcpy(p,&trxtemp,sizeof(struct trx_header)); /* jc */
p->magic = STORE32_LE(TRX_MAGIC);
cur_len = sizeof(struct trx_header);
p->flag_version = STORE32_LE((TRX_VERSION << 16));
i = 0;
while (optind < argc) {
/* jc */
if(!READ32_LE(p->offsets[i]))
{
p->offsets[i] = STORE32_LE(cur_len);
}
else
{
if(cur_len>READ32_LE(p->offsets[i]))
{
fprintf(stderr, "offset too large\n");
return EXIT_FAILURE;
}
cur_len=READ32_LE(p->offsets[i]);
}
/* jc end */
if (!(in = fopen(argv[optind], "r"))) {
fprintf(stderr, "can not open \"%s\" for reading\n", argv[optind]);
usage();
}
n = fread(buf + cur_len, 1, maxlen - cur_len, in);
if (!feof(in)) {
fprintf(stderr, "fread failure or file \"%s\" too large cur:%d max: %d\n",
argv[optind], cur_len, maxlen);
fclose(in);
return EXIT_FAILURE;
}
fclose(in);
++optind;
if (optind < argc) {
#undef ROUND
#define ROUND 4
if (n & (ROUND-1)) {
memset(buf + cur_len + n, 0, ROUND - (n & (ROUND-1)));
n += ROUND - (n & (ROUND-1));
}
}
cur_len += n;
i++;
}
/* reserve space for asus footer */
if (asus.prod_id[0]) {
cur_len += sizeof(asus);
}
#undef ROUND
#define ROUND 0x1000
n = cur_len & (ROUND-1);
if (n) {
memset(buf + cur_len, 0, ROUND - n);
cur_len += ROUND - n;
}
/* add asus footer */
if (asus.prod_id[0]) {
memcpy(buf + cur_len - sizeof(asus), &asus, sizeof(asus));
}
p->crc32 = crc32buf((char *) &p->flag_version,
cur_len - offsetof(struct trx_header, flag_version));
p->crc32 = STORE32_LE(p->crc32);
p->len = STORE32_LE(cur_len);
if (!fwrite(buf, cur_len, 1, out) || fflush(out)) {
fprintf(stderr, "fwrite failed\n");
return EXIT_FAILURE;
}
fclose(out);
return EXIT_SUCCESS;
}
/**********************************************************************/
/* The following was grabbed and tweaked from the old snippets collection
* of public domain C code. */
/**********************************************************************\
|* Demonstration program to compute the 32-bit CRC used as the frame *|
|* check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71 *|
|* and FED-STD-1003, the U.S. versions of CCITT's X.25 link-level *|
|* protocol). The 32-bit FCS was added via the Federal Register, *|
|* 1 June 1982, p.23798. I presume but don't know for certain that *|
|* this polynomial is or will be included in CCITT V.41, which *|
|* defines the 16-bit CRC (often called CRC-CCITT) polynomial. FIPS *|
|* PUB 78 says that the 32-bit FCS reduces otherwise undetected *|
|* errors by a factor of 10^-5 over 16-bit FCS. *|
\**********************************************************************/
/* Copyright (C) 1986 Gary S. Brown. You may use this program, or
code or tables extracted from it, as desired without restriction.*/
/* First, the polynomial itself and its table of feedback terms. The */
/* polynomial is */
/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
/* Note that we take it "backwards" and put the highest-order term in */
/* the lowest-order bit. The X^32 term is "implied"; the LSB is the */
/* X^31 term, etc. The X^0 term (usually shown as "+1") results in */
/* the MSB being 1. */
/* Note that the usual hardware shift register implementation, which */
/* is what we're using (we're merely optimizing it by doing eight-bit */
/* chunks at a time) shifts bits into the lowest-order term. In our */
/* implementation, that means shifting towards the right. Why do we */
/* do it this way? Because the calculated CRC must be transmitted in */
/* order from highest-order term to lowest-order term. UARTs transmit */
/* characters in order from LSB to MSB. By storing the CRC this way, */
/* we hand it to the UART in the order low-byte to high-byte; the UART */
/* sends each low-bit to hight-bit; and the result is transmission bit */
/* by bit from highest- to lowest-order term without requiring any bit */
/* shuffling on our part. Reception works similarly. */
/* The feedback terms table consists of 256, 32-bit entries. Notes: */
/* */
/* 1. The table can be generated at runtime if desired; code to do so */
/* is shown later. It might not be obvious, but the feedback */
/* terms simply represent the results of eight shift/xor opera- */
/* tions for all combinations of data and CRC register values. */
/* */
/* 2. The CRC accumulation logic is the same for all CRC polynomials, */
/* be they sixteen or thirty-two bits wide. You simply choose the */
/* appropriate table. Alternatively, because the table can be */
/* generated at runtime, you can start by generating the table for */
/* the polynomial in question and use exactly the same "updcrc", */
/* if your application needn't simultaneously handle two CRC */
/* polynomials. (Note, however, that XMODEM is strange.) */
/* */
/* 3. For 16-bit CRCs, the table entries need be only 16 bits wide; */
/* of course, 32-bit entries work OK if the high 16 bits are zero. */
/* */
/* 4. The values must be right-shifted by eight bits by the "updcrc" */
/* logic; the shift must be unsigned (bring in zeroes). On some */
/* hardware you could probably optimize the shift in assembler by */
/* using byte-swap instructions. */
static const uint32_t crc_32_tab[] = { /* CRC polynomial 0xedb88320 */
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
#define UPDC32(octet,crc) (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8))
uint32_t crc32buf(char *buf, size_t len)
{
uint32_t crc;
crc = 0xFFFFFFFF;
for ( ; len; --len, ++buf)
{
crc = UPDC32(*buf, crc);
}
return crc;
}
================================================
FILE: src/bff/Makefile
================================================
all:
gcc bff_huffman_decompress.c -o bff_huffman_decompress
clean:
rm -f bff_huffman_decompress
distclean: clean
================================================
FILE: src/bff/bff_huffman_decompress.c
================================================
/*-
* Copyright (c) 2009 Xin LI
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
// compile it using: gcc bff_huffman_decompress.c -o bff_huffman_decompress
// use it as: ./bff_huffman_decompress sampleBff_file0 sampleBff_file0_parsed
/*
* pack(1) file format:
*
* The first byte is the header:
* 00 - Level for the huffman tree (<=24)
*
* pack(1) will then store symbols (leaf) nodes count in each huffman
* tree levels, each level would consume 1 byte (See [1]).
*
* After the symbol count table, there is the symbol table, storing
* symbols represented by corresponding leaf node. EOB is not being
* explicitly transmitted (not necessary anyway) in the symbol table.
*
* Compressed data goes after the symbol table.
*
* NOTES
*
* [1] If we count EOB into the symbols, that would mean that we will
* have at most 256 symbols in the huffman tree. pack(1) rejects empty
* file and files that just repeats one character, which means that we
* will have at least 2 symbols. Therefore, pack(1) would reduce the
* last level symbol count by 2 which makes it a number in
* range [0..254], so all levels' symbol count would fit into 1 byte.
*/
#include
#include
#include
#define PACK_HEADER_LENGTH 1
#define HTREE_MAXLEVEL 24
/*
* unpack descriptor
*
* Represent the huffman tree in a similar way that pack(1) would
* store in a packed file. We store all symbols in a linear table,
* and store pointers to each level's first symbol. In addition to
* that, maintain two counts for each level: inner nodes count and
* leaf nodes count.
*/
typedef struct {
int symbol_size; /* Size of the symbol table */
int treelevels; /* Levels for the huffman tree */
int *symbolsin; /* Table of leaf symbols count in
each level */
int *inodesin; /* Table of internal nodes count in
each level */
char *symbol; /* The symbol table */
char *symbol_eob; /* Pointer to the EOB symbol */
char **tree; /* Decoding huffman tree (pointers to
first symbol of each tree level */
off_t uncompressed_size; /* Uncompressed size */
FILE *fpIn; /* Input stream */
FILE *fpOut; /* Output stream */
} unpack_descriptor_t;
int maybe_err(char*fmt,...) {
}
int maybe_errx(char*fmt,...) {
}
/*
* Release resource allocated to an unpack descriptor.
*
* Caller is responsible to make sure that all of these pointers are
* initialized (in our case, they all point to valid memory block).
* We don't zero out pointers here because nobody else would ever
* reference the memory block without scrubbing them.
*/
static void
unpack_descriptor_fini(unpack_descriptor_t *unpackd)
{
free(unpackd->symbolsin);
free(unpackd->inodesin);
free(unpackd->symbol);
free(unpackd->tree);
fclose(unpackd->fpIn);
fclose(unpackd->fpOut);
}
/*
* Recursively fill the internal node count table
*/
static void
unpackd_fill_inodesin(const unpack_descriptor_t *unpackd, int level)
{
/*
* The internal nodes would be 1/2 of total internal nodes and
* leaf nodes in the next level. For the last level there
* would be no internal node by definition.
*/
if (level < unpackd->treelevels) {
unpackd_fill_inodesin(unpackd, level + 1);
unpackd->inodesin[level] = (unpackd->inodesin[level + 1] +
unpackd->symbolsin[level + 1]) / 2;
} else
unpackd->inodesin[level] = 0;
}
/*
* Update counter for accepted bytes
*/
static void
accepted_bytes(off_t *bytes_in, off_t newbytes)
{
if (bytes_in != NULL)
(*bytes_in) += newbytes;
}
/*
* Read file header and construct the tree. Also, prepare the buffered I/O
* for decode routine.
*
* Return value is uncompressed size.
*/
static void
unpack_parse_header(int in, int out, char *pre, size_t prelen, off_t *bytes_in,
unpack_descriptor_t *unpackd)
{
unsigned char hdr[PACK_HEADER_LENGTH]; /* buffer for header */
ssize_t bytesread; /* Bytes read from the file */
int i, j, thisbyte;
/* Prepend the header buffer if we already read some data */
if (prelen != 0)
memcpy(hdr, pre, prelen);
/* Read in and fill the rest bytes of header */
bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen);
if (bytesread < 0)
maybe_err("Error reading pack header");
accepted_bytes(bytes_in, PACK_HEADER_LENGTH);
/* Reset uncompressed size */
unpackd->uncompressed_size = 0;
/* Get the levels of the tree */
unpackd->treelevels = hdr[0];
if (unpackd->treelevels > HTREE_MAXLEVEL || unpackd->treelevels < 1)
maybe_errx("Huffman tree has insane levels");
/* Let libc take care for buffering from now on */
if ((unpackd->fpIn = fdopen(in, "r")) == NULL)
maybe_err("Can not fdopen() input stream");
if ((unpackd->fpOut = fdopen(out, "w")) == NULL)
maybe_err("Can not fdopen() output stream");
/* Allocate for the tables of bounds and the tree itself */
unpackd->inodesin =
calloc(unpackd->treelevels, sizeof(*(unpackd->inodesin)));
unpackd->symbolsin =
calloc(unpackd->treelevels, sizeof(*(unpackd->symbolsin)));
unpackd->tree =
calloc(unpackd->treelevels, (sizeof (*(unpackd->tree))));
if (unpackd->inodesin == NULL || unpackd->symbolsin == NULL ||
unpackd->tree == NULL)
maybe_err("calloc");
/* We count from 0 so adjust to match array upper bound */
unpackd->treelevels--;
/* Read the levels symbol count table and calculate total */
unpackd->symbol_size = 1; /* EOB */
for (i = 0; i <= unpackd->treelevels; i++) {
if ((thisbyte = fgetc(unpackd->fpIn)) == EOF)
maybe_err("File appears to be truncated");
unpackd->symbolsin[i] = (unsigned char)thisbyte;
unpackd->symbol_size += unpackd->symbolsin[i];
}
accepted_bytes(bytes_in, unpackd->treelevels);
if (unpackd->symbol_size > 256)
maybe_errx("Bad symbol table");
/* Allocate for the symbol table, point symbol_eob at the beginning */
unpackd->symbol_eob = unpackd->symbol = calloc(1, unpackd->symbol_size);
if (unpackd->symbol == NULL)
maybe_err("calloc");
/*
* Read in the symbol table, which contain [2, 256] symbols.
* In order to fit the count in one byte, pack(1) would offset
* it by reducing 2 from the actual number from the last level.
*
* We adjust the last level's symbol count by 1 here, because
* the EOB symbol is not being transmitted explicitly. Another
* adjustment would be done later afterward.
*/
unpackd->symbolsin[unpackd->treelevels]++;
for (i = 0; i <= unpackd->treelevels; i++) {
unpackd->tree[i] = unpackd->symbol_eob;
for (j = 0; j < unpackd->symbolsin[i]; j++) {
if ((thisbyte = fgetc(unpackd->fpIn)) == EOF)
maybe_errx("Symbol table truncated");
*unpackd->symbol_eob++ = (char)thisbyte;
}
accepted_bytes(bytes_in, unpackd->symbolsin[i]);
}
/* Now, take account for the EOB symbol as well */
unpackd->symbolsin[unpackd->treelevels]++;
/*
* The symbolsin table has been constructed now.
* Calculate the internal nodes count table based on it.
*/
unpackd_fill_inodesin(unpackd, 0);
}
/*
* Decode huffman stream, based on the huffman tree.
*/
static void
unpack_decode(unpack_descriptor_t *unpackd, off_t *bytes_in)
{
int thislevel, thiscode, thisbyte, inlevelindex;
int i;
off_t bytes_out = 0;
const char *thissymbol; /* The symbol pointer decoded from stream */
/*
* Decode huffman. Fetch every bytes from the file, get it
* into 'thiscode' bit-by-bit, then output the symbol we got
* when one has been found.
*
* Assumption: sizeof(int) > ((max tree levels + 1) / 8).
* bad things could happen if not.
*/
thislevel = 0;
thiscode = thisbyte = 0;
while ((thisbyte = fgetc(unpackd->fpIn)) != EOF) {
accepted_bytes(bytes_in, 1);
/*
* Split one bit from thisbyte, from highest to lowest,
* feed the bit into thiscode, until we got a symbol from
* the tree.
*/
for (i = 7; i >= 0; i--) {
thiscode = (thiscode << 1) | ((thisbyte >> i) & 1);
/* Did we got a symbol? (referencing leaf node) */
if (thiscode >= unpackd->inodesin[thislevel]) {
inlevelindex =
thiscode - unpackd->inodesin[thislevel];
if (inlevelindex > unpackd->symbolsin[thislevel])
maybe_errx("File corrupt");
thissymbol =
&(unpackd->tree[thislevel][inlevelindex]);
if (thissymbol == unpackd->symbol_eob)
goto finished;
fputc((*thissymbol), unpackd->fpOut);
bytes_out++;
/* Prepare for next input */
thislevel = 0; thiscode = 0;
} else {
thislevel++;
if (thislevel > unpackd->treelevels)
maybe_errx("File corrupt");
}
}
}
finished:
if (bytes_out != unpackd->uncompressed_size)
maybe_errx("Premature EOF");
unpackd->uncompressed_size=bytes_out; // hack
}
/* Handler for pack(1)'ed file */
static off_t
unpack(int in, int out, char *pre, size_t prelen, off_t *bytes_in)
{
unpack_descriptor_t unpackd;
unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd);
unpack_decode(&unpackd, bytes_in);
unpack_descriptor_fini(&unpackd);
/* If we reached here, the unpack was successful */
return (unpackd.uncompressed_size);
}
void
usage() {
printf("Usage:\n ./bff_huffman_decompress INFILE OUTFILE\n");
}
int
main(int argc,char**argv) {
if (argc<3) {
fprintf(stderr,"[!] Please specify the input and output file as command line arguments\n");
usage();
return 1;
}
FILE*in=fopen(argv[1],"r");
if (!in) {
fprintf(stderr,"[-] Could *not* open input file\n");
return 1;
}
int in_fd=fileno(in);
FILE*out=fopen(argv[2],"w");
if (!out) {
fprintf(stderr,"[-] Could *not* open output file\n");
return 1;
}
int out_fd=fileno(out);
off_t uncompressed_size=unpack(in_fd,out_fd,0,0,0);
if (uncompressed_size>0) {
printf("[+] File was successfully decompressed, decompressed size is %lu (%luKB)\n",
uncompressed_size,uncompressed_size/1024);
return 0;
} else {
fprintf(stderr,"[-] Decompression of the file *not* succeeded. FAILED!\n");
return 1;
}
return 0;
}
================================================
FILE: src/bff/bffxtractor.py
================================================
#!/usr/bin/env python
# A hacky extraction utility for extracting the contents of BFF volume entries.
# It can't parse a BFF file itself, but expects the BFF volume entry to already
# be extracted to a file; it then extracts the original file from the volume entry
# file. Thus, it is best used with binwalk.
import os
import sys
import struct
import subprocess
## {{{ http://code.activestate.com/recipes/82465/ (r4)
def _mkdir(newdir):
"""works the way a good mkdir should :)
- already exists, silently complete
- regular file in the way, raise an exception
- parent directory(ies) does not exist, make them as well
"""
if os.path.isdir(newdir):
pass
elif os.path.isfile(newdir):
raise OSError("a file with the same name as the desired " \
"dir, '%s', already exists." % newdir)
else:
head, tail = os.path.split(newdir)
if head and not os.path.isdir(head):
_mkdir(head)
#print "_mkdir %s" % repr(newdir)
if tail:
os.mkdir(newdir)
## end of http://code.activestate.com/recipes/82465/ }}}
HUFFMAN_MAGIC = 0xEA6C
MAGICS = [0xEA6B, HUFFMAN_MAGIC, 0xEA6D]
HEADER_SIZE = 64
POST_HEADER_SIZE = 40
script_path = os.path.dirname(os.path.realpath(__file__))
try:
fd = open(sys.argv[1], 'rb')
except:
print "Usage: %s " % sys.argv[0]
sys.exit(1)
header = fd.read(HEADER_SIZE)
magic = struct.unpack(" $(MAGIC).binwalk
for FILE in magic/*; do \
cat $$FILE >> $(MAGIC).binwalk ; \
done
install:
mkdir -p $(ETC)
mkdir -p $(BIN)
cp $(MAGIC).* $(ETC)
cp binwalk $(BIN)/binwalk
clean:
rm -f binwalk *.o
cleanall: clean
rm -rf $(FILE)
rm -rf config.* *.cache
rm -f Makefile
distclean: cleanall
rm -rf $(ETC)
rm -f $(BIN)/binwalk
================================================
FILE: src/binwalk-0.4.1/src/binwalk.c
================================================
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "update.h"
#include "binwalk.h"
int main(int argc, char *argv[])
{
char *out_file = NULL, *last_optarg = NULL;
char *magic_file_contents = NULL, *marker = NULL, *magic = NULL;
size_t mfsize = 0;
int c = 0, i = 0;
int filter_count = 0, magic_offset = 0, magic_size = 0, wildcard = 0, num_sigs = 0, check_magic_file = 0, fast_filter = 0;
int update = 0, ignore_short_sigs = 1, use_default_filters = 1;
int retval = EXIT_FAILURE;
struct magic_signature *signatures[MAX_SIGNATURES];
struct magic_filter *filters[MAX_FILTERS];
struct binconf config = { 0 };
int long_opt_index = 0;
char *short_options = "b:l:m:o:f:y:x:i:aAcCdkstvquh";
struct option long_options[] = {
{ "align", required_argument, NULL, 'b' },
{ "length", required_argument, NULL, 'l' },
{ "magic", required_argument, NULL, 'm' },
{ "offset", required_argument, NULL, 'o' },
{ "file", required_argument, NULL, 'f' },
{ "search", required_argument, NULL, 'y' },
{ "exclude", required_argument, NULL, 'x' },
{ "include", required_argument, NULL, 'i' },
{ "all", no_argument, NULL, 'a' },
{ "opcodes", no_argument, NULL, 'A' },
{ "validate", no_argument, NULL, 'c' },
{ "cast", no_argument, NULL, 'C' },
{ "defaults", no_argument, NULL, 'd' },
{ "keep-going", no_argument, NULL, 'k' },
{ "smart", no_argument, NULL, 's' },
{ "fast", no_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "quiet", no_argument, NULL, 'q' },
{ "update", no_argument, NULL, 'u' },
{ "help", no_argument, NULL, 'h' },
{ 0, 0, 0, 0 }
};
/* Need at least one argument: the target file */
if(argc == 1)
{
usage(argv[0]);
goto end;
}
/* Initialize global variables */
memset((void *) &globals,0,sizeof(globals));
/* Initialize default configuration settings */
config.flags = MAGIC_NONE;
config.align = DEFAULT_BYTE_ALIGN;
config.smart = 1;
while((c = getopt_long(argc, argv, short_options, long_options, &long_opt_index)) != -1)
{
switch(c)
{
case 'a':
ignore_short_sigs = 0;
break;
case 'b':
config.align = str2int(optarg);
break;
case 'c':
check_magic_file = 1;
break;
case 'C':
config.magic = strdup(MAGIC_CAST);
config.flags |= MAGIC_CONTINUE;
break;
case 'A':
config.magic = strdup(MAGIC_ARCH);
ignore_short_sigs = 0;
break;
case 'f':
out_file = strdup(optarg);
break;
case 'i':
add_filter(filters, &filter_count, FILTER_ADD, optarg);
break;
case 'l':
config.length = str2int(optarg);
break;
case 'm':
config.magic = strdup(optarg);
break;
case 'o':
config.offset = str2int(optarg);
break;
case 'd':
use_default_filters = 0;
break;
case 's':
config.smart = 0;
break;
case 't':
fast_filter = 1;
break;
case 'k':
config.flags |= MAGIC_CONTINUE;
break;
case 'y':
fast_filter = 1;
use_default_filters = 0;
add_filter(filters, &filter_count, FILTER_INCLUDE, optarg);
break;
case 'x':
add_filter(filters, &filter_count, FILTER_EXCLUDE, optarg);
break;
case 'q':
globals.quiet = 1;
break;
case 'u':
update = 1;
break;
case 'v':
config.verbose = 1;
break;
default:
usage(argv[0]);
goto end;
}
/* Keep a copy of the last optarg so we can distinguish between option arguments and file names later on */
if(optarg)
{
if(last_optarg) free(last_optarg);
last_optarg = strdup(optarg);
}
}
/* Update magic files from SVN repository */
if(update)
{
printf("Updating magic signatures...");
if(update_magic_file(BINWALK_UPDATE_URL, MAGIC) &&
update_magic_file(BINCAST_UPDATE_URL, MAGIC_CAST) &&
update_magic_file(BINARCH_UPDATE_URL, MAGIC_ARCH))
{
printf("finished.\n");
retval = EXIT_SUCCESS;
}
else
{
printf("failed.\n");
}
goto end;
}
/* Unless otherwise specified, apply default filters */
if(use_default_filters)
{
add_filter(filters, &filter_count, FILTER_ADD, GZIP_FILTER);
add_filter(filters, &filter_count, FILTER_ADD, LZMA_FILTER);
add_filter(filters, &filter_count, FILTER_ADD, JFFS_FILTER);
add_filter(filters, &filter_count, FILTER_EXCLUDE, INVALID_FILTER);
}
/* Use the default magic file if none was specified on the command line */
if(config.magic == NULL)
{
config.magic = strdup(MAGIC);
}
/* Initialize libmagic */
config.cookie = magic_open(config.flags);
if(!config.cookie)
{
fprintf(stderr,"ERROR: Failed to initialize libmagic: %s\n", magic_error(config.cookie));
goto end;
}
/* Validate the magic file */
if(check_magic_file)
{
if(magic_check(config.cookie, config.magic) != 0)
{
fprintf(stderr, "ERROR: Invalid magic file '%s': %s\n", config.magic, magic_error(config.cookie));
}
else
{
retval = EXIT_SUCCESS;
}
goto end;
}
/* If an output file was specified, open it */
if(out_file != NULL)
{
globals.fsout = fopen(out_file,"w");
if(!globals.fsout)
{
perror("ERROR: Failed to open output file for writing");
goto end;
}
}
/* Load the magic signatures file */
if(magic_load(config.cookie, config.magic) == -1)
{
fprintf(stderr,"ERROR: Failed to load magic file '%s': %s\n", config.magic, magic_error(config.cookie));
goto end;
}
if(config.smart)
{
/* Load magic signatures into the signatures struct array. */
magic_file_contents = (char *) file_read((char *) config.magic, &mfsize);
marker = magic_file_contents;
for(i=0; i= '0' && marker[0] <= '9')
{
/* Parse out the magic value, file offset and size for this entry */
magic = parse_magic(marker, &magic_offset, &magic_size, &wildcard, filters, filter_count, ignore_short_sigs, fast_filter);
if(magic && magic_size > 0)
{
signatures[num_sigs] = malloc(sizeof(struct magic_signature));
signatures[num_sigs]->size = magic_size;
signatures[num_sigs]->offset = magic_offset;
signatures[num_sigs]->wildcard = wildcard;
signatures[num_sigs]->signature = malloc(magic_size);
memcpy(signatures[num_sigs]->signature, magic, magic_size);
num_sigs++;
}
if(magic) free(magic);
}
/* Find the next new line. Break if not found, skip to the next character if one is found. */
marker = strstr(marker, "\n");
if(!marker) break;
marker++;
}
}
else
{
num_sigs = 1;
}
/* Process all the files specified on the command line */
for(i=argc-1; i>0; i--)
{
/* If we've gotten to the arguments, we're done */
if((argv[i][0] == '-') ||
((last_optarg != NULL) && (strcmp(argv[i], last_optarg) == 0))
)
{
break;
}
retval = process_file(argv[i], &config, signatures, num_sigs, filters, filter_count);
}
end:
if(config.magic) free(config.magic);
if(magic_file_contents) munmap((void *) magic_file_contents, mfsize);
if(globals.fsout != NULL) fclose(globals.fsout);
if(config.cookie) magic_close(config.cookie);
return retval;
}
/* Search a file for magic signatures */
int process_file(char *bin_file, struct binconf *config, struct magic_signature **signatures, int num_sigs, struct magic_filter **filters, int filter_count)
{
char *md5 = NULL, *current_time = NULL, *ptr = NULL;
const void *buffer = NULL, *type = NULL;
size_t fsize = 0;
int i = 0, j = 0, retval = EXIT_FAILURE;
/* Read in the target file */
buffer = file_read(bin_file, &fsize);
if(!buffer || fsize == 0)
{
fprintf(stderr,"ERROR: Failed to read file '%s'.\n", bin_file);
goto end;
}
/* If no scan length was specified, scan the entire file */
if(!config->length || config->length > fsize)
{
config->length = fsize;
}
/* Sanity check on the length + offset values */
if((config->length + config->offset) > fsize)
{
config->length -= (config->length + config->offset) - fsize;
}
if(config->verbose)
{
md5 = md5_string((void *) buffer,fsize);
current_time = timestamp();
print("\n");
print("Scan Time: %s\n", current_time);
print("Magic File: %s\n", config->magic);
if(config->smart)
{
print("Signatures: %d\n", num_sigs);
}
else
{
print("Signatures: *\n");
}
print("Target File: %s\n", bin_file);
print("MD5 Checksum: %s\n", md5);
if(current_time) free(current_time);
if(md5) free(md5);
}
print("\nDECIMAL \tHEX \tDESCRIPTION\n");
print("-------------------------------------------------------------------------------------------------------\n");
/* Loop through the file contents starting at the given offset.
* Honor the given byte alignment (i.e., if align == 4, only look at every 4th byte).
* Stop looping when length bytes have been searched, or when the end of the file is reached.
*/
for(i=config->offset; ((i-config->offset)length && i<(fsize-config->align)); i+=config->align)
{
for(j=0; jsmart || (i+signatures[j]->offset < fsize))
{
/* Pre-screen data for magic file signatures prior to invoking libmagic. This significantly improves scan time. */
if(!config->smart ||
signatures[j]->wildcard == 1 ||
memcmp((buffer+i+signatures[j]->offset), signatures[j]->signature, signatures[j]->size) == 0
)
{
/* Since we found a signature match, ask libmagic to further examine the given offset into the file buffer */
type = magic_buffer(config->cookie, buffer+i, (fsize-i));
/* Ignore NULL, ".*text.*" and "data" responses */
if(type != NULL && strncmp(type,DATA,DATA_SIZE) != 0 && strstr(type,TEXT) == NULL)
{
/*
* If filters were specified and the filter check specifies that
* result should be excluded, then don't display it.
*/
if(filter_count > 0)
{
/* Don't display anything that has been explicitly marked in the exclude list */
if(filter_check(filters, filter_count, (char *) type) == RESULT_EXCLUDE)
{
break;
}
}
/* Prettify output if multiple matches were found at the same offset */
if((config->flags | MAGIC_CONTINUE) == config->flags)
{
while((ptr = strstr(type, MULTIPLE_MATCH_DELIM)))
{
memcpy(ptr, MULTIPLE_MATCH_NEWLINE, MULTIPLE_MATCH_SIZE);
}
}
print("%-10d\t0x%-8X\t",i,i);
print("%s\n",type);
break;
}
}
}
}
}
print("\n");
retval = EXIT_SUCCESS;
end:
if(buffer) munmap((void *) buffer, fsize);
return retval;
}
void usage(char *progname)
{
fprintf(stderr,"\n");
fprintf(stderr,"Binwalk v%s\n", PACKAGE_VERSION);
fprintf(stderr,"\n");
fprintf(stderr,"Usage: %s [OPTIONS] [FILE1] [FILE2] [FILE3] ...\n", progname);
fprintf(stderr,"\n");
fprintf(stderr,USAGE_OPTIONS, MAGIC, GZIP_FILTER, LZMA_FILTER, JFFS_FILTER, INVALID_FILTER);
fprintf(stderr,"\n");
return;
}
================================================
FILE: src/binwalk-0.4.1/src/binwalk.h
================================================
#ifndef BINWALK_H
#define BINWALK_H
#include
#include "md5.h"
#include "mparse.h"
#include "filter.h"
#include "common.h"
#include "config.h"
/* These should get defined by the Makefile. If not, default to /etc/binwalk/magic.bin*. */
#ifndef MAGIC
#define MAGIC "/etc/binwalk/magic.binwalk"
#endif
#ifndef MAGIC_CAST
#define MAGIC_CAST "/etc/binwalk/magic.bincast"
#endif
#ifndef MAGIC_ARCH
#define MAGIC_ARCH "/etc/binwalk/magic.binarch"
#endif
#define DATA "data"
#define DATA_SIZE 4
#define TEXT "text"
#define DEFAULT_BYTE_ALIGN 1
#define PROGRESS_INTERVAL 1000
#define MAX_SIGNATURES 8192
#define MULTIPLE_MATCH_DELIM "\\012- "
#define MULTIPLE_MATCH_NEWLINE "\r\n\t\t\t\t"
#define MULTIPLE_MATCH_SIZE 6
#define GZIP_FILTER "gzip"
#define LZMA_FILTER "lzma"
#define JFFS_FILTER "jffs2"
#define INVALID_FILTER "invalid"
#define USAGE_OPTIONS "\
OPTIONS\n\
\t-o, --offset= File offset to start searching at\n\
\t-l, --length= Number of bytes to search\n\
\t-b, --align= Set byte alignment\n\
\t-f, --file= Log results to file\n\
\t-m, --magic= Magic file to use [%s]\n\
\t-y, --search= Only search for matches that have in their description (implies -n, -t)\n\
\t-x, --exclude= Exclude matches that have in their description\n\
\t-i, --include= Include matches that are normally excluded and that have in their description *\n\
\t-a, --all Search for all matches, including those that are normally excluded *\n\
\t-d, --defaults Speed up scan by disabling default filters **\n\
\t-t, --fast Speed up scan by only loading signatures specified by -i or -y\n\
\t-u, --update Update magic signature files\n\
\t-v, --verbose Enable verbose mode\n\
\t-s, --smart Disable smart matching (implies -a)\n\
\t-k, --keep-going Don't stop at the first match\n\
\t-c, --validate Validate magic file\n\
\t-q, --quiet Supress output to stdout\n\
\t-A, --opcodes Scan for executable code (implies -a)\n\
\t-C, --cast Cast file contents as various data types (implies -k)\n\
\n\n\
* Signatures of two bytes or less are excluded by default. Use -i or -a to include them in the search.\n\
\n\
** Default filters include '%s', '%s' and '%s' results, and exclude '%s' results. Disabling the default\n\
filters will speed up scan time, but may miss these file types.\n\
"
struct magic_signature
{
int offset;
int size;
int wildcard;
char *signature;
};
struct binconf
{
int smart;
int verbose;
int flags;
int offset;
int align;
int length;
char *magic;
magic_t cookie;
};
void usage(char *progname);
int process_file(char *bin_file, struct binconf *config, struct magic_signature **signatures, int num_sigs, struct magic_filter **filters, int filter_count);
#endif
================================================
FILE: src/binwalk-0.4.1/src/common.c
================================================
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "common.h"
#ifdef __linux
#include
#endif
/* Convert decimal and hexadecimal strings to integers */
int str2int(char *str)
{
int val = 0;
int strsize = 0;
int base = 10;
char *strptr = NULL;
char buffer[INT_MAX_STR_SIZE] = { 0 };
if(str != NULL)
{
strsize = strlen(str);
if(strsize < INT_MAX_STR_SIZE)
{
memcpy((void *) &buffer, str, strsize);
strptr = (char *) &buffer;
/* If the string starts with '0x' or '\x', or if it ends in 'h' or 'H', treat it as hex */
if(strsize >= 2)
{
if(strptr[1] == 'x')
{
strptr += 2;
base = 16;
}
else if(strptr[strsize-1] == 'h' || strptr[strsize-1] == 'H')
{
strptr[strsize-1] = '\0';
base = 16;
}
}
val = strtol(strptr,NULL,base);
}
}
return val;
}
/* Reads in and returns the contents and size of a given file */
const void *file_read(char *file, size_t *fsize)
{
int fd = 0;
size_t file_size = 0;
struct stat _fstat = { 0 };
const void *buffer = NULL;
fd = open(file, O_RDONLY);
if(!fd)
{
perror(file);
goto end;
}
if(stat(file, &_fstat) == -1)
{
perror(file);
goto end;
}
if(_fstat.st_size > 0)
{
file_size = _fstat.st_size;
}
#ifdef __linux
else
{
long long long_file_size = 0;
/* Special files may report a zero size in stat(); must get their file size via an ioctl call */
if(ioctl(fd, BLKGETSIZE64, &long_file_size) == -1)
{
perror("ioctl");
goto end;
}
else
{
file_size = (size_t) long_file_size;
}
}
#endif
if(file_size > 0)
{
buffer = mmap(NULL, file_size, PROT_READ, (MAP_SHARED | MAP_NORESERVE), fd, 0);
if(buffer == MAP_FAILED)
{
perror("mmap");
buffer = NULL;
}
else
{
*fsize = file_size;
}
}
end:
if(fd) close(fd);
return buffer;
}
/* Print messages to both the log file and stdout, as appropriate */
void print(const char* format, ...)
{
va_list args;
va_start(args,format);
if(globals.fsout != NULL)
{
vfprintf(globals.fsout,format,args);
fflush(globals.fsout);
}
if(globals.quiet == 0)
{
vfprintf(stdout,format,args);
fflush(stdout);
}
va_end(args);
return;
}
/* Returns the current timestamp as a string */
char *timestamp()
{
time_t t = { 0 };
struct tm *tmp = NULL;
char *ts = NULL;
t = time(NULL);
tmp = localtime(&t);
if(!tmp)
{
perror("Localtime failure");
goto end;
}
ts = malloc(MAX_TIMESTAMP_SIZE);
if(!ts)
{
perror("Malloc failure");
goto end;
}
memset(ts,0,MAX_TIMESTAMP_SIZE);
if(strftime(ts,MAX_TIMESTAMP_SIZE-1,TIMESTAMP_FORMAT,tmp) == 0)
{
if(ts) free(ts);
ts = NULL;
}
end:
return ts;
}
================================================
FILE: src/binwalk-0.4.1/src/common.h
================================================
#ifndef COMMON_H
#define COMMON_H
#define INT_MAX_STR_SIZE 1024
#define MAX_TIMESTAMP_SIZE 1024
#define TIMESTAMP_FORMAT "%b %d, %Y @ %T"
/* These globals are set once, read many */
struct bin_globals
{
FILE *fsout;
int quiet;
} globals;
int str2int(char *str);
const void *file_read(char *file, size_t *fsize);
void print(const char* format, ...);
char *timestamp();
#endif
================================================
FILE: src/binwalk-0.4.1/src/configure
================================================
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for binwalk 0.4.1.
#
# Report bugs to .
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
else
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
"
as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
as_have_required=no
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
CONFIG_SHELL=$as_shell as_have_required=yes
if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
break 2
fi
fi
done;;
esac
as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
$as_echo "$0: This script requires a shell more modern than all"
$as_echo "$0: the shells that I found on your system."
if test x${ZSH_VERSION+set} = xset ; then
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: http://code.google.com/p/binwalk/issues/list about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
# as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with status $?, using 1 if that was 0.
as_fn_error ()
{
as_status=$?; test $as_status -eq 0 && as_status=1
if test "$3"; then
as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
$as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
as_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
# Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
' <$as_myself |
sed '
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
test -n "$DJDIR" || exec 7<&0 &1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='binwalk'
PACKAGE_TARNAME='binwalk'
PACKAGE_VERSION='0.4.1'
PACKAGE_STRING='binwalk 0.4.1'
PACKAGE_BUGREPORT='http://code.google.com/p/binwalk/issues/list'
PACKAGE_URL=''
ac_unique_file="md5.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include
#ifdef HAVE_SYS_TYPES_H
# include
#endif
#ifdef HAVE_SYS_STAT_H
# include
#endif
#ifdef STDC_HEADERS
# include
# include
#else
# ifdef HAVE_STDLIB_H
# include
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include
# endif
# include
#endif
#ifdef HAVE_STRINGS_H
# include
#endif
#ifdef HAVE_INTTYPES_H
# include
#endif
#ifdef HAVE_STDINT_H
# include
#endif
#ifdef HAVE_UNISTD_H
# include
#endif"
ac_subst_vars='LTLIBOBJS
DOFILE
FILE
LIBOBJS
EGREP
GREP
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_static
enable_libmagic
enable_updates
'
ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'
ac_prev=
ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval $ac_prev=\$ac_option
ac_prev=
continue
fi
case $ac_option in
*=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
*) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
-datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
| --dataroo | --dataro | --datar)
ac_prev=datarootdir ;;
-datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
| --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
-docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
docdir=$ac_optarg ;;
-dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
ac_prev=dvidir ;;
-dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
ac_prev=htmldir ;;
-htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
| --ht=*)
htmldir=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localedir | --localedir | --localedi | --localed | --locale)
ac_prev=localedir ;;
-localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
localedir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
ac_prev=pdfdir ;;
-pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
pdfdir=$ac_optarg ;;
-psdir | --psdir | --psdi | --psd | --ps)
ac_prev=psdir ;;
-psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
psdir=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
as_fn_error "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
"*) ;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
ac_unrecognized_sep=', ';;
esac
eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) as_fn_error "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information."
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
as_fn_error "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
as_fn_error "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
case $ac_val in
*/ )
ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
eval $ac_var=\$ac_val;;
esac
# Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
fi
ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
as_fn_error "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
as_fn_error "pwd does not report name of working directory"
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
eval ac_env_${ac_var}_set=\${${ac_var}+set}
eval ac_env_${ac_var}_value=\$${ac_var}
eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
eval ac_cv_env_${ac_var}_value=\$${ac_var}
done
#
# Report the --help message.
#
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 binwalk 0.4.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/binwalk]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of binwalk 0.4.1:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-static perform static build
--enable-libmagic build against libmagic
--disable-updates disable update features that rely on libcurl
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
LIBS libraries to pass to the linker, e.g. -l
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
you have headers in a nonstandard directory
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to .
_ACEOF
ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d "$ac_dir" ||
{ cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
# Check for guested configure.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
elif test -f "$ac_srcdir/configure"; then
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
binwalk configure 0.4.1
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit
fi
## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##
# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof ($2))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
if (sizeof (($2)))
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_type
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then :
ac_retval=0
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_compile
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_header_compiler=yes
else
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
ac_header_preproc=yes
else
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
yes:no: )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
;;
no:yes:* )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( cat <<\_ASBOX
## ----------------------------------------------------------- ##
## Report this to http://code.google.com/p/binwalk/issues/list ##
## ----------------------------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_mongrel
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case declares $2.
For example, HP-UX 11i declares gettimeofday. */
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $2 (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef $2
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $2 ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$2 || defined __stub___$2
choke me
#endif
int
main ()
{
return $2 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_func
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 binwalk $as_me 0.4.1, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
$as_echo "PATH: $as_dir"
done
IFS=$as_save_IFS
} >&5
cat >&5 <<_ACEOF
## ----------- ##
## Core tests. ##
## ----------- ##
_ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
for ac_arg
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
case $ac_arg in
*=* | --config-cache | -C | -disable-* | --disable-* \
| -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
| -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
| -with-* | --with-* | -without-* | --without-* | --x)
case "$ac_configure_args0 " in
"$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
esac
;;
-* ) ac_must_keep_next=true ;;
esac
fi
as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
(
for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
(set) 2>&1 |
case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
sed -n \
"s/'\''/'\''\\\\'\'''\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
;; #(
*)
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
sort
)
echo
cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
echo
for ac_var in $ac_subst_vars
do
eval ac_val=\$$ac_var
case $ac_val in
*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
$as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
## ------------------- ##
## File substitutions. ##
## ------------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
eval ac_val=\$$ac_var
case $ac_val in
*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
$as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
echo
cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
$as_echo "$as_me: caught signal $ac_signal"
$as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
$as_echo "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_URL "$PACKAGE_URL"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
else
ac_site_file1=$ac_default_prefix/share/config.site
ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val=\$ac_cv_env_${ac_var}_value
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
# differences in whitespace do not lead to failure.
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
CC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
$as_echo "$ac_ct_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ac_ct_CC" && break
done
if test "x$ac_ct_CC" = x; then
CC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
fi
fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "no acceptable C compiler found in \$PATH
See \`config.log' for more details." "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
sed '10a\
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
rm -f $ac_rmfiles
if { { ac_try="$ac_link_default"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
# safe: cross compilers may not add the suffix if given an `-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
break;;
* )
break;;
esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
if test -z "$ac_file"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." "$LINENO" 5; }
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of object files: cannot compile
See \`config.log' for more details." "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#include
#include
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
inside strings and character constants. */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
xno)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
FILE="file-5.07"
CFLAGS="-Wall $CFLAGS"
LDFLAGS="-lz $LDFLAGS"
# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then :
enableval=$enable_static; STATIC=y
else
STATIC=n
fi
# Check whether --enable-libmagic was given.
if test "${enable_libmagic+set}" = set; then :
enableval=$enable_libmagic; MAGIC=y
else
MAGIC=n
fi
# Check whether --enable-updates was given.
if test "${enable_updates+set}" = set; then :
enableval=$enable_updates; CURL=n
else
CURL=y
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." "$LINENO" 5; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
ac_path_GREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_GREP_found && break 3
done
done
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
ac_path_EGREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_EGREP_found && break 3
done
done
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :
else
cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF
fi
for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
if test "x$ac_cv_header_stdlib_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_malloc_0_nonnull=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include
#else
char *malloc ();
#endif
int
main ()
{
return ! malloc (0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_malloc_0_nonnull=yes
else
ac_cv_func_malloc_0_nonnull=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
if test $ac_cv_func_malloc_0_nonnull = yes; then :
$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
else
$as_echo "#define HAVE_MALLOC 0" >>confdefs.h
case " $LIBOBJS " in
*" malloc.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS malloc.$ac_objext"
;;
esac
$as_echo "#define malloc rpl_malloc" >>confdefs.h
fi
for ac_header in arpa/inet.h fcntl.h stdlib.h string.h unistd.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"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
else
echo "error: missing necessary header file" && exit
fi
done
for ac_func in memset strdup strstr strtol
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"
eval as_val=\$$as_ac_var
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
else
as_fn_error "\"Missing necessary function\"" "$LINENO" 5
fi
done
if test $CURL = y
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
if test "${ac_cv_lib_curl_curl_easy_init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char curl_easy_init ();
int
main ()
{
return curl_easy_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_curl_curl_easy_init=yes
else
ac_cv_lib_curl_curl_easy_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
if test "x$ac_cv_lib_curl_curl_easy_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCURL 1
_ACEOF
LIBS="-lcurl $LIBS"
else
echo "error: missing libcurl library" && exit
fi
for ac_header in curl/curl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
if test "x$ac_cv_header_curl_curl_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CURL_CURL_H 1
_ACEOF
else
echo "error: missing curl header files" && exit
fi
done
LDFLAGS="-lcurl $LDFLAGS"
else
CFLAGS="-DNOCURL $CFLAGS"
fi
if test $MAGIC = n
then
tar -zxvf $FILE.tar.gz && cd $FILE && ./configure && cd -
DOFILE="file"
CFLAGS="$CFLAGS -I./$FILE/src"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_buffer in -lmagic" >&5
$as_echo_n "checking for magic_buffer in -lmagic... " >&6; }
if test "${ac_cv_lib_magic_magic_buffer+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmagic $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char magic_buffer ();
int
main ()
{
return magic_buffer ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_magic_magic_buffer=yes
else
ac_cv_lib_magic_magic_buffer=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_buffer" >&5
$as_echo "$ac_cv_lib_magic_magic_buffer" >&6; }
if test "x$ac_cv_lib_magic_magic_buffer" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMAGIC 1
_ACEOF
LIBS="-lmagic $LIBS"
else
echo "error: missing libmagic library" && exit
fi
for ac_header in magic.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
if test "x$ac_cv_header_magic_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MAGIC_H 1
_ACEOF
else
echo "error: missing libmagic header files" && exit
fi
done
DOFILE=""
LDFLAGS="-lmagic $LDFLAGS"
fi
if test $STATIC = y
then
CLIBS=$(curl-config --static-libs)
LDFLAGS="-static $CLIBS $LDFLAGS"
fi
cp confdefs.h config.h
FILE=$FILE
DOFILE=$DOFILE
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems. If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
eval ac_val=\$$ac_var
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
sort
) |
sed '
/^ac_cv_env_/b end
t clear
:clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
:mline
/\\$/{
N
s,\\\n,,
b mline
}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
g
s/^\n//
s/\n/ /g
p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in #(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with status $?, using 1 if that was 0.
as_fn_error ()
{
as_status=$?; test $as_status -eq 0 && as_status=1
if test "$3"; then
as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
$as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by binwalk $as_me 0.4.1, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
on `(hostname || uname -n) 2>/dev/null | sed 1q`
"
_ACEOF
case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
--config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
Configuration files:
$config_files
Report bugs to ."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
binwalk config.status 0.4.1
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
test -n "\$AWK" || AWK=awk
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
$as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h | --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) as_fn_error "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
fi
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
$as_echo "$ac_log"
} >&5
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
tmp=
trap 'exit_status=$?
{ test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\r'
else
ac_cs_awk_cr=$ac_cr
fi
echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
{
echo "cat >conf$$subs.awk <<_ACEOF" &&
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' >$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
}
{
line = $ 0
nfields = split(line, field, "@")
substed = 0
len = length(field[1])
for (i = 2; i < nfields; i++) {
key = field[i]
keylen = length(key)
if (S_is_set[key]) {
value = S[key]
line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
len += length(value) + length(field[++i])
substed = 1
} else
len += 1 + keylen
}
print line
}
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
|| as_fn_error "could not setup config files machinery" "$LINENO" 5
_ACEOF
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/
s/:*\${srcdir}:*/:/
s/:*@srcdir@:*/:/
s/^\([^=]*=[ ]*\):*/\1/
s/:*$//
s/^[^=]*=[ ]*$//
}'
fi
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
eval set X " :F $CONFIG_FILES "
shift
for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
:L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
ac_save_IFS=$IFS
IFS=:
set x $ac_tag
IFS=$ac_save_IFS
shift
ac_file=$1
shift
case $ac_mode in
:L) ac_source=$1;;
:[FH])
ac_file_inputs=
for ac_f
do
case $ac_f in
-) ac_f="$tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
$as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
ac_sed_conf_input=`$as_echo "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
|| as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix
case $srcdir in
.) # We are building in place.
ac_srcdir=.
ac_top_srcdir=$ac_top_builddir_sub
ac_abs_top_srcdir=$ac_pwd ;;
[\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir
ac_abs_top_srcdir=$srcdir ;;
*) # Relative name.
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_build_prefix$srcdir
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
case $ac_mode in
:F)
#
# CONFIG_FILE
#
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
p
q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
s&@infodir@&$infodir&g
s&@localedir@&$localedir&g
s&@mandir@&$mandir&g
s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
|| as_fn_error "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
|| as_fn_error "could not create $ac_file" "$LINENO" 5
;;
esac
done # for ac_tag
as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded. So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status. When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
ac_config_status_args=
test "$silent" = yes &&
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit $?
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
================================================
FILE: src/binwalk-0.4.1/src/configure.ac
================================================
dnl Many thanks to Anthony Basile for the initial configure script and Makefile
AC_PREREQ([2.65])
AC_INIT([binwalk],[0.4.1],[http://code.google.com/p/binwalk/issues/list])
AC_CONFIG_SRCDIR([md5.c])
AC_PROG_CC
AC_LANG(C)
FILE="file-5.07"
CFLAGS="-Wall $CFLAGS"
LDFLAGS="-lz $LDFLAGS"
AC_ARG_ENABLE([static], [ --enable-static perform static build ], [STATIC=y], [STATIC=n])
AC_ARG_ENABLE([libmagic], [ --enable-libmagic build against libmagic ], [MAGIC=y], [MAGIC=n])
AC_ARG_ENABLE([updates], [ --disable-updates disable update features that rely on libcurl ], [CURL=n], [CURL=y])
AC_TYPE_SIZE_T
AC_FUNC_MALLOC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h stdlib.h string.h unistd.h],[],[echo "error: missing necessary header file" && exit])
AC_CHECK_FUNCS([memset strdup strstr strtol],[],AC_MSG_ERROR(["Missing necessary function"]))
if test $CURL = y
then
AC_CHECK_LIB([curl],[curl_easy_init],[],[echo "error: missing libcurl library" && exit],[])
AC_CHECK_HEADERS([curl/curl.h],[],[echo "error: missing curl header files" && exit])
LDFLAGS="-lcurl $LDFLAGS"
else
CFLAGS="-DNOCURL $CFLAGS"
fi
dnl extract and run file utility configure script
if test $MAGIC = n
then
tar -zxvf $FILE.tar.gz && cd $FILE && ./configure && cd -
DOFILE="file"
CFLAGS="$CFLAGS -I./$FILE/src"
else
AC_CHECK_LIB([magic],[magic_buffer],[],[echo "error: missing libmagic library" && exit],[])
AC_CHECK_HEADERS([magic.h],[],[echo "error: missing libmagic header files" && exit])
DOFILE=""
LDFLAGS="-lmagic $LDFLAGS"
fi
dnl curl static libs only required if we're doing a static build
if test $STATIC = y
then
CLIBS=$(curl-config --static-libs)
LDFLAGS="-static $CLIBS $LDFLAGS"
fi
cp confdefs.h config.h
AC_SUBST(FILE, $FILE)
AC_SUBST(DOFILE, $DOFILE)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
================================================
FILE: src/binwalk-0.4.1/src/filter.c
================================================
#include
#include
#include
#include
#include "filter.h"
/* Appends a new filter to the filters array */
void add_filter(struct magic_filter *filters[], int *filter_count, enum filter_type_t type, char* filter)
{
if(*filter_count < MAX_FILTERS)
{
filters[*filter_count] = malloc(sizeof(struct magic_filter));
if(filters[*filter_count] != NULL)
{
memset(filters[*filter_count], 0, sizeof(struct magic_filter));
filters[*filter_count]->type = type;
filters[*filter_count]->filter = strdup(filter);
uppercase(filters[*filter_count]->filter);
*filter_count = *filter_count+1;
}
else
{
perror("Malloc failure");
}
}
return;
}
/* Check to see if the description matches any of the include / exclude filters */
enum filter_result_t filter_check(struct magic_filter *filters[], int filter_count, char *description)
{
int i = 0;
enum filter_result_t found = RESULT_NOT_FOUND;
/* If include filters have been specified, then ONLY those descriptions that match the include filters
* should be used. Loop through to see if there are any include filters; if so, make sure this desciption
* matches one of the include filters.
*/
for(i=0; itype == FILTER_INCLUDE || filters[i]->type == FILTER_ADD)
{
/* If an explicit include filter was specified, then default to RESULT_EXCLUDE unless a match is found */
if(filters[i]->type == FILTER_INCLUDE)
{
found = RESULT_EXCLUDE;
}
if(string_contains(description, filters[i]->filter))
{
found = RESULT_INCLUDE;
break;
}
}
}
/* Check to see if description matches any exclude filters */
for(i=0; itype == FILTER_EXCLUDE)
{
if(string_contains(description, filters[i]->filter))
{
found = RESULT_EXCLUDE;
break;
}
}
}
return found;
}
/* Performs a case-insensitive string search */
int string_contains(char *haystack, char *needle)
{
char *my_haystack = NULL;
int retval = 0;
/* Duplicate the haystack string, as we will be converting it to all uppercase */
my_haystack = strdup(haystack);
if(!my_haystack)
{
perror("strdup");
}
else
{
/* Convert haystack to all upper case */
uppercase(my_haystack);
/* Search for needle in haystack */
if(strstr(my_haystack, needle) != NULL)
{
retval = 1;
}
}
if(my_haystack) free(my_haystack);
return retval;
}
/* Convert a given string to all upper case */
void uppercase(char *string)
{
int i = 0;
for(i=0; i\n__________E MIPS archive
>20 string U with MIPS Ucode members
>21 string L with MIPSEL members
>21 string B with MIPSEB members
>19 string L and an EL hash table
>19 string B and an EB hash table
>22 string X -- out of date
# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
0 string JARCS JAR (ARJ Software, Inc.) archive data
# ARJ archiver (jason@jarthur.Claremont.EDU)
0 leshort 0xea60 ARJ archive data
!:mime application/x-arj
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
>8 byte &0x20 backup,
>34 string x original name: %s,
>7 byte 0 os: MS-DOS
>7 byte 1 os: PRIMOS
>7 byte 2 os: Unix
>7 byte 3 os: Amiga
>7 byte 4 os: Macintosh
>7 byte 5 os: OS/2
>7 byte 6 os: Apple ][ GS
>7 byte 7 os: Atari ST
>7 byte 8 os: NeXT
>7 byte 9 os: VAX/VMS
>3 byte >0 %d]
# [JW] idarc says this is also possible
2 leshort 0xea60 ARJ archive data
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
>8 byte &0x20 backup,
>34 string x original name: %s,
>7 byte 0 os: MS-DOS
>7 byte 1 os: PRIMOS
>7 byte 2 os: Unix
>7 byte 3 os: Amiga
>7 byte 4 os: Macintosh
>7 byte 5 os: OS/2
>7 byte 6 os: Apple ][ GS
>7 byte 7 os: Atari ST
>7 byte 8 os: NeXT
>7 byte 9 os: VAX/VMS
>3 byte >0 %d]
# RAR archiver (Greg Roelofs, newt@uchicago.edu)
0 string Rar! RAR archive data [NSRL|RAR]
# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
0 string HPAK HPACK archive data [NSRL|HPAK]
# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
0 string \351,\001JAM\ JAM archive, [NSRL|JAM]
# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
2 string -lh0- LHarc 1.x archive data [lh0] [NSRL|LHA1]
2 string -lh1- LHarc 1.x archive data [lh1] [NSRL|LHA1]
2 string -lz4- LHarc 1.x archive data [lz4] [NSRL|LHA1]
2 string -lz5- LHarc 1.x archive data [lz5] [NSRL|LHA1]
# [never seen any but the last; -lh4- reported in comp.compression:]
2 string -lzs- LHa 2.x? archive data [lzs] [NSRL|LHA2]
2 string -lh\40- LHa 2.x? archive data [lh ] [NSRL|LHA2]
2 string -lhd- LHa 2.x? archive data [lhd] [NSRL|LHA2]
2 string -lh2- LHa 2.x? archive data [lh2] [NSRL|LHA2]
2 string -lh3- LHa 2.x? archive data [lh3] [NSRL|LHA2]
2 string -lh4- LHa (2.x) archive data [lh4] [NSRL|LHA2]
2 string -lh5- LHa (2.x) archive data [lh5] [NSRL|LHA2]
2 string -lh6- LHa (2.x) archive data [lh6] [NSRL|LHA2]
2 string -lh7- LHa (2.x) archive data [lh7] [NSRL|LHA2]
# SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
0 string SQSH squished archive data (Acorn RISCOS) [NSRL|SQSH]
# UC2 archiver (Greg Roelofs, newt@uchicago.edu)
# I can't figure out the self-extracting form of these buggers...
0 string UC2\x1a UC2 archive data [NSRL|UC2]
# Zoo archiver
20 lelong 0xfdc4a7dc Zoo archive data [NSRL|ZOO]
# Shell archives
# JT, 2004-03-17: The "#" in the middle of the line makes it look like the
# rest of the line is commented out - I guess it's OK? Beware if parsing!
10 string #\ This\ is\ a\ shell\ archive shell archive text [NSRL|SH]
#
# LBR. NB: May conflict with the questionable
# "binary Computer Graphics Metafile" format.
#
0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data [NSRL|LBR]
#
# PMA (CP/M derivative of LHA)
#
2 string -pm0- PMarc archive data [pm0] [NSRL|PMA]
2 string -pm1- PMarc archive data [pm1] [NSRL|PMA]
2 string -pm2- PMarc archive data [pm2] [NSRL|PMA]
2 string -pms- PMarc SFX archive (CP/M, DOS) [NSRL|PMA-SFX]
5 string -pc1- PopCom compressed executable archive (CP/M) [NSRL|PPC-SFX]
# From rafael@icp.inpg.fr (Rafael Laboissiere)
# The Project Revision Control System (see
# http://www.XCF.Berkeley.EDU/~jmacd/prcs.html) generates a packaged project
# file which is recognized by the following entry:
0 leshort 0xeb81 PRCS packaged project archive [NSRL|PRCS]
# GTKtalog catalogs
# by David Necas (Yeti)
4 string gtktalog\ GTKtalog catalog data archive, [NSRL|GTK]
>>14 beshort 0x677a (gzipped)
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.bootloaders
================================================
#---------------------------Bootloaders--------------------------------
# CFE bootloader
0 string CFE1CFE1 CFE boot loader, little endian
0 string 1EFC1EFC CFE boot loader, big endian
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.compressed
================================================
#------------------Compression Formats-----------------------------
# bzip2
0 string BZh
>4 string 1AY&SY bzip2 compressed data
!:mime application/x-bzip2
>>3 byte >47 \b, block size = %c00k
# lzip
0 string LZIP lzip compressed data
!:mime application/x-lzip
>4 byte x \b, version: %d
# LZO
0 string \211LZO\000\015\012\032\012 LZO compressed data
# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
# http://www.7-zip.org or DOC/7zFormat.txt
#
0 string 7z\274\257\047\034 7-zip archive data,
>6 byte x version %d
>7 byte x \b.%d
# standard unix compress
0 beshort 0x1f9d compress'd data
>2 byte&0x80 >0 block compressed
>2 byte&0x1f x %d bits
# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
# Edited by Chris Chittleborough , March 2002
# * Original filename is only at offset 10 if "extra field" absent
# * Produce shorter output - notably, only report compression methods
# other than 8 ("deflate", the only method defined in RFC 1952).
0 string \037\213 gzip compressed data
!:mime application/x-gzip
>2 byte <8 \b, reserved (invalid) method
>2 byte >8 \b, unknown (invalid) method
>3 byte &0x01 \b, ASCII
>3 byte &0x02 \b, has CRC
>3 byte &0x04 \b, extra field
>3 byte&0xC =0x08
>>10 string x \b, was "%s"
>3 byte &0x10 \b, has comment
>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
>9 byte =0x01 \b, from Amiga
>9 byte =0x02 \b, from VMS
>9 byte =0x03 \b, from Unix
>9 byte =0x04 \b, from VM/CMS
>9 byte =0x05 \b, from Atari
>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT)
>9 byte =0x07 \b, from MacOS
>9 byte =0x08 \b, from Z-System
>9 byte =0x09 \b, from CP/M
>9 byte =0x0A \b, from TOPS/20
>9 byte =0x0B \b, from NTFS filesystem (NT)
>9 byte =0x0C \b, from QDOS
>9 byte =0x0D \b, from Acorn RISCOS
>9 byte >0x0D \b, invalid source
>3 byte &0x10 \b, comment
>3 byte &0x20 \b, encrypted
# Dates before 1992 are invalid, unless of course you're DD-WRT in which
# case you don't know how to set a date in your gzip files. Brilliant.
>4 lelong =0 \b, DD-WRT date:
>4 lelong <0 \b, invalid date:
>4 lelong >0
>>4 lelong <694224000 \b, invalid date:
>>4 lelong =694224000 \b, invalid date:
>>4 lelong >694224000 \b, last modified:
>4 ledate x %s
>8 byte 2 \b, max compression
>8 byte 4 \b, max speed
# Zlib signatures
0 beshort 0x789C zlib compressed data
0 beshort 0x78DA zlib compressed data
0 beshort 0x7801 zlib compressed data
# Supplementary magic data for the file(1) command to support
# rzip(1). The format is described in magic(5).
#
# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with
# this file.
#
0 string RZIP rzip compressed data
>4 byte x - version %d
>5 byte x \b.%d
>6 belong x (%d bytes)
# ZIP compression (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004 Zip archive data,
>4 byte 0x00 v0.0
!:mime application/zip
>4 byte 0x09 at least v0.9 to extract
!:mime application/zip
>4 byte 0x0a at least v1.0 to extract
!:mime application/zip
>4 byte 0x0b at least v1.1 to extract
!:mime application/zip
>0x161 string WINZIP WinZIP self-extracting
!:mime application/zip
>4 byte 0x14
>>30 ubelong !0x6d696d65 at least v2.0 to extract
!:mime application/zip
# Alternate ZIP string (amc@arwen.cs.berkeley.edu)
0 string PK00PK\003\004 Zip archive data [NSRL|ZIP]
# Type: LZMA
# URL: http://www.7-zip.org/sdk.html
#
# Added additional parsing to help verify LZMA matches and weed out false positives.
# Added improved signature checking.
# Added checks for possibly (probably) invalid matches.
# From: Craig Heffner
#First LZMA signature
0 string \x5d\x00\x00 LZMA compressed data,
>0 leshort >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
#An alternative common LZMA signature
1 belong 0x00008000 LZMA compressed data,
>0 byte 0 invalid
>0 leshort >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
#Signature for less common LZMA flag/dictionary values. Results in lots of false positives, but usually marked as invalid.
1 beshort 0x0000 LZMA compressed data,
>0 byte 0 invalid
>0 byte >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.executables
================================================
#------------------Standard file formats------------------------------------
# elf: file(1) magic for ELF executables
#
# We have to check the byte order flag to see what byte order all the
# other stuff in the header is in.
#
# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
#
# Created by: unknown
# Modified by (1): Daniel Quinlan
# Modified by (2): Peter Tobias (core support)
# Modified by (3): Christian 'Dr. Disk' Hechelmann (fix of core support)
# Modified by (4): (VMS Itanium)
# Modified by (5): Matthias Urlichs (Listing of many architectures)
0 string \177ELF ELF
>4 byte 0 invalid class
>4 byte 1 32-bit
>4 byte 2 64-bit
>5 byte 0 invalid byte order
>5 byte 1 LSB
>>16 leshort 0 no file type,
!:strength *2
!:mime application/octet-stream
>>16 leshort 1 relocatable,
!:mime application/x-object
>>16 leshort 2 executable,
!:mime application/x-executable
>>16 leshort 3 shared object,
!:mime application/x-sharedlib
>>16 leshort 4 core file
!:mime application/x-coredump
# Core file detection is not reliable.
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) lelong >0 (signal %d),
>>16 leshort &0xff00 processor-specific,
>>18 leshort 0 no machine,
>>18 leshort 1 AT&T WE32100 - invalid byte order,
>>18 leshort 2 SPARC - invalid byte order,
>>18 leshort 3 Intel 80386,
>>18 leshort 4 Motorola
>>>36 lelong &0x01000000 68000 - invalid byte order,
>>>36 lelong &0x00810000 CPU32 - invalid byte order,
>>>36 lelong 0 68020 - invalid byte order,
>>18 leshort 5 Motorola 88000 - invalid byte order,
>>18 leshort 6 Intel 80486,
>>18 leshort 7 Intel 80860,
# The official e_machine number for MIPS is now #8, regardless of endianness.
# The second number (#10) will be deprecated later. For now, we still
# say something if #10 is encountered, but only gory details for #8.
>>18 leshort 8 MIPS,
>>>36 lelong &0x20 N32
>>18 leshort 10 MIPS,
>>>36 lelong &0x20 N32
>>18 leshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 lelong&0xf0000000 0x00000000 MIPS-I
>>>>36 lelong&0xf0000000 0x10000000 MIPS-II
>>>>36 lelong&0xf0000000 0x20000000 MIPS-III
>>>>36 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>36 lelong&0xf0000000 0x40000000 MIPS-V
>>>>36 lelong&0xf0000000 0x50000000 MIPS32
>>>>36 lelong&0xf0000000 0x60000000 MIPS64
>>>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2
>>>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 lelong&0xf0000000 0x00000000 MIPS-I
>>>>48 lelong&0xf0000000 0x10000000 MIPS-II
>>>>48 lelong&0xf0000000 0x20000000 MIPS-III
>>>>48 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>48 lelong&0xf0000000 0x40000000 MIPS-V
>>>>48 lelong&0xf0000000 0x50000000 MIPS32
>>>>48 lelong&0xf0000000 0x60000000 MIPS64
>>>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2
>>>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2
>>18 leshort 9 Amdahl - invalid byte order,
>>18 leshort 10 MIPS (deprecated),
>>18 leshort 11 RS6000 - invalid byte order,
>>18 leshort 15 PA-RISC - invalid byte order,
>>>50 leshort 0x0214 2.0
>>>48 leshort &0x0008 (LP64),
>>18 leshort 16 nCUBE,
>>18 leshort 17 Fujitsu VPP500,
>>18 leshort 18 SPARC32PLUS - invalid byte order,
>>18 leshort 20 PowerPC,
>>18 leshort 22 IBM S/390,
>>18 leshort 36 NEC V800,
>>18 leshort 37 Fujitsu FR20,
>>18 leshort 38 TRW RH-32,
>>18 leshort 39 Motorola RCE,
>>18 leshort 40 ARM,
>>18 leshort 41 Alpha,
>>18 leshort 0xa390 IBM S/390 (obsolete),
>>18 leshort 42 Renesas SH,
>>18 leshort 43 SPARC V9 - invalid byte order,
>>18 leshort 44 Siemens Tricore Embedded Processor,
>>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 leshort 46 Renesas H8/300,
>>18 leshort 47 Renesas H8/300H,
>>18 leshort 48 Renesas H8S,
>>18 leshort 49 Renesas H8/500,
>>18 leshort 50 IA-64,
>>18 leshort 51 Stanford MIPS-X,
>>18 leshort 52 Motorola Coldfire,
>>18 leshort 53 Motorola M68HC12,
>>18 leshort 54 Fujitsu MMA,
>>18 leshort 55 Siemens PCP,
>>18 leshort 56 Sony nCPU,
>>18 leshort 57 Denso NDR1,
>>18 leshort 58 Start*Core,
>>18 leshort 59 Toyota ME16,
>>18 leshort 60 ST100,
>>18 leshort 61 Tinyj emb.,
>>18 leshort 62 x86-64,
>>18 leshort 63 Sony DSP,
>>18 leshort 66 FX66,
>>18 leshort 67 ST9+ 8/16 bit,
>>18 leshort 68 ST7 8 bit,
>>18 leshort 69 MC68HC16,
>>18 leshort 70 MC68HC11,
>>18 leshort 71 MC68HC08,
>>18 leshort 72 MC68HC05,
>>18 leshort 73 SGI SVx,
>>18 leshort 74 ST19 8 bit,
>>18 leshort 75 Digital VAX,
>>18 leshort 76 Axis cris,
>>18 leshort 77 Infineon 32-bit embedded,
>>18 leshort 78 Element 14 64-bit DSP,
>>18 leshort 79 LSI Logic 16-bit DSP,
>>18 leshort 80 MMIX,
>>18 leshort 81 Harvard machine-independent,
>>18 leshort 82 SiTera Prism,
>>18 leshort 83 Atmel AVR 8-bit,
>>18 leshort 84 Fujitsu FR30,
>>18 leshort 85 Mitsubishi D10V,
>>18 leshort 86 Mitsubishi D30V,
>>18 leshort 87 NEC v850,
>>18 leshort 88 Renesas M32R,
>>18 leshort 89 Matsushita MN10300,
>>18 leshort 90 Matsushita MN10200,
>>18 leshort 91 picoJava,
>>18 leshort 92 OpenRISC,
>>18 leshort 93 ARC Cores Tangent-A5,
>>18 leshort 94 Tensilica Xtensa,
>>18 leshort 97 NatSemi 32k,
>>18 leshort 106 Analog Devices Blackfin,
>>18 leshort 113 Altera Nios II,
>>18 leshort 0xae META,
>>18 leshort 0x3426 OpenRISC (obsolete),
>>18 leshort 0x8472 OpenRISC (obsolete),
>>18 leshort 0x9026 Alpha (unofficial),
>>20 lelong 0 invalid version
>>20 lelong 1 version 1
>>36 lelong 1 MathCoPro/FPU/MAU Required
>5 byte 2 MSB
>>16 beshort 0 no file type,
!:mime application/octet-stream
>>16 beshort 1 relocatable,
!:mime application/x-object
>>16 beshort 2 executable,
!:mime application/x-executable
>>16 beshort 3 shared object,
!:mime application/x-sharedlib
>>16 beshort 4 core file,
!:mime application/x-coredump
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) belong >0 (signal %d),
>>16 beshort &0xff00 processor-specific,
>>18 beshort 0 no machine,
>>18 beshort 1 AT&T WE32100,
>>18 beshort 2 SPARC,
>>18 beshort 3 Intel 80386 - invalid byte order,
>>18 beshort 4 Motorola
>>>36 belong &0x01000000 68000,
>>>36 belong &0x00810000 CPU32,
>>>36 belong 0 68020,
>>18 beshort 5 Motorola 88000,
>>18 beshort 6 Intel 80486 - invalid byte order,
>>18 beshort 7 Intel 80860,
# only for MIPS - see comment in little-endian section above.
>>18 beshort 8 MIPS,
>>>36 belong &0x20 N32
>>18 beshort 10 MIPS,
>>>36 belong &0x20 N32
>>18 beshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 belong&0xf0000000 0x00000000 MIPS-I
>>>>36 belong&0xf0000000 0x10000000 MIPS-II
>>>>36 belong&0xf0000000 0x20000000 MIPS-III
>>>>36 belong&0xf0000000 0x30000000 MIPS-IV
>>>>36 belong&0xf0000000 0x40000000 MIPS-V
>>>>36 belong&0xf0000000 0x50000000 MIPS32
>>>>36 belong&0xf0000000 0x60000000 MIPS64
>>>>36 belong&0xf0000000 0x70000000 MIPS32 rel2
>>>>36 belong&0xf0000000 0x80000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 belong&0xf0000000 0x00000000 MIPS-I
>>>>48 belong&0xf0000000 0x10000000 MIPS-II
>>>>48 belong&0xf0000000 0x20000000 MIPS-III
>>>>48 belong&0xf0000000 0x30000000 MIPS-IV
>>>>48 belong&0xf0000000 0x40000000 MIPS-V
>>>>48 belong&0xf0000000 0x50000000 MIPS32
>>>>48 belong&0xf0000000 0x60000000 MIPS64
>>>>48 belong&0xf0000000 0x70000000 MIPS32 rel2
>>>>48 belong&0xf0000000 0x80000000 MIPS64 rel2
>>18 beshort 9 Amdahl,
>>18 beshort 10 MIPS (deprecated),
>>18 beshort 11 RS6000,
>>18 beshort 15 PA-RISC
>>>50 beshort 0x0214 2.0
>>>48 beshort &0x0008 (LP64)
>>18 beshort 16 nCUBE,
>>18 beshort 17 Fujitsu VPP500,
>>18 beshort 18 SPARC32PLUS,
>>>36 belong&0xffff00 0x000100 V8+ Required,
>>>36 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
>>>36 belong&0xffff00 0x000400 HaL R1 Extensions Required,
>>>36 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
>>18 beshort 20 PowerPC or cisco 4500,
>>18 beshort 21 64-bit PowerPC or cisco 7500,
>>18 beshort 22 IBM S/390,
>>18 beshort 23 Cell SPU,
>>18 beshort 24 cisco SVIP,
>>18 beshort 25 cisco 7200,
>>18 beshort 36 NEC V800 or cisco 12000,
>>18 beshort 37 Fujitsu FR20,
>>18 beshort 38 TRW RH-32,
>>18 beshort 39 Motorola RCE,
>>18 beshort 40 ARM,
>>18 beshort 41 Alpha,
>>18 beshort 42 Renesas SH,
>>18 beshort 43 SPARC V9,
>>>48 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
>>>48 belong&0xffff00 0x000400 HaL R1 Extensions Required,
>>>48 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
>>>48 belong&0x3 0 total store ordering,
>>>48 belong&0x3 1 partial store ordering,
>>>48 belong&0x3 2 relaxed memory ordering,
>>18 beshort 44 Siemens Tricore Embedded Processor,
>>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 beshort 46 Renesas H8/300,
>>18 beshort 47 Renesas H8/300H,
>>18 beshort 48 Renesas H8S,
>>18 beshort 49 Renesas H8/500,
>>18 beshort 50 IA-64,
>>18 beshort 51 Stanford MIPS-X,
>>18 beshort 52 Motorola Coldfire,
>>18 beshort 53 Motorola M68HC12,
>>18 beshort 73 Cray NV1,
>>18 beshort 75 Digital VAX,
>>18 beshort 88 Renesas M32R,
>>18 leshort 92 OpenRISC,
>>18 leshort 0x3426 OpenRISC (obsolete),
>>18 leshort 0x8472 OpenRISC (obsolete),
>>18 beshort 94 Tensilica Xtensa,
>>18 beshort 97 NatSemi 32k,
>>18 beshort 0x18ad AVR32 (unofficial),
>>18 beshort 0x9026 Alpha (unofficial),
>>18 beshort 0xa390 IBM S/390 (obsolete),
>>20 belong 0 invalid version
>>20 belong 1 version 1
>>36 belong 1 MathCoPro/FPU/MAU Required
# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
# like proper ELF, but extracting the string had bad results.
>4 byte <0x80
>>8 string >\0 (%s)
>8 string \0
>>7 byte 0 (SYSV)
>>7 byte 1 (HP-UX)
>>7 byte 2 (NetBSD)
>>7 byte 3 (GNU/Linux)
>>7 byte 4 (GNU/Hurd)
>>7 byte 5 (86Open)
>>7 byte 6 (Solaris)
>>7 byte 7 (Monterey)
>>7 byte 8 (IRIX)
>>7 byte 9 (FreeBSD)
>>7 byte 10 (Tru64)
>>7 byte 11 (Novell Modesto)
>>7 byte 12 (OpenBSD)
>8 string \2
>>7 byte 13 (OpenVMS)
>>7 byte 97 (ARM)
>>7 byte 255 (embedded)
# XXX - according to Microsoft's spec, at an offset of 0x3c in a
# PE-format executable is the offset in the file of the PE header;
# unfortunately, that's a little-endian offset, and there's no way
# to specify an indirect offset with a specified byte order.
# So, for now, we assume the standard MS-DOS stub, which puts the
# PE header at 0x80 = 128.
#
# Required OS version and subsystem version were 4.0 on some NT 3.51
# executables built with Visual C++ 4.0, so it's not clear that
# they're interesting. The user version was 0.0, but there's
# probably some linker directive to set it. The linker version was
# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
#
# many of the compressed formats were extraced from IDARC 1.23 source code
#
0 string MZ
!:mime application/x-dosexec
>0x18 leshort <0x40 MS-DOS executable
>0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
>>&18 leshort&0x2000 >0 (DLL)
>>&88 leshort 0 (unknown subsystem)
>>&88 leshort 1 (native)
>>&88 leshort 2 (GUI)
>>&88 leshort 3 (console)
>>&88 leshort 7 (POSIX)
>>&0 leshort 0x0 unknown processor
>>&0 leshort 0x14c Intel 80386
>>&0 leshort 0x166 MIPS R4000
>>&0 leshort 0x184 Alpha
>>&0 leshort 0x268 Motorola 68000
>>&0 leshort 0x1f0 PowerPC
>>&0 leshort 0x290 PA-RISC
>>&18 leshort&0x0100 >0 32-bit
>>&18 leshort&0x1000 >0 system file
>>&228 lelong >0 \b, Mono/.Net assembly
>>&0xf4 search/0x140 \x0\x40\x1\x0
>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
>30 string Copyright\ 1989-1990\ PKWARE\ Inc. Self-extracting PKZIP archive
!:mime application/zip
# Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
>30 string PKLITE\ Copr. Self-extracting PKZIP archive
!:mime application/zip
>0x18 leshort >0x3f
>>(0x3c.l) string PE\0\0 PE
>>>(0x3c.l+25) byte 1 \b32 executable
>>>(0x3c.l+25) byte 2 \b32+ executable
# hooray, there's a DOS extender using the PE format, with a valid PE
# executable inside (which just prints a message and exits if run in win)
>>>(0x3c.l+92) leshort <10
>>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
>>>>(8.s*16) string !32STUB for MS Windows
>>>>>(0x3c.l+22) leshort&0x2000 >0 (DLL)
>>>>>(0x3c.l+92) leshort 0 (unknown subsystem)
>>>>>(0x3c.l+92) leshort 1 (native)
>>>>>(0x3c.l+92) leshort 2 (GUI)
>>>>>(0x3c.l+92) leshort 3 (console)
>>>>>(0x3c.l+92) leshort 7 (POSIX)
>>>(0x3c.l+92) leshort 10 (EFI application)
>>>(0x3c.l+92) leshort 11 (EFI boot service driver)
>>>(0x3c.l+92) leshort 12 (EFI runtime driver)
>>>(0x3c.l+92) leshort 13 (XBOX)
>>>(0x3c.l+4) leshort 0x0 unknown processor
>>>(0x3c.l+4) leshort 0x14c Intel 80386
>>>(0x3c.l+4) leshort 0x166 MIPS R4000
>>>(0x3c.l+4) leshort 0x184 Alpha
>>>(0x3c.l+4) leshort 0x268 Motorola 68000
>>>(0x3c.l+4) leshort 0x1f0 PowerPC
>>>(0x3c.l+4) leshort 0x290 PA-RISC
>>>(0x3c.l+4) leshort 0x200 Intel Itanium
>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
>>>(0x3c.l+22) leshort&0x1000 >0 system file
>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
>>>>(0x3c.l+0xf8) search/0x140 UPX2
>>>>>(&0x10.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>(0x3c.l+0xf8) search/0x140 .idata
>>>>>(&0xe.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>>(&0xe.l+(-4)) string ZZ0 \b, ZZip self-extracting archive
>>>>>(&0xe.l+(-4)) string ZZ1 \b, ZZip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .rsrc
>>>>>(&0x0f.l+(-4)) string a\\\4\5 \b, WinHKI self-extracting archive
>>>>>(&0x0f.l+(-4)) string Rar! \b, RAR self-extracting archive
>>>>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
>>>>>(&0x0f.l+(-4)) search/32 Nullsoft \b, Nullsoft Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .data
>>>>>(&0x0f.l) string WEXTRACT \b, MS CAB-Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .petite\0 \b, Petite compressed
>>>>>(0x3c.l+0xf7) byte x
>>>>>>(&0x104.l+(-4)) string =!sfx! \b, ACE self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .WISE \b, WISE installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .dz\0\0\0 \b, Dzip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .reloc
>>>>>(&0xe.l+(-4)) search/0x180 PK\3\4 \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 _winzip_ \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 SharedD \b, Microsoft Installer self-extracting archive
>>>>0x30 string Inno \b, InnoSetup self-extracting archive
>>(0x3c.l) string !PE\0\0 MS-DOS executable
>>(0x3c.l) string NE \b, NE
>>>(0x3c.l+0x36) byte 0 (unknown OS)
>>>(0x3c.l+0x36) byte 1 for OS/2 1.x
>>>(0x3c.l+0x36) byte 2 for MS Windows 3.x
>>>(0x3c.l+0x36) byte 3 for MS-DOS
>>>(0x3c.l+0x36) byte >3 (unknown OS)
>>>(0x3c.l+0x36) byte 0x81 for MS-DOS, Phar Lap DOS extender
>>>(0x3c.l+0x0c) leshort&0x8003 0x8002 (DLL)
>>>(0x3c.l+0x0c) leshort&0x8003 0x8001 (driver)
>>>&(&0x24.s-1) string ARJSFX \b, ARJ self-extracting archive
>>>(0x3c.l+0x70) search/0x80 WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
>>(0x3c.l) string LX\0\0 \b, LX
>>>(0x3c.l+0x0a) leshort <1 (unknown OS)
>>>(0x3c.l+0x0a) leshort 1 for OS/2
>>>(0x3c.l+0x0a) leshort 2 for MS Windows
>>>(0x3c.l+0x0a) leshort 3 for DOS
>>>(0x3c.l+0x0a) leshort >3 (unknown OS)
>>>(0x3c.l+0x10) lelong&0x28000 =0x8000 (DLL)
>>>(0x3c.l+0x10) lelong&0x20000 >0 (device driver)
>>>(0x3c.l+0x10) lelong&0x300 0x300 (GUI)
>>>(0x3c.l+0x10) lelong&0x28300 <0x300 (console)
>>>(0x3c.l+0x08) leshort 1 i80286
>>>(0x3c.l+0x08) leshort 2 i80386
>>>(0x3c.l+0x08) leshort 3 i80486
>>>(8.s*16) string emx \b, emx
>>>>&1 string x %s
>>>&(&0x54.l-3) string arjsfx \b, ARJ self-extracting archive
#------------------------------------------------------------------------------
# bFLT: file(1) magic for BFLT uclinux binary files
#
# From Philippe De Muyter
#
# Additional fields added by Craig Heffner
#
0 string bFLT BFLT executable
>4 belong x version %ld,
>4 belong 4
>8 belong x code offset: 0x%.8X,
>12 belong x data segment starts at: 0x%.8X,
>16 belong x bss segment starts at: 0x%.8X,
>20 belong x bss segment ends at: 0x%.8X,
>24 belong x stack size: %d bytes,
>28 belong x relocation records start at: 0x%.8X,
>32 belong x number of reolcation records: %d,
>>36 belong&0x1 0x1 ram
>>36 belong&0x2 0x2 gotpic
>>36 belong&0x4 0x4 gzip
>>36 belong&0x8 0x8 gzdata
#-----------------------------------------------------------------
# MIPS COFF file formats
#
0 beshort 0x0160 MIPSEB ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0162 MIPSEL-BE ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x ^H.%ld
#
0 beshort 0x6001 MIPSEB-LE ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x ^H.%ld
#
0 beshort 0x6201 MIPSEL ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
# MIPS 2 additions
#
0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
# MIPS 3 additions
#
0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x180 MIPSEB Ucode
0 beshort 0x182 MIPSEL-BE Ucode
# Windows CE package files
0 string MSCE\0\0\0\0 Microsoft WinCE installer
>20 lelong 0 \b, architecture-independent
>20 lelong 103 \b, Hitachi SH3
>20 lelong 104 \b, Hitachi SH4
>20 lelong 0xA11 \b, StrongARM
>20 lelong 4000 \b, MIPS R4000
>20 lelong 10003 \b, Hitachi SH3
>20 lelong 10004 \b, Hitachi SH3E
>20 lelong 10005 \b, Hitachi SH4
>20 lelong 70001 \b, ARM 7TDMI
>52 leshort 1 \b, 1 file
>52 leshort >1 \b, %u files
>56 leshort 1 \b, 1 registry entry
>56 leshort >1 \b, %u registry entries
#------------------------------------------------------------------------------
# Microsoft Xbox executables .xbe (Esa Hyytiä )
0 string XBEH XBE, Microsoft Xbox executable
# probabilistic checks whether signed or not
>0x0004 ulelong =0x0
>>&2 ulelong =0x0
>>>&2 ulelong =0x0 \b, not signed
>0x0004 ulelong >0
>>&2 ulelong >0
>>>&2 ulelong >0 \b, signed
# expect base address of 0x10000
>0x0104 ulelong =0x10000
>>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
>>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
>>>(0x0118-0x0FF60) ulelong >0 (regions:
>>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
>>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
>>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
>>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
>>>(0x0118-0x0FF60) ulelong >0 \b)
#------------------------------------------------------------------------------
# motorola: file(1) magic for Motorola 68K and 88K binaries
#
# 68K
#
0 beshort 0x0208 mc68k COFF
>18 beshort ^00000020 object
>18 beshort &00000020 executable
>12 belong >0 not stripped
>168 string .lowmem Apple toolbox
>20 beshort 0407 (impure)
>20 beshort 0410 (pure)
>20 beshort 0413 (demand paged)
>20 beshort 0421 (standalone)
0 beshort 0x0209 mc68k executable (shared)
>12 belong >0 not stripped
0 beshort 0x020A mc68k executable (shared demand paged)
>12 belong >0 not stripped
#
# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
#
0 beshort 0x022A 68K BCS executable
#
# 88K
#
# Motorola/88Open BCS
#
0 beshort 0x022B 88K BCS executable
#------------------------------------------------------------------------------
# Sony Playstation executables (Adam Sjoegren ) :
0 string PS-X\ EXE Sony Playstation executable
# Area:
>113 string x (%s)
#------------------------------------------------------------------------------
# cisco: file(1) magic for cisco Systems routers
#
# Most cisco file-formats are covered by the generic elf code
#
# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
0 beshort 0x8501 cisco IOS
>0 belong&0xffffff00 0x85011400 microcode
>0 belong&0xffffff00 0x8501cb00 experimental microcode
>7 string >\0 for '%s'
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.filesystems
================================================
#--------------------File Systems---------------------
# Minix filesystems - Juan Cespedes
# Disabled for now until better signatures can be created. Too many false positives.
#0x410 leshort 0x137f Minix filesystem
#>0x402 beshort !0 \b, %d zones
#>0x1e string minix \b, bootable
#0x410 leshort 0x138f Minix filesystem, 30 char names
#0x410 leshort 0x2468 Minix filesystem, version 2
#0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
#0x410 beshort 0x137f Minix filesystem (big endian)
#>0x402 beshort !0 \b, %d zones
#>0x1e string minix \b, bootable
#0x410 beshort 0x138f Minix filesystem (big endian), 30 char names
#0x410 beshort 0x2468 Minix filesystem (big endian), version 2
#0x410 beshort 0x2478 Minix filesystem (big endian), version 2, 30 char names
# YAFFS
0 belong 0x03000000
>4 belong 0x01000000
>>8 beshort 0xFFFF YAFFS filesystem
# EFS2 file system - jojo@utulsa.edu
8 string EFSSuper EFS2 Qualcomm filesystem super block,
>0 lelong 0x53000000 little endian,
>>4 leshort &1 NAND
>>4 leshort ^1 NOR
>>4 leshort x version 0x%x,
>>24 lelong x %d blocks,
>>16 lelong x 0x%x pages per block,
>>20 lelong x 0x%x bytes per page
8 string SSFErepu EFS2 Qualcomm filesystem super block,
>0 belong 0x53000000 big endian,
>>4 beshort &1 NAND
>>4 beshort ^1 NOR
>>4 beshort x version 0x%x,
>>24 belong x %d blocks,
>>16 belong x 0x%x pages per block,
>>20 belong x 0x%x bytes per page
# TROC file system
0 string TROC TROC filesystem,
>4 lelong x %d file entries
# PFS file system
0 string PFS/ PFS filesystem,
>4 string x version %s,
>14 leshort x %d files
# MPFS file system
0 string MPFS MPFS (Microchip) filesystem,
>4 byte x version %d.
>5 byte x \b%d,
>6 leshort x %d file entries
# cramfs filesystem - russell@coker.com.au
0 lelong 0x28cd3d45 CramFS filesystem, little endian
>4 lelong <0 invalid
>4 lelong x size %lu
>8 lelong &1 version #2
>8 lelong &2 sorted_dirs
>8 lelong &4 hole_support
>32 lelong x CRC 0x%x,
>36 lelong x edition %lu,
>40 lelong <0 invalid
>40 lelong x %lu blocks,
>44 lelong <0 invalid
>44 lelong x %lu files
0 belong 0x28cd3d45 CramFS filesystem, big endian
>4 belong <0 invalid
>4 belong x size %lu
>8 belong &1 version #2
>8 belong &2 sorted_dirs
>8 belong &4 hole_support
>32 belong x CRC 0x%x,
>36 belong x edition %lu,
>40 belong <0 invalid
>40 belong x %lu blocks,
>44 belong <0 invalid
>44 belong x %lu files
# JFFS2 file system
0 leshort 0x1984 JFFS2 filesystem (old) data little endian,
>4 lelong >1000000 invalid
>4 lelong <0 invalid
>4 lelong 0 invalid
>4 lelong x JFFS node length: %d
0 beshort 0x1984 JFFS2 filesystem (old) data big endian,
>4 belong >1000000 invalid
>4 belong <0 invalid
>4 belong 0 invalid
>4 belong x JFFS node length: %d
0 leshort 0x1985 JFFS2 filesystem data little endian,
>4 lelong >1000000 invalid
>4 lelong <0 invalid
>4 lelong 0 invalid
>4 lelong x JFFS node length: %d
0 beshort 0x1985 JFFS2 filesystem data big endian,
>4 belong >1000000 invalid
>4 belong <0 invalid
>4 belong 0 invalid
>4 belong x JFFS node length: %d
# Squashfs
0 string sqsh Squashfs filesystem, big endian,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort 3
>>63 bequad x size: %lld bytes,
>28 beshort >3
>>40 bequad x size: %lld bytes,
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
0 string hsqs Squashfs filesystem, little endian,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort >3 compression:
>>20 leshort 1 \bgzip,
>>20 leshort 2 \blzma,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort 3
>>63 lequad x size: %lld bytes,
>28 leshort >3
>>40 lequad x size: %lld bytes,
>4 lelong x %d inodes,
>28 leshort >3
>>12 lelong blocksize: %d bytes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort 2
>>51 lelong x blocksize: %d bytes,
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>28 leshort >3
>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
# Squashfs with LZMA compression
0 string sqlz Squashfs filesystem, big endian, lzma compression,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs 3.3 LZMA signature
0 string qshs Squashfs filesystem, big endian, lzma signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs for DD-WRT
0 string tqsh Squashfs filesystem, big endian, DD-WRT signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs for DD-WRT
0 string hsqt Squashfs filesystem, little endian, DD-WRT signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort >2
>>63 lequad x size: %lld bytes,
#>>63 lelong x %d bytes,
>4 lelong x %d inodes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort >1
>>51 lelong x blocksize: %d bytes,
>39 ledate x created: %s
# Non-standard Squashfs signature found on some D-Link routers
0 string shsq Squashfs filesystem, little endian, non-standard signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort >2
>>63 lequad x size: %lld bytes,
#>>63 lelong x %d bytes,
>4 lelong x %d inodes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort >1
>>51 lelong x blocksize: %d bytes,
>39 ledate x created: %s
# Commented out for now - unlikely to be found in firmware
# CDROM Filesystems
# Modified for UDF by gerardo.cacciari@gmail.com
#32769 string CD001 #
#!:mime application/x-iso9660-image
#>38913 string !NSR0 ISO 9660 CD-ROM filesystem data
#>38913 string NSR0 UDF filesystem data
#>>38917 string 1 (version 1.0)
#>>38917 string 2 (version 1.5)
#>>38917 string 3 (version 2.0)
#>>38917 byte >0x33 (unknown version, ID 0x%X)
#>>38917 byte <0x31 (unknown version, ID 0x%X)
# "application id" which appears to be used as a volume label
#>32808 string >\0 '%s'
#>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
#37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
#!:mime application/x-iso9660-image
#32776 string CDROM High Sierra CD-ROM filesystem data
# reiserfs - russell@coker.com.au
0x10034 string ReIsErFs ReiserFS filesystem V3.5
0x10034 string ReIsEr2Fs ReiserFS filesystem V3.6
0x10034 string ReIsEr3Fs ReiserFS filesystem V3.6.19
>0x1002c leshort x block size %d
>0x10032 leshort &2 (mounted or unclean)
>0x10000 lelong x num blocks %d
>0x10040 lelong 1 tea hash
>0x10040 lelong 2 yura hash
>0x10040 lelong 3 r5 hash
# ext2/ext3 filesystems - Andreas Dilger
# ext4 filesystem - Eric Sandeen
# volume label and UUID Russell Coker
# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
0x438 leshort 0xEF53 Linux EXT filesystem
>0x44c lelong <0 invalid
>0x44c lelong >4 invalid
>0x44c lelong x rev %d
>0x43e leshort x \b.%d
# No journal? ext2
>0x45c lelong ^0x0000004 ext2 filesystem data
>>0x43a leshort ^0x0000001 (mounted or unclean)
# Has a journal? ext3 or ext4
>0x45c lelong &0x0000004
# and small INCOMPAT?
>>0x460 lelong <0x0000040
# and small RO_COMPAT?
>>>0x464 lelong <0x0000008 ext3 filesystem data
# else large RO_COMPAT?
>>>0x464 lelong >0x0000007 ext4 filesystem data
# else large INCOMPAT?
>>0x460 lelong >0x000003f ext4 filesystem data
>0x468 belong x \b, UUID=%08x
>0x46c beshort x \b-%04x
>0x46e beshort x \b-%04x
>0x470 beshort x \b-%04x
>0x472 belong x \b-%08x
>0x476 beshort x \b%04x
>0x478 string >0 \b, volume name "%s"
# General flags for any ext* fs
>0x460 lelong &0x0000004 (needs journal recovery)
>0x43a leshort &0x0000002 (errors, invalid)
# INCOMPAT flags
>0x460 lelong &0x0000001 (compressed)
#>0x460 lelong &0x0000002 (filetype)
#>0x460 lelong &0x0000010 (meta bg)
>0x460 lelong &0x0000040 (extents)
>0x460 lelong &0x0000080 (64bit)
#>0x460 lelong &0x0000100 (mmp)
#>0x460 lelong &0x0000200 (flex bg)
# RO_INCOMPAT flags
#>0x464 lelong &0x0000001 (sparse super)
>0x464 lelong &0x0000002 (large files)
>0x464 lelong &0x0000008 (huge files)
#>0x464 lelong &0x0000010 (gdt checksum)
#romfs filesystems - Juan Cespedes
0 string -rom1fs- romfs filesystem, version 1
>8 belong >10000000 invalid
>8 belong x size: %d bytes,
>16 string x named %s.
# JFFS - russell@coker.com.au
0 lelong 0x34383931 Linux Journalled Flash filesystem, little endian
0 belong 0x34383931 Linux Journalled Flash filesystem, big endian
# Wind River MemFS file system, found in some VxWorks devices
0 string owowowowowowowowowowowowowowow Wind River management filesystem,
>32 belong 0 uncompressed
>32 belong 1 compressed,
>36 belong x %d files
# FATX
0 string FATX FATX filesystem data
# updated by Joerg Jenderek at Sep 2007
# only for sector sizes with 512 or more Bytes
0x1FE leshort 0xAA55 start boot sector
# to do also for sectors < than 512 Bytes and some other files, GRR
#30 search/481 \x55\xAA start boot sector / filesystem
# not for BeOS floppy 1440k, MBRs
#(11.s-2) uleshort 0xAA55 start boot sector / filesystem
>2 string OSBS \b, OS/BS MBR
# J\xf6rg Jenderek
>0x8C string Invalid\ partition\ table \b, MS-DOS MBR
# dr-dos with some upper-, lowercase variants
>0x9D string Invalid\ partition\ table$
>>181 string No\ Operating\ System$
>>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
>0x9D string Invalid\ partition\ table$
>>181 string No\ operating\ system$
>>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
>342 string Invalid\ partition\ table$
>>366 string No\ operating\ system$
>>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
>295 string NEWLDR\0
>>302 string Bad\ PT\ $
>>>310 string No\ OS\ $
>>>>317 string OS\ load\ err$
>>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
>>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
>>>>>>>387 string Copyright\ (c)\ 1984,1998
>>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
>0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
>>0x1B8 ubelong >0 \b, Serial 0x%-.4x
>0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
>271 string Invalid\ partition\ table\0
>>295 string Error\ loading\ operating\ system\0
>>>326 string Missing\ operating\ system\0 \b, mbr
#
>139 string Invalid\ partition\ table\0
>>163 string Error\ loading\ operating\ system\0
>>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
# http://www.heise.de/ct/05/09/006/ page 184
#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
>>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
>300 string Invalid\ partition\ table\0
>>324 string Error\ loading\ operating\ system\0
>>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
#??>>>389 string Invalid\ system\ disk
>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
>300 string Ung\201ltige\ Partitionstabelle
#split string to avoid error: String too long
>>328 string Fehler\ beim\ Laden\
>>>346 string des\ Betriebssystems
>>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
>>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
#>0x145 string Default:\ F \b, FREE-DOS MBR
#>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR
>0x145 search/7 Default:\ F \b, FREE-DOS MBR
#>>313 string F0\ .\ .\ .
#>>>322 string disk\ 1
#>>>>382 string FAT3
>64 string no\ active\ partition\ found
>>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
# Ranish Partition Manager http://www.ranish.com/part/
>387 search/4 \0\ Error!\r
>>378 search/7 Virus!
>>>397 search/4 Booting\
>>>>408 search/4 HD1/\0 \b, Ranish MBR (
>>>>>416 string Writing\ changes... \b2.37
>>>>>>438 ubyte x \b,0x%x dots
>>>>>>440 ubyte >0 \b,virus check
>>>>>>441 ubyte >0 \b,partition %c
#2.38,2.42,2.44
>>>>>416 string !Writing\ changes... \b
>>>>>>418 ubyte 1 \bvirus check,
>>>>>>419 ubyte x \b0x%x seconds
>>>>>>420 ubyte&0x0F >0 \b,partition
>>>>>>>420 ubyte&0x0F <5 \b %x
>>>>>>>420 ubyte&0x0F 0Xf \b ask
>>>>>420 ubyte x \b)
#
>271 string Operating\ system\ loading
>>296 string error\r \b, SYSLINUX MBR (2.10)
# http://www.acronis.de/
>362 string MBR\ Error\ \0\r
>>376 string ress\ any\ key\ to\
>>>392 string boot\ from\ floppy...\0 \b, Acronis MBR
# added by Joerg Jenderek
# http://www.visopsys.org/
# http://partitionlogic.org.uk/
>309 string No\ bootable\ partition\ found\r
>>339 string I/O\ Error\ reading\ boot\ sector\r \b, Visopsys MBR
>349 string No\ bootable\ partition\ found\r
>>379 string I/O\ Error\ reading\ boot\ sector\r \b, simple Visopsys MBR
# bootloader, bootmanager
>0x40 string SBML
# label with 11 characters of FAT 12 bit filesystem
>>43 string SMART\ BTMGR
>>>430 string SBMK\ Bad!\r \b, Smart Boot Manager
# OEM-ID not always "SBM"
#>>>>3 strings SBM
>>>>6 string >\0 \b, version %s
>382 string XOSLLOADXCF \b, eXtended Operating System Loader
>6 string LILO \b, LInux i386 boot LOader
>>120 string LILO \b, version 22.3.4 SuSe
>>172 string LILO \b, version 22.5.8 Debian
# updated by Joerg Jenderek at Oct 2008
# variables according to grub-0.97/stage1/stage1.S or
# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
# usual values are marked with comments to get only informations of strange GRUB loaders
>342 search/60 \0Geom\0
#>0 ulelong x %x=0x009048EB , 0x2a9048EB 0
>>0x41 ubyte <2
>>>0x3E ubyte >2 \b; GRand Unified Bootloader
# 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90
>>>>0x3E ubyte x \b, stage1 version 0x%x
#If it is 0xFF, use a drive passed by BIOS
>>>>0x40 ubyte <0xFF \b, boot drive 0x%x
# in most case 0,1,0x2e for GRUB 0.5.95
>>>>0x41 ubyte >0 \b, LBA flag 0x%x
>>>>0x42 uleshort <0x8000 \b, stage2 address 0x%x
#>>>>0x42 uleshort =0x8000 \b, stage2 address 0x%x (usual)
>>>>0x42 uleshort >0x8000 \b, stage2 address 0x%x
#>>>>0x44 ulelong =1 \b, 1st sector stage2 0x%x (default)
>>>>0x44 ulelong >1 \b, 1st sector stage2 0x%x
>>>>0x48 uleshort <0x800 \b, stage2 segment 0x%x
#>>>>0x48 uleshort =0x800 \b, stage2 segment 0x%x (usual)
>>>>0x48 uleshort >0x800 \b, stage2 segment 0x%x
>>>>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>394 string stage1 \b, GRUB version 0.5.95
>>>>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>376 string GRUB\ \0 \b, GRUB version 0.93 or 1.94
>>>>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>377 string GRUB\ \0 \b, GRUB version 0.94
>>>>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96
>>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>385 string GRUB\ \0 \b, GRUB version 0.97
#unkown version
>>>343 string Geom\0Read\0\ Error\0
>>>>321 string Loading\ stage1.5 \b, GRUB version x.y
>>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>374 string GRUB\ \0 \b, GRUB version n.m
# http://syslinux.zytor.com/
>478 string Boot\ failed\r
>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (1.62)
>480 string Boot\ failed\r
>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06 or 2.11)
>484 string Boot\ error\r \b, SYSLINUX bootloader (3.11)
>395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
# http://www.bcdwb.de/bcdw/index_e.htm
>3 string BCDL
>>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z)
# mbr partion table entries
# OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs
>3 string !MS
>>3 string !SYSLINUX
>>>3 string !MTOOL
>>>>3 string !NEWLDR
>>>>>5 string !DOS
# not FAT (32 bit)
>>>>>>82 string !FAT32
#not Linux kernel
>>>>>>>514 string !HdrS
#not BeOS
>>>>>>>>422 string !Be\ Boot\ Loader
# active flag 0 or 0x80 and type > 0
>>>>>>>>>446 ubyte <0x81
>>>>>>>>>>446 ubyte&0x7F 0
>>>>>>>>>>>450 ubyte >0 \b; partition 1: ID=0x%x
>>>>>>>>>>>>446 ubyte 0x80 \b, active
>>>>>>>>>>>>447 ubyte x \b, starthead %u
#>>>>>>>>>>>>448 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>448 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>454 ulelong x \b, startsector %u
>>>>>>>>>>>>458 ulelong x \b, %u sectors
#
>>>>>>>>>462 ubyte <0x81
>>>>>>>>>>462 ubyte&0x7F 0
>>>>>>>>>>>466 ubyte >0 \b; partition 2: ID=0x%x
>>>>>>>>>>>>462 ubyte 0x80 \b, active
>>>>>>>>>>>>463 ubyte x \b, starthead %u
#>>>>>>>>>>>>464 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>464 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>470 ulelong x \b, startsector %u
>>>>>>>>>>>>474 ulelong x \b, %u sectors
#
>>>>>>>>>478 ubyte <0x81
>>>>>>>>>>478 ubyte&0x7F 0
>>>>>>>>>>>482 ubyte >0 \b; partition 3: ID=0x%x
>>>>>>>>>>>>478 ubyte 0x80 \b, active
>>>>>>>>>>>>479 ubyte x \b, starthead %u
#>>>>>>>>>>>>480 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>481 ubyte x \b, start C2S: 0x%x
#>>>>>>>>>>>>480 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>486 ulelong x \b, startsector %u
>>>>>>>>>>>>490 ulelong x \b, %u sectors
#
>>>>>>>>>494 ubyte <0x81
>>>>>>>>>>494 ubyte&0x7F 0
>>>>>>>>>>>498 ubyte >0 \b; partition 4: ID=0x%x
>>>>>>>>>>>>494 ubyte 0x80 \b, active
>>>>>>>>>>>>495 ubyte x \b, starthead %u
#>>>>>>>>>>>>496 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>496 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>502 ulelong x \b, startsector %u
>>>>>>>>>>>>506 ulelong x \b, %u sectors
# mbr partion table entries end
# http://www.acronis.de/
#FAT label=ACRONIS\ SZ
#OEM-ID=BOOTWIZ0
>442 string Non-system\ disk,\
>>459 string press\ any\ key...\x7\0 \b, Acronis Startup Recovery Loader
# DOS names like F11.SYS are 8 right space padded bytes+3 bytes
>>>477 ubyte&0xDF >0
>>>>477 string x \b %-.3s
>>>>>480 ubyte&0xDF >0
>>>>>>480 string x \b%-.5s
>>>>485 ubyte&0xDF >0
>>>>>485 string x \b.%-.3s
#
>185 string FDBOOT\ Version\
>>204 string \rNo\ Systemdisk.\
>>>220 string Booting\ from\ harddisk.\n\r
>>>245 string Cannot\ load\ from\ harddisk.\n\r
>>>>273 string Insert\ Systemdisk\
>>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
>>>>>>200 string >\0 \b, version %-3s
>242 string Bootsector\ from\ C.H.\ Hochst\204
>>278 string No\ Systemdisk.\
>>>293 string Booting\ from\ harddisk.\n\r
>>>441 string Cannot\ load\ from\ harddisk.\n\r
>>>>469 string Insert\ Systemdisk\
>>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
>>>>>>209 string >\0 \b, version %-4.4s
>(1.b+2) ubyte 0xe
>>(1.b+3) ubyte 0x1f
>>>(1.b+4) ubyte 0xbe
>>>>(1.b+5) ubyte 0x77
>>>>(1.b+6) ubyte 0x7c
>>>>>(1.b+7) ubyte 0xac
>>>>>>(1.b+8) ubyte 0x22
>>>>>>>(1.b+9) ubyte 0xc0
>>>>>>>>(1.b+10) ubyte 0x74
>>>>>>>>>(1.b+11) ubyte 0xb
>>>>>>>>>>(1.b+12) ubyte 0x56
>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
>214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display
#>>244 string from\ dosemu-freedos-*-bin.tgz\r
#>>>170 string Sorry,\ could\ not\ load\ an\
#>>>>195 string operating\ system.\r\n
#
>103 string This\ is\ not\ a\ bootable\ disk.\
>>132 string Please\ insert\ a\ bootable\
>>>157 string floppy\ and\r\n
>>>>169 string press\ any\ key\ to\ try\ again...\r \b, FREE-DOS message display
#
>66 string Solaris\ Boot\ Sector
>>99 string Incomplete\ MDBoot\ load.
>>>89 string Version \b, Sun Solaris Bootloader
>>>>97 byte x version %c
#
>408 string OS/2\ !!\ SYS01475\r\0
>>429 string OS/2\ !!\ SYS02025\r\0
>>>450 string OS/2\ !!\ SYS02027\r\0
>>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
#
>409 string OS/2\ !!\ SYS01475\r\0
>>430 string OS/2\ !!\ SYS02025\r\0
>>>451 string OS/2\ !!\ SYS02027\r\0
>>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
>112 string This\ disk\ is\ not\ bootable\r
>>142 string If\ you\ wish\ to\ make\ it\ bootable
>>>176 string run\ the\ DOS\ program\ SYS\
>>>200 string after\ the\r
>>>>216 string system\ has\ been\ loaded\r\n
>>>>>242 string Please\ insert\ a\ DOS\ diskette\
>>>>>271 string into\r\n\ the\ drive\ and\
>>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
# XP
>430 string NTLDR\ is\ missing\xFF\r\n
>>449 string Disk\ error\xFF\r\n
>>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
#
>430 string NTLDR\ nicht\ gefunden\xFF\r\n
>>453 string Datentr\204gerfehler\xFF\r\n
>>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
# offset variant
>>>>379 string \0
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
#
>430 string NTLDR\ fehlt\xFF\r\n
>>444 string Datentr\204gerfehler\xFF\r\n
>>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
# variant
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
#
>430 string NTLDR\ fehlt\xFF\r\n
>>444 string Medienfehler\xFF\r\n
>>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
# variant
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
>430 string Datentr\204ger\ entfernen\xFF\r\n
>>454 string Medienfehler\xFF\r\n
>>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
>>>>379 string \0
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
# variant
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
#>3 string NTFS\ \ \ \
>389 string Fehler\ beim\ Lesen\
>>407 string des\ Datentr\204gers
>>>426 string NTLDR\ fehlt
>>>>440 string NTLDR\ ist\ komprimiert
>>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
#>3 string NTFS\ \ \ \
>313 string A\ disk\ read\ error\ occurred.\r
>>345 string A\ kernel\ file\ is\ missing\
>>>370 string from\ the\ disk.\r
>>>>484 string NTLDR\ is\ compressed
>>>>>429 string Insert\ a\ system\ diskette\
>>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
# DOS loader variants different languages,offsets
>472 ubyte&0xDF >0
>>389 string Invalid\ system\ disk\xFF\r\n
>>>411 string Disk\ I/O\ error
>>>>428 string Replace\ the\ disk,\ and\
>>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
#IO.SYS
>>>>>>472 ubyte&0xDF >0
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.5s
>>>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>>>479 string x \b%-.1s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>390 string Invalid\ system\ disk\xFF\r\n
>>>412 string Disk\ I/O\ error\xFF\r\n
>>>>429 string Replace\ the\ disk,\ and\
>>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
>>388 string Ungueltiges\ System\ \xFF\r\n
>>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>427 string Datentraeger\ wechseln\ und\
>>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
#WINBOOT.SYS only not spaces (0xDF)
>>>>>>497 ubyte&0xDF >0
>>>>>>>497 string x %-.5s
>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>505 ubyte&0xDF >0
>>>>>>>505 string x \b.%-.3s
#IO.SYS
>>>>>>472 ubyte&0xDF >0 or
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.5s
>>>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>>>479 string x \b%-.1s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>390 string Ungueltiges\ System\ \xFF\r\n
>>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>429 string Datentraeger\ wechseln\ und\
>>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
#WINBOOT.SYS only not spaces (0xDF)
>>>>>>497 ubyte&0xDF >0
>>>>>>>497 string x %-.7s
>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>504 string x \b%-.1s
>>>>>>505 ubyte&0xDF >0
>>>>>>>505 string x \b.%-.3s
#IO.SYS
>>>>>>472 ubyte&0xDF >0 or
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.6s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>389 string Ungueltiges\ System\ \xFF\r\n
>>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>428 string Datentraeger\ wechseln\ und\
>>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
>>>>>>472 string x %-.2s
>>>>>>>474 ubyte&0xDF >0
>>>>>>>>474 string x \b%-.5s
>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>479 string x \b%-.1s
>>>>>>480 ubyte&0xDF >0
>>>>>>>480 string x \b.%-.3s
>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>483 string x \b%-.5s
>>>>>>>488 ubyte&0xDF >0
>>>>>>>>488 string x \b%-.2s
>>>>>>>>490 ubyte&0xDF >0
>>>>>>>>>490 string x \b%-.1s
>>>>>>>491 ubyte&0xDF >0
>>>>>>>>491 string x \b.%-.3s
>479 ubyte&0xDF >0
>>416 string Kein\ System\ oder\
>>>433 string Laufwerksfehler
>>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
#IO.SYS
>>>>>479 string x \b %-.2s
>>>>>>481 ubyte&0xDF >0
>>>>>>>481 string x \b%-.6s
>>>>>487 ubyte&0xDF >0
>>>>>>487 string x \b.%-.3s
#MSDOS.SYS
>>>>>>490 ubyte&0xDF >0 \b+
>>>>>>>490 string x \b%-.5s
>>>>>>>>495 ubyte&0xDF >0
>>>>>>>>>495 string x \b%-.3s
>>>>>>>498 ubyte&0xDF >0
>>>>>>>>498 string x \b.%-.3s
#
>376 search/41 Non-System\ disk\ or\
>>395 search/41 disk\ error\r
>>>407 search/41 Replace\ and\
>>>>419 search/41 press\ \b,
>>>>419 search/41 strike\ \b, old
>>>>426 search/41 any\ key\ when\ ready\r MS or PC-DOS bootloader
#449 Disk\ Boot\ failure\r MS 3.21
#466 Boot\ Failure\r MS 3.30
>>>>>468 search/18 \0
#IO.SYS,IBMBIO.COM
>>>>>>&0 string x \b %-.2s
>>>>>>>&-20 ubyte&0xDF >0
>>>>>>>>&-1 string x \b%-.4s
>>>>>>>>>&-16 ubyte&0xDF >0
>>>>>>>>>>&-1 string x \b%-.2s
>>>>>>&8 ubyte&0xDF >0 \b.
>>>>>>>&-1 string x \b%-.3s
#MSDOS.SYS,IBMDOS.COM
>>>>>>&11 ubyte&0xDF >0 \b+
>>>>>>>&-1 string x \b%-.5s
>>>>>>>>&-6 ubyte&0xDF >0
>>>>>>>>>&-1 string x \b%-.1s
>>>>>>>>>>&-5 ubyte&0xDF >0
>>>>>>>>>>>&-1 string x \b%-.2s
>>>>>>>&7 ubyte&0xDF >0 \b.
>>>>>>>>&-1 string x \b%-.3s
>441 string Cannot\ load\ from\ harddisk.\n\r
>>469 string Insert\ Systemdisk\
>>>487 string and\ press\ any\ key.\n\r \b, MS (2.11) DOS bootloader
#>43 string \224R-LOADER\ \ SYS =label
>54 string SYS
>>324 string VASKK
>>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
#
>98 string Press\ a\ key\ to\ retry\0\r
>>120 string Cannot\ find\ file\ \0\r
>>>139 string Disk\ read\ error\0\r
>>>>156 string Loading\ ...\0 \b, DR-DOS (3.41) Bootloader
#DRBIOS.SYS
>>>>>44 ubyte&0xDF >0
>>>>>>44 string x \b %-.6s
>>>>>>>50 ubyte&0xDF >0
>>>>>>>>50 string x \b%-.2s
>>>>>>52 ubyte&0xDF >0
>>>>>>>52 string x \b.%-.3s
#
>70 string IBMBIO\ \ COM
>>472 string Cannot\ load\ DOS!\
>>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
>>471 string Cannot\ load\ DOS\
>>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
#??
>444 string KERNEL\ \ SYS
>>314 string BOOT\ error! \b, FREE-DOS Bootloader
>499 string KERNEL\ \ SYS
>>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
>449 string KERNEL\ \ SYS
>>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
#
>449 string Loading\ FreeDOS
>>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
#
>331 string Error!.0 \b, FREE-DOS 1.0 bootloader
#
>125 string Loading\ FreeDOS...\r
>>311 string BOOT\ error!\r \b, FREE-DOS bootloader
>>>441 ubyte&0xDF >0
>>>>441 string x \b %-.6s
>>>>>447 ubyte&0xDF >0
>>>>>>447 string x \b%-.1s
>>>>>>>448 ubyte&0xDF >0
>>>>>>>>448 string x \b%-.1s
>>>>449 ubyte&0xDF >0
>>>>>449 string x \b.%-.3s
>124 string FreeDOS\0
>>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>336 string Error!\
>>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
# added by Joerg Jenderek
# http://www.visopsys.org/
# http://partitionlogic.org.uk/
# OEM-ID=Visopsys
>478 ulelong 0
>>(1.b+326) string I/O\ Error\ reading\
>>>(1.b+344) string Visopsys\ loader\r
>>>>(1.b+361) string Press\ any\ key\ to\ continue.\r \b, Visopsys loader
# http://alexfru.chat.ru/epm.html#bootprog
>494 ubyte >0x4D
>>495 string >E
>>>495 string >>>3 string BootProg
# It just looks for a program file name at the root directory
# and loads corresponding file with following execution.
# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
>>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
>>>>>499 string x \b %-.1s
>>>>>>500 ubyte&0xDF >0
>>>>>>>500 string x \b%-.1s
>>>>>>>>501 ubyte&0xDF >0
>>>>>>>>>501 string x \b%-.1s
>>>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>>>>>>>>>>>505 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>505 string x \b%-.1s
>>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
#name extension
>>>>>507 ubyte&0xDF >0 \b.
>>>>>>507 string x \b%-.1s
>>>>>>>508 ubyte&0xDF >0
>>>>>>>>508 string x \b%-.1s
>>>>>>>>>509 ubyte&0xDF >0
>>>>>>>>>>509 string x \b%-.1s
#If the boot sector fails to read any other sector,
#it prints a very short message ("RE") to the screen and hangs the computer.
#If the boot sector fails to find needed program in the root directory,
#it also hangs with another message ("NF").
>>>>>492 string RENF \b, FAT (12 bit)
>>>>>495 string RENF \b, FAT (16 bit)
# http://alexfru.chat.ru/epm.html#bootprog
>494 ubyte >0x4D
>>495 string >E
>>>495 string >>>3 string BootProg
# It just looks for a program file name at the root directory
# and loads corresponding file with following execution.
# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
>>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
>>>>>499 string x \b %-.1s
>>>>>>500 ubyte&0xDF >0
>>>>>>>500 string x \b%-.1s
>>>>>>>>501 ubyte&0xDF >0
>>>>>>>>>501 string x \b%-.1s
>>>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>>>>>>>>>>>505 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>505 string x \b%-.1s
>>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
#name extension
>>>>>507 ubyte&0xDF >0 \b.
>>>>>>507 string x \b%-.1s
>>>>>>>508 ubyte&0xDF >0
>>>>>>>>508 string x \b%-.1s
>>>>>>>>>509 ubyte&0xDF >0
>>>>>>>>>>509 string x \b%-.1s
#If the boot sector fails to read any other sector,
#it prints a very short message ("RE") to the screen and hangs the computer.
#If the boot sector fails to find needed program in the root directory,
#it also hangs with another message ("NF").
>>>>>492 string RENF \b, FAT (12 bit)
>>>>>495 string RENF \b, FAT (16 bit)
# x86 bootloader end
# updated by Joerg Jenderek at Sep 2007
>3 ubyte 0
#no active flag
>>446 ubyte 0
# partition 1 not empty
>>>450 ubyte >0
# partitions 3,4 empty
>>>>482 ubyte 0
>>>>>498 ubyte 0
# partition 2 ID=0,5,15
>>>>>>466 ubyte <0x10
>>>>>>>466 ubyte 0x05 \b, extended partition table
>>>>>>>466 ubyte 0x0F \b, extended partition table (LBA)
>>>>>>>466 ubyte 0x0 \b, extended partition table (last)
# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
# http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD
# older drives may use Near JuMP instruction E9 xx xx
>0 lelong&0x009000EB 0x009000EB
>0 lelong&0x000000E9 0x000000E9
# minimal short forward jump found 03cx??
# maximal short forward jump is 07fx
>1 ubyte <0xff \b, code offset 0x%x
# mtools-3.9.8/msdos.h
# usual values are marked with comments to get only informations of strange FAT systems
# valid sectorsize must be a power of 2 from 32 to 32768
>>11 uleshort&0x000f x
>>>11 uleshort <32769
>>>>11 uleshort >31
>>>>>21 ubyte&0xf0 0xF0
>>>>>>3 string >\0 \b, OEM-ID "%8.8s"
#http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
>>>>>>>8 string IHC \b cached by Windows 9M
>>>>>>11 uleshort >512 \b, Bytes/sector %u
#>>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
>>>>>>11 uleshort <512 \b, Bytes/sector %u
>>>>>>13 ubyte >1 \b, sectors/cluster %u
#>>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
>>>>>>14 uleshort >32 \b, reserved sectors %u
#>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
#>>>>>>14 uleshort >1 \b, reserved sectors %u
#>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
>>>>>>14 uleshort <1 \b, reserved sectors %u
>>>>>>16 ubyte >2 \b, FATs %u
#>>>>>>16 ubyte =2 \b, FATs %u (usual)
>>>>>>16 ubyte =1 \b, FAT %u
>>>>>>16 ubyte >0
>>>>>>17 uleshort >0 \b, root entries %u
#>>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
>>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
#>>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
>>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
#>>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
>>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
>>>>>>22 uleshort >0 \b, sectors/FAT %u
#>>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
>>>>>>26 ubyte >2 \b, heads %u
#>>>>>>26 ubyte =2 \b, heads %u (usual floppy)
>>>>>>26 ubyte =1 \b, heads %u
#skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
>>>>>>38 ubyte !0x70
>>>>>>>28 ulelong >0 \b, hidden sectors %u
#>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
>>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
#>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
# FAT<32 specific
>>>>>>82 string !FAT32
#>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
#>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy)
>>>>>>>36 ubyte !0x80
>>>>>>>>36 ubyte !0 \b, physical drive 0x%x
>>>>>>>37 ubyte >0 \b, reserved 0x%x
#>>>>>>>37 ubyte =0 \b, reserved 0x%x
>>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>38 ubyte =0x29
>>>>>>>>39 ulelong x \b, serial number 0x%x
>>>>>>>>43 string >>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
>>>>>>>>43 string =NO\ NAME \b, unlabeled
>>>>>>>54 string FAT \b, FAT
>>>>>>>>54 string FAT12 \b (12 bit)
>>>>>>>>54 string FAT16 \b (16 bit)
# FAT32 specific
>>>>>>82 string FAT32 \b, FAT (32 bit)
>>>>>>>36 ulelong x \b, sectors/FAT %u
>>>>>>>40 uleshort >0 \b, extension flags %u
#>>>>>>>40 uleshort =0 \b, extension flags %u
>>>>>>>42 uleshort >0 \b, fsVersion %u
#>>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
>>>>>>>44 ulelong >2 \b, rootdir cluster %u
#>>>>>>>44 ulelong =2 \b, rootdir cluster %u
#>>>>>>>44 ulelong =1 \b, rootdir cluster %u
>>>>>>>48 uleshort >1 \b, infoSector %u
#>>>>>>>48 uleshort =1 \b, infoSector %u (usual)
>>>>>>>48 uleshort <1 \b, infoSector %u
>>>>>>>50 uleshort >6 \b, Backup boot sector %u
#>>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
>>>>>>>50 uleshort <6 \b, Backup boot sector %u
>>>>>>>54 ulelong >0 \b, reserved1 0x%x
>>>>>>>58 ulelong >0 \b, reserved2 0x%x
>>>>>>>62 ulelong >0 \b, reserved3 0x%x
# same structure as FAT1X
>>>>>>>64 ubyte >0x80 \b, physical drive 0x%x
#>>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
>>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
#>>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
>>>>>>>65 ubyte >0 \b, reserved 0x%x
>>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>66 ubyte =0x29
>>>>>>>>67 ulelong x \b, serial number 0x%x
>>>>>>>>71 string >>>>>>71 string >NO\ NAME \b, label: "%11.11s"
>>>>>>>71 string =NO\ NAME \b, unlabeled
### FATs end
>0x200 lelong 0x82564557 \b, BSD disklabel
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.firmware
================================================
#--------------------------Firmware Formats---------------------------
# uImage file
# From: Craig Heffner, U-Boot image.h header definitions file
0 belong 0x27051956 uImage header, header size: 64 bytes,
>4 belong x header CRC: 0x%X,
>8 bedate x created: %s,
>12 belong x image size: %d bytes,
>16 belong x Data Address: 0x%X,
>20 belong x Entry Point: 0x%X,
>24 belong x data CRC: 0x%X,
#>28 byte x OS type: %d,
>28 byte 0 OS: Invalid OS,
>28 byte 1 OS: OpenBSD,
>28 byte 2 OS: NetBSD,
>28 byte 3 OS: FreeBSD,
>28 byte 4 OS: 4.4BSD,
>28 byte 5 OS: Linux,
>28 byte 6 OS: SVR4,
>28 byte 7 OS: Esix,
>28 byte 8 OS: Solaris,
>28 byte 9 OS: Irix,
>28 byte 10 OS: SCO,
>28 byte 11 OS: Dell,
>28 byte 12 OS: NCR,
>28 byte 13 OS: LynxOS,
>28 byte 14 OS: VxWorks,
>28 byte 15 OS: pSOS,
>28 byte 16 OS: QNX,
>28 byte 17 OS: Firmware,
>28 byte 18 OS: RTEMS,
>28 byte 19 OS: ARTOS,
>28 byte 20 OS: Unity OS,
#>29 byte x CPU arch: %d,
>29 byte 0 CPU: Invalid OS,
>29 byte 1 CPU: Alpha,
>29 byte 2 CPU: ARM,
>29 byte 3 CPU: Intel x86,
>29 byte 4 CPU: IA64,
>29 byte 5 CPU: MIPS,
>29 byte 6 CPU: MIPS 64 bit,
>29 byte 7 CPU: PowerPC,
>29 byte 8 CPU: IBM S390,
>29 byte 9 CPU: SuperH,
>29 byte 10 CPU: Sparc,
>29 byte 11 CPU: Sparc 64 bit,
>29 byte 12 CPU: M68K,
>29 byte 13 CPU: Nios-32,
>29 byte 14 CPU: MicroBlaze,
>29 byte 15 CPU: Nios-II,
>29 byte 16 CPU: Blackfin,
>29 byte 17 CPU: AVR,
>29 byte 18 CPU: STMicroelectronics ST200,
#>30 byte x image type: %d,
>30 byte 0 image type: Invalid Image,
>30 byte 1 image type: Standalone Program,
>30 byte 2 image type: OS Kernel Image,
>30 byte 3 image type: RAMDisk Image,
>30 byte 4 image type: Multi-File Image,
>30 byte 5 image type: Firmware Image,
>30 byte 6 image type: Script file,
>30 byte 7 image type: Filesystem Image,
>30 byte 8 image type: Binary Flat Device Tree Blob
#>31 byte x compression type: %d,
>31 byte 0 compression type: none,
>31 byte 1 compression type: gzip,
>31 byte 2 compression type: bzip2,
>31 byte 3 compression type: lzma,
>32 string x image name: %s
#IMG0 header, found in VxWorks-based Mercury router firmware
0 string IMG0 IMG0 (VxWorks) header,
>4 belong x size: %d
#Mediatek bootloader signature
#From xp-dev.com
0 string BOOTLOADER! Mediatek bootloader
#CSYS header formats
0 string CSYS\x00 CSYS header, little endian,
>8 lelong x size: %d
0 string CSYS\x80 CSYS header, big endian,
>8 belong x size: %d
# wrgg firmware image
0 string wrgg02 WRGG firmware header,
>6 string x name: %s,
>48 string x root device: %s
# trx image file
0 string HDR0 TRX firmware header, little endian, header size: 28 bytes,
>4 lelong x image size: %d bytes,
>8 lelong x CRC32: 0x%X
>12 lelong x flags/version: 0x%X
0 string 0RDH TRX firmware header, big endian, header size: 28 bytes,
>4 belong x image size: %d bytes,
>8 belong x CRC32: 0x%X
>12 belong x flags/version: 0x%X
# Ubicom firmware image
0 belong 0xFA320080 Ubicom firmware header,
>12 belong x checksum: 0x%X,
>24 belong x image size: %d
# The ROME bootloader is used by several RealTek-based products.
# Unfortunately, the magic bytes are specific to each product, so
# separate signatures must be created for each one.
# Netgear KWGR614 ROME image
0 string G614 Realtek firmware header (ROME bootloader),
>4 beshort 0xd92f image type: KFS,
>4 beshort 0xb162 image type: RDIR,
>4 beshort 0xea43 image type: BOOT,
>4 beshort 0x8dc9 image type: RUN,
>4 beshort 0x2a05 image type: CCFG,
>4 beshort 0x6ce8 image type: DCFG,
>4 beshort 0xc371 image type: LOG,
>6 byte x header version: %d,
#month
>10 byte x created: %d/
#day
>12 byte x \b%d/
#year
>8 beshort x \b%d,
>16 belong x image size: %d bytes,
>22 byte x body checksum: 0x%X,
>23 byte x header checksum: 0x%X
# Linksys WRT54GX ROME image
0 belong 0x59a0e842 Realtek firmware header (ROME bootloader)
>4 beshort 0xd92f image type: KFS,
>4 beshort 0xb162 image type: RDIR,
>4 beshort 0xea43 image type: BOOT,
>4 beshort 0x8dc9 image type: RUN,
>4 beshort 0x2a05 image type: CCFG,
>4 beshort 0x6ce8 image type: DCFG,
>4 beshort 0xc371 image type: LOG,
>6 byte x header version: %d,
#month
>10 byte x created: %d/
#day
>12 byte x \b%d/
#year
>8 beshort x \b%d,
>16 belong x image size: %d bytes,
>22 byte x body checksum: 0x%X,
>23 byte x header checksum: 0x%X
# PackImg tag, somtimes used as a delimiter between the kernel and rootfs in firmware images.
0 string --PaCkImGs-- PackImg Tag,
>16 lelong x little endian size: %d bytes;
>16 belong x big endian size: %d bytes
#------------------------------------------------------------------------------
# Broadcom header format
#
0 string BCRM Broadcom header,
>4 lelong x number of sections: %d,
>>8 lelong 18 first section type: flash
>>8 lelong 19 first section type: disk
>>8 lelong 21 first section type: tag
# Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files
# http://ftg.lbl.gov/checkpoint
0 string Ck0\0\0R\0\0\0 BLCR
>16 lelong 1 x86
>16 lelong 3 alpha
>16 lelong 5 x86-64
>16 lelong 7 ARM
>8 lelong x context data (little endian, version %d)
0 string \0\0\0C\0\0\0R BLCR
>16 belong 2 SPARC
>16 belong 4 ppc
>16 belong 6 ppc64
>16 belong 7 ARMEB
>16 belong 8 SPARC64
>8 belong x context data (big endian, version %d)
# Aculab VoIP firmware
# From: Mark Brown
0 string VoIP\ Startup\ and Aculab VoIP firmware
>35 string x format %s
#------------------------------------------------------------------------------
# HP LaserJet 1000 series downloadable firmware file
0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
# From Albert Cahalan
# really le32 operation,destination,payloadsize (but quite predictable)
# 01 00 00 00 00 00 00 c0 00 02 00 00
0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware
#---------------------------------------------------------------------------
# The following entries have been tested by Duncan Laurie (a
# lead Sun/Cobalt developer) who agrees that they are good and worthy of
# inclusion.
# Boot ROM images for Sun/Cobalt Linux server appliances
0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom
>38 string x V%.4s
# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
# at the very end where file(1) can't get it.
0 string CRfs COBALT boot rom data (Flat boot rom or file system)
#
# Motorola S-Records, from Gerd Truschinski
0 string S0 Motorola S-Record; binary data in text format
# --------------------------------
# Microsoft Xbox data file formats
0 string XIP0 XIP, Microsoft Xbox data
0 string XTF0 XTF, Microsoft Xbox data
#Windows CE
64 string CECE Windows CE RTOS
# --------------------------------
# ZynOS ROM header format
# From openwrt zynos.h.
6 string SIG ZynOS header, header size: 48 bytes,
>0 belong x load address 0x%X,
>9 byte <0x7F rom image type:
>>9 byte <1 invalid,
>>9 byte >7 invalid,
>>9 byte 1 ROMIMG,
>>9 byte 2 ROMBOOT,
>>9 byte 3 BOOTEXT,
>>9 byte 4 ROMBIN,
>>9 byte 5 ROMDIR,
>>9 byte 6 6,
>>9 byte 7 ROMMAP,
>9 byte >0x7F ram image type:
>>9 byte >0x82 invalid,
>>9 byte 0x80 RAM,
>>9 byte 0x81 RAMCODE,
>>9 byte 0x82 RAMBOOT,
>10 belong >0x40000000 invalid
>10 belong <0 invalid
>10 belong 0 invalid
>10 belong x uncompressed size: %d,
>14 belong >0x40000000 invalid
>14 belong <0 invalid
>14 belong 0 invalid
>14 belong x compressed size: %d,
>20 beshort x uncompressed checksum: 0x%X,
>22 beshort x compressed checksum: 0x%X,
>18 byte x flags: 0x%X,
>18 byte &0x40 uncompressed checksum is valid,
>18 byte &0x80 the binary is compressed,
>>18 byte &0x20 compressed checksum is valid,
>41 belong x memory map table address: 0x%X
# Firmware header used by some VxWorks-based Cisco products
0 string CI032.00 Cisco VxWorks firmware header,
>8 lelong >1024 invalid
>8 lelong <0 invalid
>8 lelong x header size: %d bytes,
>32 lelong >1024 invalid
>32 lelong <0 invalid
>32 lelong x number of files: %d,
>48 lelong <0 invalid
>48 lelong x image size: %d,
>64 string x firmware version: %s
# Firmware header used by some TV's
0 string FNIB ZBOOT firmware header, header size: 32 bytes,
>8 lelong x load address: 0x%.8X,
>12 lelong x start address: 0x%.8X,
>16 lelong x checksum: 0x%.8X,
>20 lelong x version: 0x%.8X,
>24 lelong <1 invalid
>24 lelong x image size: %d bytes
# Firmware header used by several D-Link routers (and probably others)
0 string \x5e\xa3\xa4\x17
>(7.b+12) string \x5e\xa3\xa4\x17 DLOB firmware header,
>>12 string x %s,
>>(7.b+40) string x %s
================================================
FILE: src/binwalk-0.4.1/src/magic/magic.kernels
================================================
#-------------------------Kernels-------------------------------------
# Linux kernel boot images, from Albert Cahalan
# and others such as Axel Kohlmeyer
# and Nicolás Lichtmaier
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
514 string HdrS Linux kernel
================================================
FILE: src/binwalk-0.4.1/src/magic.binarch
================================================
# MIPS prologue
# addiu $sp, -XX
# 27 BD FF XX
1 string \377\275\47 MIPSEL function prologue
0 string \47\275\377 MIPS function prologue
# MIPS epilogue
# jr $ra
0 belong 0x03e00008 MIPS function epilogue
0 lelong 0x03e00008 MIPSEL function epilogue
# PowerPC epilogue
# blr
0 belong 0x4E800020 PowerPC big endian function epilogue
0 lelong 0x4E800020 PowerPC little endian function epilogue
# ARM prologue
# STMFD SP!, {XX}
0 beshort 0xE92D ARMEB function prologue
2 leshort 0xE92D ARM function prologue
# ARM epilogue
# LDMFD SP!, {XX}
0 beshort 0xE8BD ARMEB function epilogue
2 leshort 0xE8BD ARM function epilogue
================================================
FILE: src/binwalk-0.4.1/src/magic.bincast
================================================
0 belong x Hex: 0x%.8X
#0 string x String: %s
0 lelong x Little Endian Long: %d
0 belong x Big Endian Long: %d
0 leshort x Little Endian Short: %d
0 beshort x Big Endian Short: %d
0 ledate x Little Endian Date: %s
0 bedate x Big Endian Date: %s
================================================
FILE: src/binwalk-0.4.1/src/magic.binwalk
================================================
# ----------------------------Archive Formats--------------------------------------
# POSIX tar archives
257 string ustar\000 POSIX tar archive
!:mime application/x-tar # encoding: posix
257 string ustar\040\040\000 GNU tar archive
!:mime application/x-tar # encoding: gnu
# MIPS archive (needs to go before regular portable archives)
#
0 string =!\n__________E MIPS archive
>20 string U with MIPS Ucode members
>21 string L with MIPSEL members
>21 string B with MIPSEB members
>19 string L and an EL hash table
>19 string B and an EB hash table
>22 string X -- out of date
# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
0 string JARCS JAR (ARJ Software, Inc.) archive data
# ARJ archiver (jason@jarthur.Claremont.EDU)
0 leshort 0xea60 ARJ archive data
!:mime application/x-arj
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
>8 byte &0x20 backup,
>34 string x original name: %s,
>7 byte 0 os: MS-DOS
>7 byte 1 os: PRIMOS
>7 byte 2 os: Unix
>7 byte 3 os: Amiga
>7 byte 4 os: Macintosh
>7 byte 5 os: OS/2
>7 byte 6 os: Apple ][ GS
>7 byte 7 os: Atari ST
>7 byte 8 os: NeXT
>7 byte 9 os: VAX/VMS
>3 byte >0 %d]
# [JW] idarc says this is also possible
2 leshort 0xea60 ARJ archive data
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
>8 byte &0x20 backup,
>34 string x original name: %s,
>7 byte 0 os: MS-DOS
>7 byte 1 os: PRIMOS
>7 byte 2 os: Unix
>7 byte 3 os: Amiga
>7 byte 4 os: Macintosh
>7 byte 5 os: OS/2
>7 byte 6 os: Apple ][ GS
>7 byte 7 os: Atari ST
>7 byte 8 os: NeXT
>7 byte 9 os: VAX/VMS
>3 byte >0 %d]
# RAR archiver (Greg Roelofs, newt@uchicago.edu)
0 string Rar! RAR archive data [NSRL|RAR]
# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
0 string HPAK HPACK archive data [NSRL|HPAK]
# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
0 string \351,\001JAM\ JAM archive, [NSRL|JAM]
# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
2 string -lh0- LHarc 1.x archive data [lh0] [NSRL|LHA1]
2 string -lh1- LHarc 1.x archive data [lh1] [NSRL|LHA1]
2 string -lz4- LHarc 1.x archive data [lz4] [NSRL|LHA1]
2 string -lz5- LHarc 1.x archive data [lz5] [NSRL|LHA1]
# [never seen any but the last; -lh4- reported in comp.compression:]
2 string -lzs- LHa 2.x? archive data [lzs] [NSRL|LHA2]
2 string -lh\40- LHa 2.x? archive data [lh ] [NSRL|LHA2]
2 string -lhd- LHa 2.x? archive data [lhd] [NSRL|LHA2]
2 string -lh2- LHa 2.x? archive data [lh2] [NSRL|LHA2]
2 string -lh3- LHa 2.x? archive data [lh3] [NSRL|LHA2]
2 string -lh4- LHa (2.x) archive data [lh4] [NSRL|LHA2]
2 string -lh5- LHa (2.x) archive data [lh5] [NSRL|LHA2]
2 string -lh6- LHa (2.x) archive data [lh6] [NSRL|LHA2]
2 string -lh7- LHa (2.x) archive data [lh7] [NSRL|LHA2]
# SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
0 string SQSH squished archive data (Acorn RISCOS) [NSRL|SQSH]
# UC2 archiver (Greg Roelofs, newt@uchicago.edu)
# I can't figure out the self-extracting form of these buggers...
0 string UC2\x1a UC2 archive data [NSRL|UC2]
# Zoo archiver
20 lelong 0xfdc4a7dc Zoo archive data [NSRL|ZOO]
# Shell archives
# JT, 2004-03-17: The "#" in the middle of the line makes it look like the
# rest of the line is commented out - I guess it's OK? Beware if parsing!
10 string #\ This\ is\ a\ shell\ archive shell archive text [NSRL|SH]
#
# LBR. NB: May conflict with the questionable
# "binary Computer Graphics Metafile" format.
#
0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data [NSRL|LBR]
#
# PMA (CP/M derivative of LHA)
#
2 string -pm0- PMarc archive data [pm0] [NSRL|PMA]
2 string -pm1- PMarc archive data [pm1] [NSRL|PMA]
2 string -pm2- PMarc archive data [pm2] [NSRL|PMA]
2 string -pms- PMarc SFX archive (CP/M, DOS) [NSRL|PMA-SFX]
5 string -pc1- PopCom compressed executable archive (CP/M) [NSRL|PPC-SFX]
# From rafael@icp.inpg.fr (Rafael Laboissiere)
# The Project Revision Control System (see
# http://www.XCF.Berkeley.EDU/~jmacd/prcs.html) generates a packaged project
# file which is recognized by the following entry:
0 leshort 0xeb81 PRCS packaged project archive [NSRL|PRCS]
# GTKtalog catalogs
# by David Necas (Yeti)
4 string gtktalog\ GTKtalog catalog data archive, [NSRL|GTK]
>>14 beshort 0x677a (gzipped)
#---------------------------Bootloaders--------------------------------
# CFE bootloader
0 string CFE1CFE1 CFE boot loader, little endian
0 string 1EFC1EFC CFE boot loader, big endian
#------------------Compression Formats-----------------------------
# bzip2
0 string BZh
>4 string 1AY&SY bzip2 compressed data
!:mime application/x-bzip2
>>3 byte >47 \b, block size = %c00k
# lzip
0 string LZIP lzip compressed data
!:mime application/x-lzip
>4 byte x \b, version: %d
# LZO
0 string \211LZO\000\015\012\032\012 LZO compressed data
# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
# http://www.7-zip.org or DOC/7zFormat.txt
#
0 string 7z\274\257\047\034 7-zip archive data,
>6 byte x version %d
>7 byte x \b.%d
# standard unix compress
0 beshort 0x1f9d compress'd data
>2 byte&0x80 >0 block compressed
>2 byte&0x1f x %d bits
# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
# Edited by Chris Chittleborough , March 2002
# * Original filename is only at offset 10 if "extra field" absent
# * Produce shorter output - notably, only report compression methods
# other than 8 ("deflate", the only method defined in RFC 1952).
0 string \037\213 gzip compressed data
!:mime application/x-gzip
>2 byte <8 \b, reserved (invalid) method
>2 byte >8 \b, unknown (invalid) method
>3 byte &0x01 \b, ASCII
>3 byte &0x02 \b, has CRC
>3 byte &0x04 \b, extra field
>3 byte&0xC =0x08
>>10 string x \b, was "%s"
>3 byte &0x10 \b, has comment
>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
>9 byte =0x01 \b, from Amiga
>9 byte =0x02 \b, from VMS
>9 byte =0x03 \b, from Unix
>9 byte =0x04 \b, from VM/CMS
>9 byte =0x05 \b, from Atari
>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT)
>9 byte =0x07 \b, from MacOS
>9 byte =0x08 \b, from Z-System
>9 byte =0x09 \b, from CP/M
>9 byte =0x0A \b, from TOPS/20
>9 byte =0x0B \b, from NTFS filesystem (NT)
>9 byte =0x0C \b, from QDOS
>9 byte =0x0D \b, from Acorn RISCOS
>9 byte >0x0D \b, invalid source
>3 byte &0x10 \b, comment
>3 byte &0x20 \b, encrypted
# Dates before 1992 are invalid, unless of course you're DD-WRT in which
# case you don't know how to set a date in your gzip files. Brilliant.
>4 lelong =0 \b, DD-WRT date:
>4 lelong <0 \b, invalid date:
>4 lelong >0
>>4 lelong <694224000 \b, invalid date:
>>4 lelong =694224000 \b, invalid date:
>>4 lelong >694224000 \b, last modified:
>4 ledate x %s
>8 byte 2 \b, max compression
>8 byte 4 \b, max speed
# Zlib signatures
0 beshort 0x789C zlib compressed data
0 beshort 0x78DA zlib compressed data
0 beshort 0x7801 zlib compressed data
# Supplementary magic data for the file(1) command to support
# rzip(1). The format is described in magic(5).
#
# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with
# this file.
#
0 string RZIP rzip compressed data
>4 byte x - version %d
>5 byte x \b.%d
>6 belong x (%d bytes)
# ZIP compression (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004 Zip archive data,
>4 byte 0x00 v0.0
!:mime application/zip
>4 byte 0x09 at least v0.9 to extract
!:mime application/zip
>4 byte 0x0a at least v1.0 to extract
!:mime application/zip
>4 byte 0x0b at least v1.1 to extract
!:mime application/zip
>0x161 string WINZIP WinZIP self-extracting
!:mime application/zip
>4 byte 0x14
>>30 ubelong !0x6d696d65 at least v2.0 to extract
!:mime application/zip
# Alternate ZIP string (amc@arwen.cs.berkeley.edu)
0 string PK00PK\003\004 Zip archive data [NSRL|ZIP]
# Type: LZMA
# URL: http://www.7-zip.org/sdk.html
#
# Added additional parsing to help verify LZMA matches and weed out false positives.
# Added improved signature checking.
# Added checks for possibly (probably) invalid matches.
# From: Craig Heffner
#First LZMA signature
0 string \x5d\x00\x00 LZMA compressed data,
>0 leshort >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
#An alternative common LZMA signature
1 belong 0x00008000 LZMA compressed data,
>0 byte 0 invalid
>0 leshort >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
#Signature for less common LZMA flag/dictionary values. Results in lots of false positives, but usually marked as invalid.
1 beshort 0x0000 LZMA compressed data,
>0 byte 0 invalid
>0 byte >0xE0 invalid
>0 byte x properties: 0x%.2X,
>1 lelong <1 invalid
>1 lelong x dictionary size: %d bytes,
>5 lequad 0 invalid
>5 lequad <0 invalid
>5 lequad >0x40000000 invalid
>5 lequad x uncompressed size: %lld bytes
#------------------Standard file formats------------------------------------
# elf: file(1) magic for ELF executables
#
# We have to check the byte order flag to see what byte order all the
# other stuff in the header is in.
#
# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
#
# Created by: unknown
# Modified by (1): Daniel Quinlan
# Modified by (2): Peter Tobias (core support)
# Modified by (3): Christian 'Dr. Disk' Hechelmann (fix of core support)
# Modified by (4): (VMS Itanium)
# Modified by (5): Matthias Urlichs (Listing of many architectures)
0 string \177ELF ELF
>4 byte 0 invalid class
>4 byte 1 32-bit
>4 byte 2 64-bit
>5 byte 0 invalid byte order
>5 byte 1 LSB
>>16 leshort 0 no file type,
!:strength *2
!:mime application/octet-stream
>>16 leshort 1 relocatable,
!:mime application/x-object
>>16 leshort 2 executable,
!:mime application/x-executable
>>16 leshort 3 shared object,
!:mime application/x-sharedlib
>>16 leshort 4 core file
!:mime application/x-coredump
# Core file detection is not reliable.
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) lelong >0 (signal %d),
>>16 leshort &0xff00 processor-specific,
>>18 leshort 0 no machine,
>>18 leshort 1 AT&T WE32100 - invalid byte order,
>>18 leshort 2 SPARC - invalid byte order,
>>18 leshort 3 Intel 80386,
>>18 leshort 4 Motorola
>>>36 lelong &0x01000000 68000 - invalid byte order,
>>>36 lelong &0x00810000 CPU32 - invalid byte order,
>>>36 lelong 0 68020 - invalid byte order,
>>18 leshort 5 Motorola 88000 - invalid byte order,
>>18 leshort 6 Intel 80486,
>>18 leshort 7 Intel 80860,
# The official e_machine number for MIPS is now #8, regardless of endianness.
# The second number (#10) will be deprecated later. For now, we still
# say something if #10 is encountered, but only gory details for #8.
>>18 leshort 8 MIPS,
>>>36 lelong &0x20 N32
>>18 leshort 10 MIPS,
>>>36 lelong &0x20 N32
>>18 leshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 lelong&0xf0000000 0x00000000 MIPS-I
>>>>36 lelong&0xf0000000 0x10000000 MIPS-II
>>>>36 lelong&0xf0000000 0x20000000 MIPS-III
>>>>36 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>36 lelong&0xf0000000 0x40000000 MIPS-V
>>>>36 lelong&0xf0000000 0x50000000 MIPS32
>>>>36 lelong&0xf0000000 0x60000000 MIPS64
>>>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2
>>>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 lelong&0xf0000000 0x00000000 MIPS-I
>>>>48 lelong&0xf0000000 0x10000000 MIPS-II
>>>>48 lelong&0xf0000000 0x20000000 MIPS-III
>>>>48 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>48 lelong&0xf0000000 0x40000000 MIPS-V
>>>>48 lelong&0xf0000000 0x50000000 MIPS32
>>>>48 lelong&0xf0000000 0x60000000 MIPS64
>>>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2
>>>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2
>>18 leshort 9 Amdahl - invalid byte order,
>>18 leshort 10 MIPS (deprecated),
>>18 leshort 11 RS6000 - invalid byte order,
>>18 leshort 15 PA-RISC - invalid byte order,
>>>50 leshort 0x0214 2.0
>>>48 leshort &0x0008 (LP64),
>>18 leshort 16 nCUBE,
>>18 leshort 17 Fujitsu VPP500,
>>18 leshort 18 SPARC32PLUS - invalid byte order,
>>18 leshort 20 PowerPC,
>>18 leshort 22 IBM S/390,
>>18 leshort 36 NEC V800,
>>18 leshort 37 Fujitsu FR20,
>>18 leshort 38 TRW RH-32,
>>18 leshort 39 Motorola RCE,
>>18 leshort 40 ARM,
>>18 leshort 41 Alpha,
>>18 leshort 0xa390 IBM S/390 (obsolete),
>>18 leshort 42 Renesas SH,
>>18 leshort 43 SPARC V9 - invalid byte order,
>>18 leshort 44 Siemens Tricore Embedded Processor,
>>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 leshort 46 Renesas H8/300,
>>18 leshort 47 Renesas H8/300H,
>>18 leshort 48 Renesas H8S,
>>18 leshort 49 Renesas H8/500,
>>18 leshort 50 IA-64,
>>18 leshort 51 Stanford MIPS-X,
>>18 leshort 52 Motorola Coldfire,
>>18 leshort 53 Motorola M68HC12,
>>18 leshort 54 Fujitsu MMA,
>>18 leshort 55 Siemens PCP,
>>18 leshort 56 Sony nCPU,
>>18 leshort 57 Denso NDR1,
>>18 leshort 58 Start*Core,
>>18 leshort 59 Toyota ME16,
>>18 leshort 60 ST100,
>>18 leshort 61 Tinyj emb.,
>>18 leshort 62 x86-64,
>>18 leshort 63 Sony DSP,
>>18 leshort 66 FX66,
>>18 leshort 67 ST9+ 8/16 bit,
>>18 leshort 68 ST7 8 bit,
>>18 leshort 69 MC68HC16,
>>18 leshort 70 MC68HC11,
>>18 leshort 71 MC68HC08,
>>18 leshort 72 MC68HC05,
>>18 leshort 73 SGI SVx,
>>18 leshort 74 ST19 8 bit,
>>18 leshort 75 Digital VAX,
>>18 leshort 76 Axis cris,
>>18 leshort 77 Infineon 32-bit embedded,
>>18 leshort 78 Element 14 64-bit DSP,
>>18 leshort 79 LSI Logic 16-bit DSP,
>>18 leshort 80 MMIX,
>>18 leshort 81 Harvard machine-independent,
>>18 leshort 82 SiTera Prism,
>>18 leshort 83 Atmel AVR 8-bit,
>>18 leshort 84 Fujitsu FR30,
>>18 leshort 85 Mitsubishi D10V,
>>18 leshort 86 Mitsubishi D30V,
>>18 leshort 87 NEC v850,
>>18 leshort 88 Renesas M32R,
>>18 leshort 89 Matsushita MN10300,
>>18 leshort 90 Matsushita MN10200,
>>18 leshort 91 picoJava,
>>18 leshort 92 OpenRISC,
>>18 leshort 93 ARC Cores Tangent-A5,
>>18 leshort 94 Tensilica Xtensa,
>>18 leshort 97 NatSemi 32k,
>>18 leshort 106 Analog Devices Blackfin,
>>18 leshort 113 Altera Nios II,
>>18 leshort 0xae META,
>>18 leshort 0x3426 OpenRISC (obsolete),
>>18 leshort 0x8472 OpenRISC (obsolete),
>>18 leshort 0x9026 Alpha (unofficial),
>>20 lelong 0 invalid version
>>20 lelong 1 version 1
>>36 lelong 1 MathCoPro/FPU/MAU Required
>5 byte 2 MSB
>>16 beshort 0 no file type,
!:mime application/octet-stream
>>16 beshort 1 relocatable,
!:mime application/x-object
>>16 beshort 2 executable,
!:mime application/x-executable
>>16 beshort 3 shared object,
!:mime application/x-sharedlib
>>16 beshort 4 core file,
!:mime application/x-coredump
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) belong >0 (signal %d),
>>16 beshort &0xff00 processor-specific,
>>18 beshort 0 no machine,
>>18 beshort 1 AT&T WE32100,
>>18 beshort 2 SPARC,
>>18 beshort 3 Intel 80386 - invalid byte order,
>>18 beshort 4 Motorola
>>>36 belong &0x01000000 68000,
>>>36 belong &0x00810000 CPU32,
>>>36 belong 0 68020,
>>18 beshort 5 Motorola 88000,
>>18 beshort 6 Intel 80486 - invalid byte order,
>>18 beshort 7 Intel 80860,
# only for MIPS - see comment in little-endian section above.
>>18 beshort 8 MIPS,
>>>36 belong &0x20 N32
>>18 beshort 10 MIPS,
>>>36 belong &0x20 N32
>>18 beshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 belong&0xf0000000 0x00000000 MIPS-I
>>>>36 belong&0xf0000000 0x10000000 MIPS-II
>>>>36 belong&0xf0000000 0x20000000 MIPS-III
>>>>36 belong&0xf0000000 0x30000000 MIPS-IV
>>>>36 belong&0xf0000000 0x40000000 MIPS-V
>>>>36 belong&0xf0000000 0x50000000 MIPS32
>>>>36 belong&0xf0000000 0x60000000 MIPS64
>>>>36 belong&0xf0000000 0x70000000 MIPS32 rel2
>>>>36 belong&0xf0000000 0x80000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 belong&0xf0000000 0x00000000 MIPS-I
>>>>48 belong&0xf0000000 0x10000000 MIPS-II
>>>>48 belong&0xf0000000 0x20000000 MIPS-III
>>>>48 belong&0xf0000000 0x30000000 MIPS-IV
>>>>48 belong&0xf0000000 0x40000000 MIPS-V
>>>>48 belong&0xf0000000 0x50000000 MIPS32
>>>>48 belong&0xf0000000 0x60000000 MIPS64
>>>>48 belong&0xf0000000 0x70000000 MIPS32 rel2
>>>>48 belong&0xf0000000 0x80000000 MIPS64 rel2
>>18 beshort 9 Amdahl,
>>18 beshort 10 MIPS (deprecated),
>>18 beshort 11 RS6000,
>>18 beshort 15 PA-RISC
>>>50 beshort 0x0214 2.0
>>>48 beshort &0x0008 (LP64)
>>18 beshort 16 nCUBE,
>>18 beshort 17 Fujitsu VPP500,
>>18 beshort 18 SPARC32PLUS,
>>>36 belong&0xffff00 0x000100 V8+ Required,
>>>36 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
>>>36 belong&0xffff00 0x000400 HaL R1 Extensions Required,
>>>36 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
>>18 beshort 20 PowerPC or cisco 4500,
>>18 beshort 21 64-bit PowerPC or cisco 7500,
>>18 beshort 22 IBM S/390,
>>18 beshort 23 Cell SPU,
>>18 beshort 24 cisco SVIP,
>>18 beshort 25 cisco 7200,
>>18 beshort 36 NEC V800 or cisco 12000,
>>18 beshort 37 Fujitsu FR20,
>>18 beshort 38 TRW RH-32,
>>18 beshort 39 Motorola RCE,
>>18 beshort 40 ARM,
>>18 beshort 41 Alpha,
>>18 beshort 42 Renesas SH,
>>18 beshort 43 SPARC V9,
>>>48 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
>>>48 belong&0xffff00 0x000400 HaL R1 Extensions Required,
>>>48 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
>>>48 belong&0x3 0 total store ordering,
>>>48 belong&0x3 1 partial store ordering,
>>>48 belong&0x3 2 relaxed memory ordering,
>>18 beshort 44 Siemens Tricore Embedded Processor,
>>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 beshort 46 Renesas H8/300,
>>18 beshort 47 Renesas H8/300H,
>>18 beshort 48 Renesas H8S,
>>18 beshort 49 Renesas H8/500,
>>18 beshort 50 IA-64,
>>18 beshort 51 Stanford MIPS-X,
>>18 beshort 52 Motorola Coldfire,
>>18 beshort 53 Motorola M68HC12,
>>18 beshort 73 Cray NV1,
>>18 beshort 75 Digital VAX,
>>18 beshort 88 Renesas M32R,
>>18 leshort 92 OpenRISC,
>>18 leshort 0x3426 OpenRISC (obsolete),
>>18 leshort 0x8472 OpenRISC (obsolete),
>>18 beshort 94 Tensilica Xtensa,
>>18 beshort 97 NatSemi 32k,
>>18 beshort 0x18ad AVR32 (unofficial),
>>18 beshort 0x9026 Alpha (unofficial),
>>18 beshort 0xa390 IBM S/390 (obsolete),
>>20 belong 0 invalid version
>>20 belong 1 version 1
>>36 belong 1 MathCoPro/FPU/MAU Required
# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
# like proper ELF, but extracting the string had bad results.
>4 byte <0x80
>>8 string >\0 (%s)
>8 string \0
>>7 byte 0 (SYSV)
>>7 byte 1 (HP-UX)
>>7 byte 2 (NetBSD)
>>7 byte 3 (GNU/Linux)
>>7 byte 4 (GNU/Hurd)
>>7 byte 5 (86Open)
>>7 byte 6 (Solaris)
>>7 byte 7 (Monterey)
>>7 byte 8 (IRIX)
>>7 byte 9 (FreeBSD)
>>7 byte 10 (Tru64)
>>7 byte 11 (Novell Modesto)
>>7 byte 12 (OpenBSD)
>8 string \2
>>7 byte 13 (OpenVMS)
>>7 byte 97 (ARM)
>>7 byte 255 (embedded)
# XXX - according to Microsoft's spec, at an offset of 0x3c in a
# PE-format executable is the offset in the file of the PE header;
# unfortunately, that's a little-endian offset, and there's no way
# to specify an indirect offset with a specified byte order.
# So, for now, we assume the standard MS-DOS stub, which puts the
# PE header at 0x80 = 128.
#
# Required OS version and subsystem version were 4.0 on some NT 3.51
# executables built with Visual C++ 4.0, so it's not clear that
# they're interesting. The user version was 0.0, but there's
# probably some linker directive to set it. The linker version was
# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
#
# many of the compressed formats were extraced from IDARC 1.23 source code
#
0 string MZ
!:mime application/x-dosexec
>0x18 leshort <0x40 MS-DOS executable
>0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
>>&18 leshort&0x2000 >0 (DLL)
>>&88 leshort 0 (unknown subsystem)
>>&88 leshort 1 (native)
>>&88 leshort 2 (GUI)
>>&88 leshort 3 (console)
>>&88 leshort 7 (POSIX)
>>&0 leshort 0x0 unknown processor
>>&0 leshort 0x14c Intel 80386
>>&0 leshort 0x166 MIPS R4000
>>&0 leshort 0x184 Alpha
>>&0 leshort 0x268 Motorola 68000
>>&0 leshort 0x1f0 PowerPC
>>&0 leshort 0x290 PA-RISC
>>&18 leshort&0x0100 >0 32-bit
>>&18 leshort&0x1000 >0 system file
>>&228 lelong >0 \b, Mono/.Net assembly
>>&0xf4 search/0x140 \x0\x40\x1\x0
>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
>30 string Copyright\ 1989-1990\ PKWARE\ Inc. Self-extracting PKZIP archive
!:mime application/zip
# Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
>30 string PKLITE\ Copr. Self-extracting PKZIP archive
!:mime application/zip
>0x18 leshort >0x3f
>>(0x3c.l) string PE\0\0 PE
>>>(0x3c.l+25) byte 1 \b32 executable
>>>(0x3c.l+25) byte 2 \b32+ executable
# hooray, there's a DOS extender using the PE format, with a valid PE
# executable inside (which just prints a message and exits if run in win)
>>>(0x3c.l+92) leshort <10
>>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
>>>>(8.s*16) string !32STUB for MS Windows
>>>>>(0x3c.l+22) leshort&0x2000 >0 (DLL)
>>>>>(0x3c.l+92) leshort 0 (unknown subsystem)
>>>>>(0x3c.l+92) leshort 1 (native)
>>>>>(0x3c.l+92) leshort 2 (GUI)
>>>>>(0x3c.l+92) leshort 3 (console)
>>>>>(0x3c.l+92) leshort 7 (POSIX)
>>>(0x3c.l+92) leshort 10 (EFI application)
>>>(0x3c.l+92) leshort 11 (EFI boot service driver)
>>>(0x3c.l+92) leshort 12 (EFI runtime driver)
>>>(0x3c.l+92) leshort 13 (XBOX)
>>>(0x3c.l+4) leshort 0x0 unknown processor
>>>(0x3c.l+4) leshort 0x14c Intel 80386
>>>(0x3c.l+4) leshort 0x166 MIPS R4000
>>>(0x3c.l+4) leshort 0x184 Alpha
>>>(0x3c.l+4) leshort 0x268 Motorola 68000
>>>(0x3c.l+4) leshort 0x1f0 PowerPC
>>>(0x3c.l+4) leshort 0x290 PA-RISC
>>>(0x3c.l+4) leshort 0x200 Intel Itanium
>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
>>>(0x3c.l+22) leshort&0x1000 >0 system file
>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
>>>>(0x3c.l+0xf8) search/0x140 UPX2
>>>>>(&0x10.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>(0x3c.l+0xf8) search/0x140 .idata
>>>>>(&0xe.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>>(&0xe.l+(-4)) string ZZ0 \b, ZZip self-extracting archive
>>>>>(&0xe.l+(-4)) string ZZ1 \b, ZZip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .rsrc
>>>>>(&0x0f.l+(-4)) string a\\\4\5 \b, WinHKI self-extracting archive
>>>>>(&0x0f.l+(-4)) string Rar! \b, RAR self-extracting archive
>>>>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
>>>>>(&0x0f.l+(-4)) search/32 Nullsoft \b, Nullsoft Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .data
>>>>>(&0x0f.l) string WEXTRACT \b, MS CAB-Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .petite\0 \b, Petite compressed
>>>>>(0x3c.l+0xf7) byte x
>>>>>>(&0x104.l+(-4)) string =!sfx! \b, ACE self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .WISE \b, WISE installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .dz\0\0\0 \b, Dzip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .reloc
>>>>>(&0xe.l+(-4)) search/0x180 PK\3\4 \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 _winzip_ \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 SharedD \b, Microsoft Installer self-extracting archive
>>>>0x30 string Inno \b, InnoSetup self-extracting archive
>>(0x3c.l) string !PE\0\0 MS-DOS executable
>>(0x3c.l) string NE \b, NE
>>>(0x3c.l+0x36) byte 0 (unknown OS)
>>>(0x3c.l+0x36) byte 1 for OS/2 1.x
>>>(0x3c.l+0x36) byte 2 for MS Windows 3.x
>>>(0x3c.l+0x36) byte 3 for MS-DOS
>>>(0x3c.l+0x36) byte >3 (unknown OS)
>>>(0x3c.l+0x36) byte 0x81 for MS-DOS, Phar Lap DOS extender
>>>(0x3c.l+0x0c) leshort&0x8003 0x8002 (DLL)
>>>(0x3c.l+0x0c) leshort&0x8003 0x8001 (driver)
>>>&(&0x24.s-1) string ARJSFX \b, ARJ self-extracting archive
>>>(0x3c.l+0x70) search/0x80 WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
>>(0x3c.l) string LX\0\0 \b, LX
>>>(0x3c.l+0x0a) leshort <1 (unknown OS)
>>>(0x3c.l+0x0a) leshort 1 for OS/2
>>>(0x3c.l+0x0a) leshort 2 for MS Windows
>>>(0x3c.l+0x0a) leshort 3 for DOS
>>>(0x3c.l+0x0a) leshort >3 (unknown OS)
>>>(0x3c.l+0x10) lelong&0x28000 =0x8000 (DLL)
>>>(0x3c.l+0x10) lelong&0x20000 >0 (device driver)
>>>(0x3c.l+0x10) lelong&0x300 0x300 (GUI)
>>>(0x3c.l+0x10) lelong&0x28300 <0x300 (console)
>>>(0x3c.l+0x08) leshort 1 i80286
>>>(0x3c.l+0x08) leshort 2 i80386
>>>(0x3c.l+0x08) leshort 3 i80486
>>>(8.s*16) string emx \b, emx
>>>>&1 string x %s
>>>&(&0x54.l-3) string arjsfx \b, ARJ self-extracting archive
#------------------------------------------------------------------------------
# bFLT: file(1) magic for BFLT uclinux binary files
#
# From Philippe De Muyter
#
# Additional fields added by Craig Heffner
#
0 string bFLT BFLT executable
>4 belong x version %ld,
>4 belong 4
>8 belong x code offset: 0x%.8X,
>12 belong x data segment starts at: 0x%.8X,
>16 belong x bss segment starts at: 0x%.8X,
>20 belong x bss segment ends at: 0x%.8X,
>24 belong x stack size: %d bytes,
>28 belong x relocation records start at: 0x%.8X,
>32 belong x number of reolcation records: %d,
>>36 belong&0x1 0x1 ram
>>36 belong&0x2 0x2 gotpic
>>36 belong&0x4 0x4 gzip
>>36 belong&0x8 0x8 gzdata
#-----------------------------------------------------------------
# MIPS COFF file formats
#
0 beshort 0x0160 MIPSEB ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0162 MIPSEL-BE ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x ^H.%ld
#
0 beshort 0x6001 MIPSEB-LE ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x ^H.%ld
#
0 beshort 0x6201 MIPSEL ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
# MIPS 2 additions
#
0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
# MIPS 3 additions
#
0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x ^H.%ld
#
0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x ^H.%ld
#
0 beshort 0x180 MIPSEB Ucode
0 beshort 0x182 MIPSEL-BE Ucode
# Windows CE package files
0 string MSCE\0\0\0\0 Microsoft WinCE installer
>20 lelong 0 \b, architecture-independent
>20 lelong 103 \b, Hitachi SH3
>20 lelong 104 \b, Hitachi SH4
>20 lelong 0xA11 \b, StrongARM
>20 lelong 4000 \b, MIPS R4000
>20 lelong 10003 \b, Hitachi SH3
>20 lelong 10004 \b, Hitachi SH3E
>20 lelong 10005 \b, Hitachi SH4
>20 lelong 70001 \b, ARM 7TDMI
>52 leshort 1 \b, 1 file
>52 leshort >1 \b, %u files
>56 leshort 1 \b, 1 registry entry
>56 leshort >1 \b, %u registry entries
#------------------------------------------------------------------------------
# Microsoft Xbox executables .xbe (Esa Hyytiä )
0 string XBEH XBE, Microsoft Xbox executable
# probabilistic checks whether signed or not
>0x0004 ulelong =0x0
>>&2 ulelong =0x0
>>>&2 ulelong =0x0 \b, not signed
>0x0004 ulelong >0
>>&2 ulelong >0
>>>&2 ulelong >0 \b, signed
# expect base address of 0x10000
>0x0104 ulelong =0x10000
>>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
>>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
>>>(0x0118-0x0FF60) ulelong >0 (regions:
>>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
>>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
>>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
>>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
>>>(0x0118-0x0FF60) ulelong >0 \b)
#------------------------------------------------------------------------------
# motorola: file(1) magic for Motorola 68K and 88K binaries
#
# 68K
#
0 beshort 0x0208 mc68k COFF
>18 beshort ^00000020 object
>18 beshort &00000020 executable
>12 belong >0 not stripped
>168 string .lowmem Apple toolbox
>20 beshort 0407 (impure)
>20 beshort 0410 (pure)
>20 beshort 0413 (demand paged)
>20 beshort 0421 (standalone)
0 beshort 0x0209 mc68k executable (shared)
>12 belong >0 not stripped
0 beshort 0x020A mc68k executable (shared demand paged)
>12 belong >0 not stripped
#
# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
#
0 beshort 0x022A 68K BCS executable
#
# 88K
#
# Motorola/88Open BCS
#
0 beshort 0x022B 88K BCS executable
#------------------------------------------------------------------------------
# Sony Playstation executables (Adam Sjoegren ) :
0 string PS-X\ EXE Sony Playstation executable
# Area:
>113 string x (%s)
#------------------------------------------------------------------------------
# cisco: file(1) magic for cisco Systems routers
#
# Most cisco file-formats are covered by the generic elf code
#
# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
0 beshort 0x8501 cisco IOS
>0 belong&0xffffff00 0x85011400 microcode
>0 belong&0xffffff00 0x8501cb00 experimental microcode
>7 string >\0 for '%s'
#--------------------File Systems---------------------
# Minix filesystems - Juan Cespedes
# Disabled for now until better signatures can be created. Too many false positives.
#0x410 leshort 0x137f Minix filesystem
#>0x402 beshort !0 \b, %d zones
#>0x1e string minix \b, bootable
#0x410 leshort 0x138f Minix filesystem, 30 char names
#0x410 leshort 0x2468 Minix filesystem, version 2
#0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
#0x410 beshort 0x137f Minix filesystem (big endian)
#>0x402 beshort !0 \b, %d zones
#>0x1e string minix \b, bootable
#0x410 beshort 0x138f Minix filesystem (big endian), 30 char names
#0x410 beshort 0x2468 Minix filesystem (big endian), version 2
#0x410 beshort 0x2478 Minix filesystem (big endian), version 2, 30 char names
# YAFFS
0 belong 0x03000000
>4 belong 0x01000000
>>8 beshort 0xFFFF YAFFS filesystem
# EFS2 file system - jojo@utulsa.edu
8 string EFSSuper EFS2 Qualcomm filesystem super block,
>0 lelong 0x53000000 little endian,
>>4 leshort &1 NAND
>>4 leshort ^1 NOR
>>4 leshort x version 0x%x,
>>24 lelong x %d blocks,
>>16 lelong x 0x%x pages per block,
>>20 lelong x 0x%x bytes per page
8 string SSFErepu EFS2 Qualcomm filesystem super block,
>0 belong 0x53000000 big endian,
>>4 beshort &1 NAND
>>4 beshort ^1 NOR
>>4 beshort x version 0x%x,
>>24 belong x %d blocks,
>>16 belong x 0x%x pages per block,
>>20 belong x 0x%x bytes per page
# TROC file system
0 string TROC TROC filesystem,
>4 lelong x %d file entries
# PFS file system
0 string PFS/ PFS filesystem,
>4 string x version %s,
>14 leshort x %d files
# MPFS file system
0 string MPFS MPFS (Microchip) filesystem,
>4 byte x version %d.
>5 byte x \b%d,
>6 leshort x %d file entries
# cramfs filesystem - russell@coker.com.au
0 lelong 0x28cd3d45 CramFS filesystem, little endian
>4 lelong <0 invalid
>4 lelong x size %lu
>8 lelong &1 version #2
>8 lelong &2 sorted_dirs
>8 lelong &4 hole_support
>32 lelong x CRC 0x%x,
>36 lelong x edition %lu,
>40 lelong <0 invalid
>40 lelong x %lu blocks,
>44 lelong <0 invalid
>44 lelong x %lu files
0 belong 0x28cd3d45 CramFS filesystem, big endian
>4 belong <0 invalid
>4 belong x size %lu
>8 belong &1 version #2
>8 belong &2 sorted_dirs
>8 belong &4 hole_support
>32 belong x CRC 0x%x,
>36 belong x edition %lu,
>40 belong <0 invalid
>40 belong x %lu blocks,
>44 belong <0 invalid
>44 belong x %lu files
# JFFS2 file system
0 leshort 0x1984 JFFS2 filesystem (old) data little endian,
>4 lelong >1000000 invalid
>4 lelong <0 invalid
>4 lelong 0 invalid
>4 lelong x JFFS node length: %d
0 beshort 0x1984 JFFS2 filesystem (old) data big endian,
>4 belong >1000000 invalid
>4 belong <0 invalid
>4 belong 0 invalid
>4 belong x JFFS node length: %d
0 leshort 0x1985 JFFS2 filesystem data little endian,
>4 lelong >1000000 invalid
>4 lelong <0 invalid
>4 lelong 0 invalid
>4 lelong x JFFS node length: %d
0 beshort 0x1985 JFFS2 filesystem data big endian,
>4 belong >1000000 invalid
>4 belong <0 invalid
>4 belong 0 invalid
>4 belong x JFFS node length: %d
# Squashfs
0 string sqsh Squashfs filesystem, big endian,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort 3
>>63 bequad x size: %lld bytes,
>28 beshort >3
>>40 bequad x size: %lld bytes,
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
0 string hsqs Squashfs filesystem, little endian,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort >3 compression:
>>20 leshort 1 \bgzip,
>>20 leshort 2 \blzma,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort 3
>>63 lequad x size: %lld bytes,
>28 leshort >3
>>40 lequad x size: %lld bytes,
>4 lelong x %d inodes,
>28 leshort >3
>>12 lelong blocksize: %d bytes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort 2
>>51 lelong x blocksize: %d bytes,
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>28 leshort >3
>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
# Squashfs with LZMA compression
0 string sqlz Squashfs filesystem, big endian, lzma compression,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs 3.3 LZMA signature
0 string qshs Squashfs filesystem, big endian, lzma signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs for DD-WRT
0 string tqsh Squashfs filesystem, big endian, DD-WRT signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort >2
>>63 bequad x size: %lld bytes,
#>>67 belong x %d bytes,
>4 belong x %d inodes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort >1
>>51 belong x blocksize: %d bytes,
>39 bedate x created: %s
# Squashfs for DD-WRT
0 string hsqt Squashfs filesystem, little endian, DD-WRT signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort >2
>>63 lequad x size: %lld bytes,
#>>63 lelong x %d bytes,
>4 lelong x %d inodes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort >1
>>51 lelong x blocksize: %d bytes,
>39 ledate x created: %s
# Non-standard Squashfs signature found on some D-Link routers
0 string shsq Squashfs filesystem, little endian, non-standard signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort <3
>>8 lelong x size: %d bytes,
>28 leshort >2
>>63 lequad x size: %lld bytes,
#>>63 lelong x %d bytes,
>4 lelong x %d inodes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort >1
>>51 lelong x blocksize: %d bytes,
>39 ledate x created: %s
# Commented out for now - unlikely to be found in firmware
# CDROM Filesystems
# Modified for UDF by gerardo.cacciari@gmail.com
#32769 string CD001 #
#!:mime application/x-iso9660-image
#>38913 string !NSR0 ISO 9660 CD-ROM filesystem data
#>38913 string NSR0 UDF filesystem data
#>>38917 string 1 (version 1.0)
#>>38917 string 2 (version 1.5)
#>>38917 string 3 (version 2.0)
#>>38917 byte >0x33 (unknown version, ID 0x%X)
#>>38917 byte <0x31 (unknown version, ID 0x%X)
# "application id" which appears to be used as a volume label
#>32808 string >\0 '%s'
#>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
#37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
#!:mime application/x-iso9660-image
#32776 string CDROM High Sierra CD-ROM filesystem data
# reiserfs - russell@coker.com.au
0x10034 string ReIsErFs ReiserFS filesystem V3.5
0x10034 string ReIsEr2Fs ReiserFS filesystem V3.6
0x10034 string ReIsEr3Fs ReiserFS filesystem V3.6.19
>0x1002c leshort x block size %d
>0x10032 leshort &2 (mounted or unclean)
>0x10000 lelong x num blocks %d
>0x10040 lelong 1 tea hash
>0x10040 lelong 2 yura hash
>0x10040 lelong 3 r5 hash
# ext2/ext3 filesystems - Andreas Dilger
# ext4 filesystem - Eric Sandeen
# volume label and UUID Russell Coker
# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
0x438 leshort 0xEF53 Linux EXT filesystem
>0x44c lelong <0 invalid
>0x44c lelong >4 invalid
>0x44c lelong x rev %d
>0x43e leshort x \b.%d
# No journal? ext2
>0x45c lelong ^0x0000004 ext2 filesystem data
>>0x43a leshort ^0x0000001 (mounted or unclean)
# Has a journal? ext3 or ext4
>0x45c lelong &0x0000004
# and small INCOMPAT?
>>0x460 lelong <0x0000040
# and small RO_COMPAT?
>>>0x464 lelong <0x0000008 ext3 filesystem data
# else large RO_COMPAT?
>>>0x464 lelong >0x0000007 ext4 filesystem data
# else large INCOMPAT?
>>0x460 lelong >0x000003f ext4 filesystem data
>0x468 belong x \b, UUID=%08x
>0x46c beshort x \b-%04x
>0x46e beshort x \b-%04x
>0x470 beshort x \b-%04x
>0x472 belong x \b-%08x
>0x476 beshort x \b%04x
>0x478 string >0 \b, volume name "%s"
# General flags for any ext* fs
>0x460 lelong &0x0000004 (needs journal recovery)
>0x43a leshort &0x0000002 (errors, invalid)
# INCOMPAT flags
>0x460 lelong &0x0000001 (compressed)
#>0x460 lelong &0x0000002 (filetype)
#>0x460 lelong &0x0000010 (meta bg)
>0x460 lelong &0x0000040 (extents)
>0x460 lelong &0x0000080 (64bit)
#>0x460 lelong &0x0000100 (mmp)
#>0x460 lelong &0x0000200 (flex bg)
# RO_INCOMPAT flags
#>0x464 lelong &0x0000001 (sparse super)
>0x464 lelong &0x0000002 (large files)
>0x464 lelong &0x0000008 (huge files)
#>0x464 lelong &0x0000010 (gdt checksum)
#romfs filesystems - Juan Cespedes
0 string -rom1fs- romfs filesystem, version 1
>8 belong >10000000 invalid
>8 belong x size: %d bytes,
>16 string x named %s.
# JFFS - russell@coker.com.au
0 lelong 0x34383931 Linux Journalled Flash filesystem, little endian
0 belong 0x34383931 Linux Journalled Flash filesystem, big endian
# Wind River MemFS file system, found in some VxWorks devices
0 string owowowowowowowowowowowowowowow Wind River management filesystem,
>32 belong 0 uncompressed
>32 belong 1 compressed,
>36 belong x %d files
# FATX
0 string FATX FATX filesystem data
# updated by Joerg Jenderek at Sep 2007
# only for sector sizes with 512 or more Bytes
0x1FE leshort 0xAA55 start boot sector
# to do also for sectors < than 512 Bytes and some other files, GRR
#30 search/481 \x55\xAA start boot sector / filesystem
# not for BeOS floppy 1440k, MBRs
#(11.s-2) uleshort 0xAA55 start boot sector / filesystem
>2 string OSBS \b, OS/BS MBR
# J\xf6rg Jenderek
>0x8C string Invalid\ partition\ table \b, MS-DOS MBR
# dr-dos with some upper-, lowercase variants
>0x9D string Invalid\ partition\ table$
>>181 string No\ Operating\ System$
>>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
>0x9D string Invalid\ partition\ table$
>>181 string No\ operating\ system$
>>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
>342 string Invalid\ partition\ table$
>>366 string No\ operating\ system$
>>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
>295 string NEWLDR\0
>>302 string Bad\ PT\ $
>>>310 string No\ OS\ $
>>>>317 string OS\ load\ err$
>>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
>>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
>>>>>>>387 string Copyright\ (c)\ 1984,1998
>>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
>0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
>>0x1B8 ubelong >0 \b, Serial 0x%-.4x
>0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
>271 string Invalid\ partition\ table\0
>>295 string Error\ loading\ operating\ system\0
>>>326 string Missing\ operating\ system\0 \b, mbr
#
>139 string Invalid\ partition\ table\0
>>163 string Error\ loading\ operating\ system\0
>>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
# http://www.heise.de/ct/05/09/006/ page 184
#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
>>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
>300 string Invalid\ partition\ table\0
>>324 string Error\ loading\ operating\ system\0
>>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
#??>>>389 string Invalid\ system\ disk
>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
>300 string Ung\201ltige\ Partitionstabelle
#split string to avoid error: String too long
>>328 string Fehler\ beim\ Laden\
>>>346 string des\ Betriebssystems
>>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
>>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
#>0x145 string Default:\ F \b, FREE-DOS MBR
#>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR
>0x145 search/7 Default:\ F \b, FREE-DOS MBR
#>>313 string F0\ .\ .\ .
#>>>322 string disk\ 1
#>>>>382 string FAT3
>64 string no\ active\ partition\ found
>>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
# Ranish Partition Manager http://www.ranish.com/part/
>387 search/4 \0\ Error!\r
>>378 search/7 Virus!
>>>397 search/4 Booting\
>>>>408 search/4 HD1/\0 \b, Ranish MBR (
>>>>>416 string Writing\ changes... \b2.37
>>>>>>438 ubyte x \b,0x%x dots
>>>>>>440 ubyte >0 \b,virus check
>>>>>>441 ubyte >0 \b,partition %c
#2.38,2.42,2.44
>>>>>416 string !Writing\ changes... \b
>>>>>>418 ubyte 1 \bvirus check,
>>>>>>419 ubyte x \b0x%x seconds
>>>>>>420 ubyte&0x0F >0 \b,partition
>>>>>>>420 ubyte&0x0F <5 \b %x
>>>>>>>420 ubyte&0x0F 0Xf \b ask
>>>>>420 ubyte x \b)
#
>271 string Operating\ system\ loading
>>296 string error\r \b, SYSLINUX MBR (2.10)
# http://www.acronis.de/
>362 string MBR\ Error\ \0\r
>>376 string ress\ any\ key\ to\
>>>392 string boot\ from\ floppy...\0 \b, Acronis MBR
# added by Joerg Jenderek
# http://www.visopsys.org/
# http://partitionlogic.org.uk/
>309 string No\ bootable\ partition\ found\r
>>339 string I/O\ Error\ reading\ boot\ sector\r \b, Visopsys MBR
>349 string No\ bootable\ partition\ found\r
>>379 string I/O\ Error\ reading\ boot\ sector\r \b, simple Visopsys MBR
# bootloader, bootmanager
>0x40 string SBML
# label with 11 characters of FAT 12 bit filesystem
>>43 string SMART\ BTMGR
>>>430 string SBMK\ Bad!\r \b, Smart Boot Manager
# OEM-ID not always "SBM"
#>>>>3 strings SBM
>>>>6 string >\0 \b, version %s
>382 string XOSLLOADXCF \b, eXtended Operating System Loader
>6 string LILO \b, LInux i386 boot LOader
>>120 string LILO \b, version 22.3.4 SuSe
>>172 string LILO \b, version 22.5.8 Debian
# updated by Joerg Jenderek at Oct 2008
# variables according to grub-0.97/stage1/stage1.S or
# http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
# usual values are marked with comments to get only informations of strange GRUB loaders
>342 search/60 \0Geom\0
#>0 ulelong x %x=0x009048EB , 0x2a9048EB 0
>>0x41 ubyte <2
>>>0x3E ubyte >2 \b; GRand Unified Bootloader
# 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90
>>>>0x3E ubyte x \b, stage1 version 0x%x
#If it is 0xFF, use a drive passed by BIOS
>>>>0x40 ubyte <0xFF \b, boot drive 0x%x
# in most case 0,1,0x2e for GRUB 0.5.95
>>>>0x41 ubyte >0 \b, LBA flag 0x%x
>>>>0x42 uleshort <0x8000 \b, stage2 address 0x%x
#>>>>0x42 uleshort =0x8000 \b, stage2 address 0x%x (usual)
>>>>0x42 uleshort >0x8000 \b, stage2 address 0x%x
#>>>>0x44 ulelong =1 \b, 1st sector stage2 0x%x (default)
>>>>0x44 ulelong >1 \b, 1st sector stage2 0x%x
>>>>0x48 uleshort <0x800 \b, stage2 segment 0x%x
#>>>>0x48 uleshort =0x800 \b, stage2 segment 0x%x (usual)
>>>>0x48 uleshort >0x800 \b, stage2 segment 0x%x
>>>>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>394 string stage1 \b, GRUB version 0.5.95
>>>>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>376 string GRUB\ \0 \b, GRUB version 0.93 or 1.94
>>>>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>377 string GRUB\ \0 \b, GRUB version 0.94
>>>>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96
>>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>>385 string GRUB\ \0 \b, GRUB version 0.97
#unkown version
>>>343 string Geom\0Read\0\ Error\0
>>>>321 string Loading\ stage1.5 \b, GRUB version x.y
>>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
>>>>374 string GRUB\ \0 \b, GRUB version n.m
# http://syslinux.zytor.com/
>478 string Boot\ failed\r
>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (1.62)
>480 string Boot\ failed\r
>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06 or 2.11)
>484 string Boot\ error\r \b, SYSLINUX bootloader (3.11)
>395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
# http://www.bcdwb.de/bcdw/index_e.htm
>3 string BCDL
>>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z)
# mbr partion table entries
# OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs
>3 string !MS
>>3 string !SYSLINUX
>>>3 string !MTOOL
>>>>3 string !NEWLDR
>>>>>5 string !DOS
# not FAT (32 bit)
>>>>>>82 string !FAT32
#not Linux kernel
>>>>>>>514 string !HdrS
#not BeOS
>>>>>>>>422 string !Be\ Boot\ Loader
# active flag 0 or 0x80 and type > 0
>>>>>>>>>446 ubyte <0x81
>>>>>>>>>>446 ubyte&0x7F 0
>>>>>>>>>>>450 ubyte >0 \b; partition 1: ID=0x%x
>>>>>>>>>>>>446 ubyte 0x80 \b, active
>>>>>>>>>>>>447 ubyte x \b, starthead %u
#>>>>>>>>>>>>448 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>448 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>454 ulelong x \b, startsector %u
>>>>>>>>>>>>458 ulelong x \b, %u sectors
#
>>>>>>>>>462 ubyte <0x81
>>>>>>>>>>462 ubyte&0x7F 0
>>>>>>>>>>>466 ubyte >0 \b; partition 2: ID=0x%x
>>>>>>>>>>>>462 ubyte 0x80 \b, active
>>>>>>>>>>>>463 ubyte x \b, starthead %u
#>>>>>>>>>>>>464 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>464 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>470 ulelong x \b, startsector %u
>>>>>>>>>>>>474 ulelong x \b, %u sectors
#
>>>>>>>>>478 ubyte <0x81
>>>>>>>>>>478 ubyte&0x7F 0
>>>>>>>>>>>482 ubyte >0 \b; partition 3: ID=0x%x
>>>>>>>>>>>>478 ubyte 0x80 \b, active
>>>>>>>>>>>>479 ubyte x \b, starthead %u
#>>>>>>>>>>>>480 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>481 ubyte x \b, start C2S: 0x%x
#>>>>>>>>>>>>480 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>486 ulelong x \b, startsector %u
>>>>>>>>>>>>490 ulelong x \b, %u sectors
#
>>>>>>>>>494 ubyte <0x81
>>>>>>>>>>494 ubyte&0x7F 0
>>>>>>>>>>>498 ubyte >0 \b; partition 4: ID=0x%x
>>>>>>>>>>>>494 ubyte 0x80 \b, active
>>>>>>>>>>>>495 ubyte x \b, starthead %u
#>>>>>>>>>>>>496 ubyte x \b, start C_S: 0x%x
#>>>>>>>>>>>>496 ubeshort&1023 x \b, startcylinder? %d
>>>>>>>>>>>>502 ulelong x \b, startsector %u
>>>>>>>>>>>>506 ulelong x \b, %u sectors
# mbr partion table entries end
# http://www.acronis.de/
#FAT label=ACRONIS\ SZ
#OEM-ID=BOOTWIZ0
>442 string Non-system\ disk,\
>>459 string press\ any\ key...\x7\0 \b, Acronis Startup Recovery Loader
# DOS names like F11.SYS are 8 right space padded bytes+3 bytes
>>>477 ubyte&0xDF >0
>>>>477 string x \b %-.3s
>>>>>480 ubyte&0xDF >0
>>>>>>480 string x \b%-.5s
>>>>485 ubyte&0xDF >0
>>>>>485 string x \b.%-.3s
#
>185 string FDBOOT\ Version\
>>204 string \rNo\ Systemdisk.\
>>>220 string Booting\ from\ harddisk.\n\r
>>>245 string Cannot\ load\ from\ harddisk.\n\r
>>>>273 string Insert\ Systemdisk\
>>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
>>>>>>200 string >\0 \b, version %-3s
>242 string Bootsector\ from\ C.H.\ Hochst\204
>>278 string No\ Systemdisk.\
>>>293 string Booting\ from\ harddisk.\n\r
>>>441 string Cannot\ load\ from\ harddisk.\n\r
>>>>469 string Insert\ Systemdisk\
>>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
>>>>>>209 string >\0 \b, version %-4.4s
>(1.b+2) ubyte 0xe
>>(1.b+3) ubyte 0x1f
>>>(1.b+4) ubyte 0xbe
>>>>(1.b+5) ubyte 0x77
>>>>(1.b+6) ubyte 0x7c
>>>>>(1.b+7) ubyte 0xac
>>>>>>(1.b+8) ubyte 0x22
>>>>>>>(1.b+9) ubyte 0xc0
>>>>>>>>(1.b+10) ubyte 0x74
>>>>>>>>>(1.b+11) ubyte 0xb
>>>>>>>>>>(1.b+12) ubyte 0x56
>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
>214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display
#>>244 string from\ dosemu-freedos-*-bin.tgz\r
#>>>170 string Sorry,\ could\ not\ load\ an\
#>>>>195 string operating\ system.\r\n
#
>103 string This\ is\ not\ a\ bootable\ disk.\
>>132 string Please\ insert\ a\ bootable\
>>>157 string floppy\ and\r\n
>>>>169 string press\ any\ key\ to\ try\ again...\r \b, FREE-DOS message display
#
>66 string Solaris\ Boot\ Sector
>>99 string Incomplete\ MDBoot\ load.
>>>89 string Version \b, Sun Solaris Bootloader
>>>>97 byte x version %c
#
>408 string OS/2\ !!\ SYS01475\r\0
>>429 string OS/2\ !!\ SYS02025\r\0
>>>450 string OS/2\ !!\ SYS02027\r\0
>>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
#
>409 string OS/2\ !!\ SYS01475\r\0
>>430 string OS/2\ !!\ SYS02025\r\0
>>>451 string OS/2\ !!\ SYS02027\r\0
>>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
>112 string This\ disk\ is\ not\ bootable\r
>>142 string If\ you\ wish\ to\ make\ it\ bootable
>>>176 string run\ the\ DOS\ program\ SYS\
>>>200 string after\ the\r
>>>>216 string system\ has\ been\ loaded\r\n
>>>>>242 string Please\ insert\ a\ DOS\ diskette\
>>>>>271 string into\r\n\ the\ drive\ and\
>>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
# XP
>430 string NTLDR\ is\ missing\xFF\r\n
>>449 string Disk\ error\xFF\r\n
>>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
#
>430 string NTLDR\ nicht\ gefunden\xFF\r\n
>>453 string Datentr\204gerfehler\xFF\r\n
>>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
# offset variant
>>>>379 string \0
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
#
>430 string NTLDR\ fehlt\xFF\r\n
>>444 string Datentr\204gerfehler\xFF\r\n
>>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
# variant
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
#
>430 string NTLDR\ fehlt\xFF\r\n
>>444 string Medienfehler\xFF\r\n
>>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
>>>>371 ubyte >0x20
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
# variant
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
>430 string Datentr\204ger\ entfernen\xFF\r\n
>>454 string Medienfehler\xFF\r\n
>>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
>>>>379 string \0
>>>>>368 ubyte&0xDF >0
>>>>>>368 string x %-.5s
>>>>>>>373 ubyte&0xDF >0
>>>>>>>>373 string x \b%-.3s
>>>>>>376 ubyte&0xDF >0
>>>>>>>376 string x \b.%-.3s
# variant
>>>>417 ubyte&0xDF >0
>>>>>417 string x %-.5s
>>>>>>422 ubyte&0xDF >0
>>>>>>>422 string x \b%-.3s
>>>>>425 ubyte&0xDF >0
>>>>>>425 string >\ \b.%-.3s
#
#>3 string NTFS\ \ \ \
>389 string Fehler\ beim\ Lesen\
>>407 string des\ Datentr\204gers
>>>426 string NTLDR\ fehlt
>>>>440 string NTLDR\ ist\ komprimiert
>>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
#>3 string NTFS\ \ \ \
>313 string A\ disk\ read\ error\ occurred.\r
>>345 string A\ kernel\ file\ is\ missing\
>>>370 string from\ the\ disk.\r
>>>>484 string NTLDR\ is\ compressed
>>>>>429 string Insert\ a\ system\ diskette\
>>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
# DOS loader variants different languages,offsets
>472 ubyte&0xDF >0
>>389 string Invalid\ system\ disk\xFF\r\n
>>>411 string Disk\ I/O\ error
>>>>428 string Replace\ the\ disk,\ and\
>>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
#IO.SYS
>>>>>>472 ubyte&0xDF >0
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.5s
>>>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>>>479 string x \b%-.1s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>390 string Invalid\ system\ disk\xFF\r\n
>>>412 string Disk\ I/O\ error\xFF\r\n
>>>>429 string Replace\ the\ disk,\ and\
>>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
>>388 string Ungueltiges\ System\ \xFF\r\n
>>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>427 string Datentraeger\ wechseln\ und\
>>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
#WINBOOT.SYS only not spaces (0xDF)
>>>>>>497 ubyte&0xDF >0
>>>>>>>497 string x %-.5s
>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>505 ubyte&0xDF >0
>>>>>>>505 string x \b.%-.3s
#IO.SYS
>>>>>>472 ubyte&0xDF >0 or
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.5s
>>>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>>>479 string x \b%-.1s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>390 string Ungueltiges\ System\ \xFF\r\n
>>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>429 string Datentraeger\ wechseln\ und\
>>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
#WINBOOT.SYS only not spaces (0xDF)
>>>>>>497 ubyte&0xDF >0
>>>>>>>497 string x %-.7s
>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>504 string x \b%-.1s
>>>>>>505 ubyte&0xDF >0
>>>>>>>505 string x \b.%-.3s
#IO.SYS
>>>>>>472 ubyte&0xDF >0 or
>>>>>>>472 string x \b %-.2s
>>>>>>>>474 ubyte&0xDF >0
>>>>>>>>>474 string x \b%-.6s
>>>>>>>480 ubyte&0xDF >0
>>>>>>>>480 string x \b.%-.3s
#MSDOS.SYS
>>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>>483 string x \b%-.5s
>>>>>>>>>488 ubyte&0xDF >0
>>>>>>>>>>488 string x \b%-.3s
>>>>>>>>491 ubyte&0xDF >0
>>>>>>>>>491 string x \b.%-.3s
#
>>389 string Ungueltiges\ System\ \xFF\r\n
>>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
>>>>428 string Datentraeger\ wechseln\ und\
>>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
>>>>>>472 string x %-.2s
>>>>>>>474 ubyte&0xDF >0
>>>>>>>>474 string x \b%-.5s
>>>>>>>>479 ubyte&0xDF >0
>>>>>>>>>479 string x \b%-.1s
>>>>>>480 ubyte&0xDF >0
>>>>>>>480 string x \b.%-.3s
>>>>>>483 ubyte&0xDF >0 \b+
>>>>>>>483 string x \b%-.5s
>>>>>>>488 ubyte&0xDF >0
>>>>>>>>488 string x \b%-.2s
>>>>>>>>490 ubyte&0xDF >0
>>>>>>>>>490 string x \b%-.1s
>>>>>>>491 ubyte&0xDF >0
>>>>>>>>491 string x \b.%-.3s
>479 ubyte&0xDF >0
>>416 string Kein\ System\ oder\
>>>433 string Laufwerksfehler
>>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
#IO.SYS
>>>>>479 string x \b %-.2s
>>>>>>481 ubyte&0xDF >0
>>>>>>>481 string x \b%-.6s
>>>>>487 ubyte&0xDF >0
>>>>>>487 string x \b.%-.3s
#MSDOS.SYS
>>>>>>490 ubyte&0xDF >0 \b+
>>>>>>>490 string x \b%-.5s
>>>>>>>>495 ubyte&0xDF >0
>>>>>>>>>495 string x \b%-.3s
>>>>>>>498 ubyte&0xDF >0
>>>>>>>>498 string x \b.%-.3s
#
>376 search/41 Non-System\ disk\ or\
>>395 search/41 disk\ error\r
>>>407 search/41 Replace\ and\
>>>>419 search/41 press\ \b,
>>>>419 search/41 strike\ \b, old
>>>>426 search/41 any\ key\ when\ ready\r MS or PC-DOS bootloader
#449 Disk\ Boot\ failure\r MS 3.21
#466 Boot\ Failure\r MS 3.30
>>>>>468 search/18 \0
#IO.SYS,IBMBIO.COM
>>>>>>&0 string x \b %-.2s
>>>>>>>&-20 ubyte&0xDF >0
>>>>>>>>&-1 string x \b%-.4s
>>>>>>>>>&-16 ubyte&0xDF >0
>>>>>>>>>>&-1 string x \b%-.2s
>>>>>>&8 ubyte&0xDF >0 \b.
>>>>>>>&-1 string x \b%-.3s
#MSDOS.SYS,IBMDOS.COM
>>>>>>&11 ubyte&0xDF >0 \b+
>>>>>>>&-1 string x \b%-.5s
>>>>>>>>&-6 ubyte&0xDF >0
>>>>>>>>>&-1 string x \b%-.1s
>>>>>>>>>>&-5 ubyte&0xDF >0
>>>>>>>>>>>&-1 string x \b%-.2s
>>>>>>>&7 ubyte&0xDF >0 \b.
>>>>>>>>&-1 string x \b%-.3s
>441 string Cannot\ load\ from\ harddisk.\n\r
>>469 string Insert\ Systemdisk\
>>>487 string and\ press\ any\ key.\n\r \b, MS (2.11) DOS bootloader
#>43 string \224R-LOADER\ \ SYS =label
>54 string SYS
>>324 string VASKK
>>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
#
>98 string Press\ a\ key\ to\ retry\0\r
>>120 string Cannot\ find\ file\ \0\r
>>>139 string Disk\ read\ error\0\r
>>>>156 string Loading\ ...\0 \b, DR-DOS (3.41) Bootloader
#DRBIOS.SYS
>>>>>44 ubyte&0xDF >0
>>>>>>44 string x \b %-.6s
>>>>>>>50 ubyte&0xDF >0
>>>>>>>>50 string x \b%-.2s
>>>>>>52 ubyte&0xDF >0
>>>>>>>52 string x \b.%-.3s
#
>70 string IBMBIO\ \ COM
>>472 string Cannot\ load\ DOS!\
>>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
>>471 string Cannot\ load\ DOS\
>>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
#??
>444 string KERNEL\ \ SYS
>>314 string BOOT\ error! \b, FREE-DOS Bootloader
>499 string KERNEL\ \ SYS
>>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
>449 string KERNEL\ \ SYS
>>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
#
>449 string Loading\ FreeDOS
>>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
#
>331 string Error!.0 \b, FREE-DOS 1.0 bootloader
#
>125 string Loading\ FreeDOS...\r
>>311 string BOOT\ error!\r \b, FREE-DOS bootloader
>>>441 ubyte&0xDF >0
>>>>441 string x \b %-.6s
>>>>>447 ubyte&0xDF >0
>>>>>>447 string x \b%-.1s
>>>>>>>448 ubyte&0xDF >0
>>>>>>>>448 string x \b%-.1s
>>>>449 ubyte&0xDF >0
>>>>>449 string x \b.%-.3s
>124 string FreeDOS\0
>>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
>336 string Error!\
>>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
>>>497 ubyte&0xDF >0
>>>>497 string x \b %-.6s
>>>>>503 ubyte&0xDF >0
>>>>>>503 string x \b%-.1s
>>>>>>>504 ubyte&0xDF >0
>>>>>>>>504 string x \b%-.1s
>>>>505 ubyte&0xDF >0
>>>>>505 string x \b.%-.3s
# added by Joerg Jenderek
# http://www.visopsys.org/
# http://partitionlogic.org.uk/
# OEM-ID=Visopsys
>478 ulelong 0
>>(1.b+326) string I/O\ Error\ reading\
>>>(1.b+344) string Visopsys\ loader\r
>>>>(1.b+361) string Press\ any\ key\ to\ continue.\r \b, Visopsys loader
# http://alexfru.chat.ru/epm.html#bootprog
>494 ubyte >0x4D
>>495 string >E
>>>495 string >>>3 string BootProg
# It just looks for a program file name at the root directory
# and loads corresponding file with following execution.
# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
>>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
>>>>>499 string x \b %-.1s
>>>>>>500 ubyte&0xDF >0
>>>>>>>500 string x \b%-.1s
>>>>>>>>501 ubyte&0xDF >0
>>>>>>>>>501 string x \b%-.1s
>>>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>>>>>>>>>>>505 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>505 string x \b%-.1s
>>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
#name extension
>>>>>507 ubyte&0xDF >0 \b.
>>>>>>507 string x \b%-.1s
>>>>>>>508 ubyte&0xDF >0
>>>>>>>>508 string x \b%-.1s
>>>>>>>>>509 ubyte&0xDF >0
>>>>>>>>>>509 string x \b%-.1s
#If the boot sector fails to read any other sector,
#it prints a very short message ("RE") to the screen and hangs the computer.
#If the boot sector fails to find needed program in the root directory,
#it also hangs with another message ("NF").
>>>>>492 string RENF \b, FAT (12 bit)
>>>>>495 string RENF \b, FAT (16 bit)
# http://alexfru.chat.ru/epm.html#bootprog
>494 ubyte >0x4D
>>495 string >E
>>>495 string >>>3 string BootProg
# It just looks for a program file name at the root directory
# and loads corresponding file with following execution.
# DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
>>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
>>>>>499 string x \b %-.1s
>>>>>>500 ubyte&0xDF >0
>>>>>>>500 string x \b%-.1s
>>>>>>>>501 ubyte&0xDF >0
>>>>>>>>>501 string x \b%-.1s
>>>>>>>>>>502 ubyte&0xDF >0
>>>>>>>>>>>502 string x \b%-.1s
>>>>>>>>>>>>503 ubyte&0xDF >0
>>>>>>>>>>>>>503 string x \b%-.1s
>>>>>>>>>>>>>>504 ubyte&0xDF >0
>>>>>>>>>>>>>>>504 string x \b%-.1s
>>>>>>>>>>>>>>>>505 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>505 string x \b%-.1s
>>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
>>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
#name extension
>>>>>507 ubyte&0xDF >0 \b.
>>>>>>507 string x \b%-.1s
>>>>>>>508 ubyte&0xDF >0
>>>>>>>>508 string x \b%-.1s
>>>>>>>>>509 ubyte&0xDF >0
>>>>>>>>>>509 string x \b%-.1s
#If the boot sector fails to read any other sector,
#it prints a very short message ("RE") to the screen and hangs the computer.
#If the boot sector fails to find needed program in the root directory,
#it also hangs with another message ("NF").
>>>>>492 string RENF \b, FAT (12 bit)
>>>>>495 string RENF \b, FAT (16 bit)
# x86 bootloader end
# updated by Joerg Jenderek at Sep 2007
>3 ubyte 0
#no active flag
>>446 ubyte 0
# partition 1 not empty
>>>450 ubyte >0
# partitions 3,4 empty
>>>>482 ubyte 0
>>>>>498 ubyte 0
# partition 2 ID=0,5,15
>>>>>>466 ubyte <0x10
>>>>>>>466 ubyte 0x05 \b, extended partition table
>>>>>>>466 ubyte 0x0F \b, extended partition table (LBA)
>>>>>>>466 ubyte 0x0 \b, extended partition table (last)
# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
# http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD
# older drives may use Near JuMP instruction E9 xx xx
>0 lelong&0x009000EB 0x009000EB
>0 lelong&0x000000E9 0x000000E9
# minimal short forward jump found 03cx??
# maximal short forward jump is 07fx
>1 ubyte <0xff \b, code offset 0x%x
# mtools-3.9.8/msdos.h
# usual values are marked with comments to get only informations of strange FAT systems
# valid sectorsize must be a power of 2 from 32 to 32768
>>11 uleshort&0x000f x
>>>11 uleshort <32769
>>>>11 uleshort >31
>>>>>21 ubyte&0xf0 0xF0
>>>>>>3 string >\0 \b, OEM-ID "%8.8s"
#http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
>>>>>>>8 string IHC \b cached by Windows 9M
>>>>>>11 uleshort >512 \b, Bytes/sector %u
#>>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
>>>>>>11 uleshort <512 \b, Bytes/sector %u
>>>>>>13 ubyte >1 \b, sectors/cluster %u
#>>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
>>>>>>14 uleshort >32 \b, reserved sectors %u
#>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
#>>>>>>14 uleshort >1 \b, reserved sectors %u
#>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
>>>>>>14 uleshort <1 \b, reserved sectors %u
>>>>>>16 ubyte >2 \b, FATs %u
#>>>>>>16 ubyte =2 \b, FATs %u (usual)
>>>>>>16 ubyte =1 \b, FAT %u
>>>>>>16 ubyte >0
>>>>>>17 uleshort >0 \b, root entries %u
#>>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
>>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
#>>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
>>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
#>>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
>>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
>>>>>>22 uleshort >0 \b, sectors/FAT %u
#>>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
>>>>>>26 ubyte >2 \b, heads %u
#>>>>>>26 ubyte =2 \b, heads %u (usual floppy)
>>>>>>26 ubyte =1 \b, heads %u
#skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
>>>>>>38 ubyte !0x70
>>>>>>>28 ulelong >0 \b, hidden sectors %u
#>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
>>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
#>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
# FAT<32 specific
>>>>>>82 string !FAT32
#>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
#>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy)
>>>>>>>36 ubyte !0x80
>>>>>>>>36 ubyte !0 \b, physical drive 0x%x
>>>>>>>37 ubyte >0 \b, reserved 0x%x
#>>>>>>>37 ubyte =0 \b, reserved 0x%x
>>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>38 ubyte =0x29
>>>>>>>>39 ulelong x \b, serial number 0x%x
>>>>>>>>43 string >>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
>>>>>>>>43 string =NO\ NAME \b, unlabeled
>>>>>>>54 string FAT \b, FAT
>>>>>>>>54 string FAT12 \b (12 bit)
>>>>>>>>54 string FAT16 \b (16 bit)
# FAT32 specific
>>>>>>82 string FAT32 \b, FAT (32 bit)
>>>>>>>36 ulelong x \b, sectors/FAT %u
>>>>>>>40 uleshort >0 \b, extension flags %u
#>>>>>>>40 uleshort =0 \b, extension flags %u
>>>>>>>42 uleshort >0 \b, fsVersion %u
#>>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
>>>>>>>44 ulelong >2 \b, rootdir cluster %u
#>>>>>>>44 ulelong =2 \b, rootdir cluster %u
#>>>>>>>44 ulelong =1 \b, rootdir cluster %u
>>>>>>>48 uleshort >1 \b, infoSector %u
#>>>>>>>48 uleshort =1 \b, infoSector %u (usual)
>>>>>>>48 uleshort <1 \b, infoSector %u
>>>>>>>50 uleshort >6 \b, Backup boot sector %u
#>>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
>>>>>>>50 uleshort <6 \b, Backup boot sector %u
>>>>>>>54 ulelong >0 \b, reserved1 0x%x
>>>>>>>58 ulelong >0 \b, reserved2 0x%x
>>>>>>>62 ulelong >0 \b, reserved3 0x%x
# same structure as FAT1X
>>>>>>>64 ubyte >0x80 \b, physical drive 0x%x
#>>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
>>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
#>>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
>>>>>>>65 ubyte >0 \b, reserved 0x%x
>>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
>>>>>>>66 ubyte =0x29
>>>>>>>>67 ulelong x \b, serial number 0x%x
>>>>>>>>71 string >>>>>>71 string >NO\ NAME \b, label: "%11.11s"
>>>>>>>71 string =NO\ NAME \b, unlabeled
### FATs end
>0x200 lelong 0x82564557 \b, BSD disklabel
#--------------------------Firmware Formats---------------------------
# uImage file
# From: Craig Heffner, U-Boot image.h header definitions file
0 belong 0x27051956 uImage header, header size: 64 bytes,
>4 belong x header CRC: 0x%X,
>8 bedate x created: %s,
>12 belong x image size: %d bytes,
>16 belong x Data Address: 0x%X,
>20 belong x Entry Point: 0x%X,
>24 belong x data CRC: 0x%X,
#>28 byte x OS type: %d,
>28 byte 0 OS: Invalid OS,
>28 byte 1 OS: OpenBSD,
>28 byte 2 OS: NetBSD,
>28 byte 3 OS: FreeBSD,
>28 byte 4 OS: 4.4BSD,
>28 byte 5 OS: Linux,
>28 byte 6 OS: SVR4,
>28 byte 7 OS: Esix,
>28 byte 8 OS: Solaris,
>28 byte 9 OS: Irix,
>28 byte 10 OS: SCO,
>28 byte 11 OS: Dell,
>28 byte 12 OS: NCR,
>28 byte 13 OS: LynxOS,
>28 byte 14 OS: VxWorks,
>28 byte 15 OS: pSOS,
>28 byte 16 OS: QNX,
>28 byte 17 OS: Firmware,
>28 byte 18 OS: RTEMS,
>28 byte 19 OS: ARTOS,
>28 byte 20 OS: Unity OS,
#>29 byte x CPU arch: %d,
>29 byte 0 CPU: Invalid OS,
>29 byte 1 CPU: Alpha,
>29 byte 2 CPU: ARM,
>29 byte 3 CPU: Intel x86,
>29 byte 4 CPU: IA64,
>29 byte 5 CPU: MIPS,
>29 byte 6 CPU: MIPS 64 bit,
>29 byte 7 CPU: PowerPC,
>29 byte 8 CPU: IBM S390,
>29 byte 9 CPU: SuperH,
>29 byte 10 CPU: Sparc,
>29 byte 11 CPU: Sparc 64 bit,
>29 byte 12 CPU: M68K,
>29 byte 13 CPU: Nios-32,
>29 byte 14 CPU: MicroBlaze,
>29 byte 15 CPU: Nios-II,
>29 byte 16 CPU: Blackfin,
>29 byte 17 CPU: AVR,
>29 byte 18 CPU: STMicroelectronics ST200,
#>30 byte x image type: %d,
>30 byte 0 image type: Invalid Image,
>30 byte 1 image type: Standalone Program,
>30 byte 2 image type: OS Kernel Image,
>30 byte 3 image type: RAMDisk Image,
>30 byte 4 image type: Multi-File Image,
>30 byte 5 image type: Firmware Image,
>30 byte 6 image type: Script file,
>30 byte 7 image type: Filesystem Image,
>30 byte 8 image type: Binary Flat Device Tree Blob
#>31 byte x compression type: %d,
>31 byte 0 compression type: none,
>31 byte 1 compression type: gzip,
>31 byte 2 compression type: bzip2,
>31 byte 3 compression type: lzma,
>32 string x image name: %s
#IMG0 header, found in VxWorks-based Mercury router firmware
0 string IMG0 IMG0 (VxWorks) header,
>4 belong x size: %d
#Mediatek bootloader signature
#From xp-dev.com
0 string BOOTLOADER! Mediatek bootloader
#CSYS header formats
0 string CSYS\x00 CSYS header, little endian,
>8 lelong x size: %d
0 string CSYS\x80 CSYS header, big endian,
>8 belong x size: %d
# wrgg firmware image
0 string wrgg02 WRGG firmware header,
>6 string x name: %s,
>48 string x root device: %s
# trx image file
0 string HDR0 TRX firmware header, little endian, header size: 28 bytes,
>4 lelong x image size: %d bytes,
>8 lelong x CRC32: 0x%X
>12 lelong x flags/version: 0x%X
0 string 0RDH TRX firmware header, big endian, header size: 28 bytes,
>4 belong x image size: %d bytes,
>8 belong x CRC32: 0x%X
>12 belong x flags/version: 0x%X
# Ubicom firmware image
0 belong 0xFA320080 Ubicom firmware header,
>12 belong x checksum: 0x%X,
>24 belong x image size: %d
# The ROME bootloader is used by several RealTek-based products.
# Unfortunately, the magic bytes are specific to each product, so
# separate signatures must be created for each one.
# Netgear KWGR614 ROME image
0 string G614 Realtek firmware header (ROME bootloader),
>4 beshort 0xd92f image type: KFS,
>4 beshort 0xb162 image type: RDIR,
>4 beshort 0xea43 image type: BOOT,
>4 beshort 0x8dc9 image type: RUN,
>4 beshort 0x2a05 image type: CCFG,
>4 beshort 0x6ce8 image type: DCFG,
>4 beshort 0xc371 image type: LOG,
>6 byte x header version: %d,
#month
>10 byte x created: %d/
#day
>12 byte x \b%d/
#year
>8 beshort x \b%d,
>16 belong x image size: %d bytes,
>22 byte x body checksum: 0x%X,
>23 byte x header checksum: 0x%X
# Linksys WRT54GX ROME image
0 belong 0x59a0e842 Realtek firmware header (ROME bootloader)
>4 beshort 0xd92f image type: KFS,
>4 beshort 0xb162 image type: RDIR,
>4 beshort 0xea43 image type: BOOT,
>4 beshort 0x8dc9 image type: RUN,
>4 beshort 0x2a05 image type: CCFG,
>4 beshort 0x6ce8 image type: DCFG,
>4 beshort 0xc371 image type: LOG,
>6 byte x header version: %d,
#month
>10 byte x created: %d/
#day
>12 byte x \b%d/
#year
>8 beshort x \b%d,
>16 belong x image size: %d bytes,
>22 byte x body checksum: 0x%X,
>23 byte x header checksum: 0x%X
# PackImg tag, somtimes used as a delimiter between the kernel and rootfs in firmware images.
0 string --PaCkImGs-- PackImg Tag,
>16 lelong x little endian size: %d bytes;
>16 belong x big endian size: %d bytes
#------------------------------------------------------------------------------
# Broadcom header format
#
0 string BCRM Broadcom header,
>4 lelong x number of sections: %d,
>>8 lelong 18 first section type: flash
>>8 lelong 19 first section type: disk
>>8 lelong 21 first section type: tag
# Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files
# http://ftg.lbl.gov/checkpoint
0 string Ck0\0\0R\0\0\0 BLCR
>16 lelong 1 x86
>16 lelong 3 alpha
>16 lelong 5 x86-64
>16 lelong 7 ARM
>8 lelong x context data (little endian, version %d)
0 string \0\0\0C\0\0\0R BLCR
>16 belong 2 SPARC
>16 belong 4 ppc
>16 belong 6 ppc64
>16 belong 7 ARMEB
>16 belong 8 SPARC64
>8 belong x context data (big endian, version %d)
# Aculab VoIP firmware
# From: Mark Brown
0 string VoIP\ Startup\ and Aculab VoIP firmware
>35 string x format %s
#------------------------------------------------------------------------------
# HP LaserJet 1000 series downloadable firmware file
0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
# From Albert Cahalan
# really le32 operation,destination,payloadsize (but quite predictable)
# 01 00 00 00 00 00 00 c0 00 02 00 00
0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware
#---------------------------------------------------------------------------
# The following entries have been tested by Duncan Laurie (a
# lead Sun/Cobalt developer) who agrees that they are good and worthy of
# inclusion.
# Boot ROM images for Sun/Cobalt Linux server appliances
0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom
>38 string x V%.4s
# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
# at the very end where file(1) can't get it.
0 string CRfs COBALT boot rom data (Flat boot rom or file system)
#
# Motorola S-Records, from Gerd Truschinski
0 string S0 Motorola S-Record; binary data in text format
# --------------------------------
# Microsoft Xbox data file formats
0 string XIP0 XIP, Microsoft Xbox data
0 string XTF0 XTF, Microsoft Xbox data
#Windows CE
64 string CECE Windows CE RTOS
# --------------------------------
# ZynOS ROM header format
# From openwrt zynos.h.
6 string SIG ZynOS header, header size: 48 bytes,
>0 belong x load address 0x%X,
>9 byte <0x7F rom image type:
>>9 byte <1 invalid,
>>9 byte >7 invalid,
>>9 byte 1 ROMIMG,
>>9 byte 2 ROMBOOT,
>>9 byte 3 BOOTEXT,
>>9 byte 4 ROMBIN,
>>9 byte 5 ROMDIR,
>>9 byte 6 6,
>>9 byte 7 ROMMAP,
>9 byte >0x7F ram image type:
>>9 byte >0x82 invalid,
>>9 byte 0x80 RAM,
>>9 byte 0x81 RAMCODE,
>>9 byte 0x82 RAMBOOT,
>10 belong >0x40000000 invalid
>10 belong <0 invalid
>10 belong 0 invalid
>10 belong x uncompressed size: %d,
>14 belong >0x40000000 invalid
>14 belong <0 invalid
>14 belong 0 invalid
>14 belong x compressed size: %d,
>20 beshort x uncompressed checksum: 0x%X,
>22 beshort x compressed checksum: 0x%X,
>18 byte x flags: 0x%X,
>18 byte &0x40 uncompressed checksum is valid,
>18 byte &0x80 the binary is compressed,
>>18 byte &0x20 compressed checksum is valid,
>41 belong x memory map table address: 0x%X
# Firmware header used by some VxWorks-based Cisco products
0 string CI032.00 Cisco VxWorks firmware header,
>8 lelong >1024 invalid
>8 lelong <0 invalid
>8 lelong x header size: %d bytes,
>32 lelong >1024 invalid
>32 lelong <0 invalid
>32 lelong x number of files: %d,
>48 lelong <0 invalid
>48 lelong x image size: %d,
>64 string x firmware version: %s
# Firmware header used by some TV's
0 string FNIB ZBOOT firmware header, header size: 32 bytes,
>8 lelong x load address: 0x%.8X,
>12 lelong x start address: 0x%.8X,
>16 lelong x checksum: 0x%.8X,
>20 lelong x version: 0x%.8X,
>24 lelong <1 invalid
>24 lelong x image size: %d bytes
# Firmware header used by several D-Link routers (and probably others)
0 string \x5e\xa3\xa4\x17
>(7.b+12) string \x5e\xa3\xa4\x17 DLOB firmware header,
>>12 string x %s,
>>(7.b+40) string x %s
#-------------------------Kernels-------------------------------------
# Linux kernel boot images, from Albert Cahalan
# and others such as Axel Kohlmeyer
# and Nicolás Lichtmaier
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
514 string HdrS Linux kernel
================================================
FILE: src/binwalk-0.4.1/src/md5.c
================================================
/*
* Added md5_string function for ease of use with Binwalk.
*
* Original file obtained from: http://cr.yp.to/2004-494/gaim/0.81-src/md5.c
*
* Craig Heffner
*/
/*
Copyright (C) 1999 Aladdin Enterprises. All rights reserved.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
L. Peter Deutsch
ghost@aladdin.com
*/
/*
Independent implementation of MD5 (RFC 1321).
This code implements the MD5 Algorithm defined in RFC 1321.
It is derived directly from the text of the RFC and not from the
reference implementation.
The original and principal author of md5.c is L. Peter Deutsch
. Other authors are noted in the change history
that follows (in reverse chronological order):
1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
1999-05-03 lpd Original version.
*/
#include "md5.h"
#include
#include /* Needed for snprintf call in md5_string() */
#ifdef TEST
/*
* Compile with -DTEST to create a self-contained executable test program.
* The test program should print out the same values as given in section
* A.5 of RFC 1321, reproduced below.
*/
#include
main()
{
static const char *const test[7] = {
"", /*d41d8cd98f00b204e9800998ecf8427e*/
"945399884.61923487334tuvga", /*0cc175b9c0f1b6a831c399e269772661*/
"abc", /*900150983cd24fb0d6963f7d28e17f72*/
"message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/
"abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
/*d174ab98d277d9f5a5611c2c9f419d9f*/
"12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/
};
int i;
for (i = 0; i < 7; ++i) {
md5_state_t state;
md5_byte_t digest[16];
int di;
md5_init(&state);
md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i]));
md5_finish(&state, digest);
printf("MD5 (\"%s\") = ", test[i]);
for (di = 0; di < 16; ++di)
printf("%02x", digest[di]);
printf(" :: MD5 string: %s", md5_string((void *) test[i],strlen(test[i])));
printf("\n");
}
return 0;
}
#endif /* TEST */
/* Returns the MD5 checksum string of a given file */
char *md5_string(void *data, size_t data_size)
{
int i = 0;
int byte_str_size = 2;
int md5_hash_length = 16;
int str_size = ((md5_hash_length*byte_str_size)+1); /* MD5 is 16 bytes at 2 characters per byte, plus trailing NULL */
char *md5str = NULL;
md5_state_t state;
md5_byte_t digest[md5_hash_length];
md5str = malloc(str_size);
if(!md5str)
{
perror("malloc");
}
else
{
memset(md5str,0,str_size);
md5_init(&state);
md5_append(&state, (const md5_byte_t *) data, data_size);
md5_finish(&state, digest);
for(i = 0; i < md5_hash_length; i++)
{
snprintf(md5str+(byte_str_size*i),byte_str_size+1,"%02x",digest[i]);
}
}
return md5str;
}
/*
* For reference, here is the program that computed the T values.
*/
#if 0
#include
main()
{
int i;
for (i = 1; i <= 64; ++i) {
unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i)));
printf("#define T%d 0x%08lx\n", i, v);
}
return 0;
}
#endif
/*
* End of T computation program.
*/
#define T1 0xd76aa478
#define T2 0xe8c7b756
#define T3 0x242070db
#define T4 0xc1bdceee
#define T5 0xf57c0faf
#define T6 0x4787c62a
#define T7 0xa8304613
#define T8 0xfd469501
#define T9 0x698098d8
#define T10 0x8b44f7af
#define T11 0xffff5bb1
#define T12 0x895cd7be
#define T13 0x6b901122
#define T14 0xfd987193
#define T15 0xa679438e
#define T16 0x49b40821
#define T17 0xf61e2562
#define T18 0xc040b340
#define T19 0x265e5a51
#define T20 0xe9b6c7aa
#define T21 0xd62f105d
#define T22 0x02441453
#define T23 0xd8a1e681
#define T24 0xe7d3fbc8
#define T25 0x21e1cde6
#define T26 0xc33707d6
#define T27 0xf4d50d87
#define T28 0x455a14ed
#define T29 0xa9e3e905
#define T30 0xfcefa3f8
#define T31 0x676f02d9
#define T32 0x8d2a4c8a
#define T33 0xfffa3942
#define T34 0x8771f681
#define T35 0x6d9d6122
#define T36 0xfde5380c
#define T37 0xa4beea44
#define T38 0x4bdecfa9
#define T39 0xf6bb4b60
#define T40 0xbebfbc70
#define T41 0x289b7ec6
#define T42 0xeaa127fa
#define T43 0xd4ef3085
#define T44 0x04881d05
#define T45 0xd9d4d039
#define T46 0xe6db99e5
#define T47 0x1fa27cf8
#define T48 0xc4ac5665
#define T49 0xf4292244
#define T50 0x432aff97
#define T51 0xab9423a7
#define T52 0xfc93a039
#define T53 0x655b59c3
#define T54 0x8f0ccc92
#define T55 0xffeff47d
#define T56 0x85845dd1
#define T57 0x6fa87e4f
#define T58 0xfe2ce6e0
#define T59 0xa3014314
#define T60 0x4e0811a1
#define T61 0xf7537e82
#define T62 0xbd3af235
#define T63 0x2ad7d2bb
#define T64 0xeb86d391
static void
md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
{
md5_word_t
a = pms->abcd[0], b = pms->abcd[1],
c = pms->abcd[2], d = pms->abcd[3];
md5_word_t t;
#ifndef ARCH_IS_BIG_ENDIAN
# define ARCH_IS_BIG_ENDIAN 1 /* slower, default implementation */
#endif
#if ARCH_IS_BIG_ENDIAN
/*
* On big-endian machines, we must arrange the bytes in the right
* order. (This also works on machines of unknown byte order.)
*/
md5_word_t X[16];
const md5_byte_t *xp = data;
int i;
for (i = 0; i < 16; ++i, xp += 4)
X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
#else /* !ARCH_IS_BIG_ENDIAN */
/*
* On little-endian machines, we can process properly aligned data
* without copying it.
*/
md5_word_t xbuf[16];
const md5_word_t *X;
if (!((data - (const md5_byte_t *)0) & 3)) {
/* data are properly aligned */
X = (const md5_word_t *)data;
} else {
/* not aligned */
memcpy(xbuf, data, 64);
X = xbuf;
}
#endif
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
/* Round 1. */
/* Let [abcd k s i] denote the operation
a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
#define SET(a, b, c, d, k, s, Ti)\
t = a + F(b,c,d) + X[k] + Ti;\
a = ROTATE_LEFT(t, s) + b
/* Do the following 16 operations. */
SET(a, b, c, d, 0, 7, T1);
SET(d, a, b, c, 1, 12, T2);
SET(c, d, a, b, 2, 17, T3);
SET(b, c, d, a, 3, 22, T4);
SET(a, b, c, d, 4, 7, T5);
SET(d, a, b, c, 5, 12, T6);
SET(c, d, a, b, 6, 17, T7);
SET(b, c, d, a, 7, 22, T8);
SET(a, b, c, d, 8, 7, T9);
SET(d, a, b, c, 9, 12, T10);
SET(c, d, a, b, 10, 17, T11);
SET(b, c, d, a, 11, 22, T12);
SET(a, b, c, d, 12, 7, T13);
SET(d, a, b, c, 13, 12, T14);
SET(c, d, a, b, 14, 17, T15);
SET(b, c, d, a, 15, 22, T16);
#undef SET
/* Round 2. */
/* Let [abcd k s i] denote the operation
a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
#define SET(a, b, c, d, k, s, Ti)\
t = a + G(b,c,d) + X[k] + Ti;\
a = ROTATE_LEFT(t, s) + b
/* Do the following 16 operations. */
SET(a, b, c, d, 1, 5, T17);
SET(d, a, b, c, 6, 9, T18);
SET(c, d, a, b, 11, 14, T19);
SET(b, c, d, a, 0, 20, T20);
SET(a, b, c, d, 5, 5, T21);
SET(d, a, b, c, 10, 9, T22);
SET(c, d, a, b, 15, 14, T23);
SET(b, c, d, a, 4, 20, T24);
SET(a, b, c, d, 9, 5, T25);
SET(d, a, b, c, 14, 9, T26);
SET(c, d, a, b, 3, 14, T27);
SET(b, c, d, a, 8, 20, T28);
SET(a, b, c, d, 13, 5, T29);
SET(d, a, b, c, 2, 9, T30);
SET(c, d, a, b, 7, 14, T31);
SET(b, c, d, a, 12, 20, T32);
#undef SET
/* Round 3. */
/* Let [abcd k s t] denote the operation
a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define SET(a, b, c, d, k, s, Ti)\
t = a + H(b,c,d) + X[k] + Ti;\
a = ROTATE_LEFT(t, s) + b
/* Do the following 16 operations. */
SET(a, b, c, d, 5, 4, T33);
SET(d, a, b, c, 8, 11, T34);
SET(c, d, a, b, 11, 16, T35);
SET(b, c, d, a, 14, 23, T36);
SET(a, b, c, d, 1, 4, T37);
SET(d, a, b, c, 4, 11, T38);
SET(c, d, a, b, 7, 16, T39);
SET(b, c, d, a, 10, 23, T40);
SET(a, b, c, d, 13, 4, T41);
SET(d, a, b, c, 0, 11, T42);
SET(c, d, a, b, 3, 16, T43);
SET(b, c, d, a, 6, 23, T44);
SET(a, b, c, d, 9, 4, T45);
SET(d, a, b, c, 12, 11, T46);
SET(c, d, a, b, 15, 16, T47);
SET(b, c, d, a, 2, 23, T48);
#undef SET
/* Round 4. */
/* Let [abcd k s t] denote the operation
a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
#define I(x, y, z) ((y) ^ ((x) | ~(z)))
#define SET(a, b, c, d, k, s, Ti)\
t = a + I(b,c,d) + X[k] + Ti;\
a = ROTATE_LEFT(t, s) + b
/* Do the following 16 operations. */
SET(a, b, c, d, 0, 6, T49);
SET(d, a, b, c, 7, 10, T50);
SET(c, d, a, b, 14, 15, T51);
SET(b, c, d, a, 5, 21, T52);
SET(a, b, c, d, 12, 6, T53);
SET(d, a, b, c, 3, 10, T54);
SET(c, d, a, b, 10, 15, T55);
SET(b, c, d, a, 1, 21, T56);
SET(a, b, c, d, 8, 6, T57);
SET(d, a, b, c, 15, 10, T58);
SET(c, d, a, b, 6, 15, T59);
SET(b, c, d, a, 13, 21, T60);
SET(a, b, c, d, 4, 6, T61);
SET(d, a, b, c, 11, 10, T62);
SET(c, d, a, b, 2, 15, T63);
SET(b, c, d, a, 9, 21, T64);
#undef SET
/* Then perform the following additions. (That is increment each
of the four registers by the value it had before this block
was started.) */
pms->abcd[0] += a;
pms->abcd[1] += b;
pms->abcd[2] += c;
pms->abcd[3] += d;
}
void
md5_init(md5_state_t *pms)
{
pms->count[0] = pms->count[1] = 0;
pms->abcd[0] = 0x67452301;
pms->abcd[1] = 0xefcdab89;
pms->abcd[2] = 0x98badcfe;
pms->abcd[3] = 0x10325476;
}
void
md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
{
const md5_byte_t *p = data;
int left = nbytes;
int offset = (pms->count[0] >> 3) & 63;
md5_word_t nbits = (md5_word_t)(nbytes << 3);
if (nbytes <= 0)
return;
/* Update the message length. */
pms->count[1] += nbytes >> 29;
pms->count[0] += nbits;
if (pms->count[0] < nbits)
pms->count[1]++;
/* Process an initial partial block. */
if (offset) {
int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
memcpy(pms->buf + offset, p, copy);
if (offset + copy < 64)
return;
p += copy;
left -= copy;
md5_process(pms, pms->buf);
}
/* Process full blocks. */
for (; left >= 64; p += 64, left -= 64)
md5_process(pms, p);
/* Process a final partial block. */
if (left)
memcpy(pms->buf, p, left);
}
void
md5_finish(md5_state_t *pms, md5_byte_t digest[16])
{
static const md5_byte_t pad[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
md5_byte_t data[8];
int i;
/* Save the length before padding. */
for (i = 0; i < 8; ++i)
data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
/* Pad to 56 bytes mod 64. */
md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
/* Append the length. */
md5_append(pms, data, 8);
for (i = 0; i < 16; ++i)
digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
}
================================================
FILE: src/binwalk-0.4.1/src/md5.h
================================================
/*
* Added md5_string function prototype for ease of use with Binwalk.
*
* Original file obtained from: http://cr.yp.to/2004-494/gaim/0.81-src/md5.h
*
* Craig Heffner
*/
/*
Copyright (C) 1999 Aladdin Enterprises. All rights reserved.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
L. Peter Deutsch
ghost@aladdin.com
*/
/*
Independent implementation of MD5 (RFC 1321).
This code implements the MD5 Algorithm defined in RFC 1321.
It is derived directly from the text of the RFC and not from the
reference implementation.
The original and principal author of md5.h is L. Peter Deutsch
. Other authors are noted in the change history
that follows (in reverse chronological order):
1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
added conditionalization for C++ compilation from Martin
Purschke .
1999-05-03 lpd Original version.
*/
#ifndef md5_INCLUDED
# define md5_INCLUDED
/*
* This code has some adaptations for the Ghostscript environment, but it
* will compile and run correctly in any environment with 8-bit chars and
* 32-bit ints. Specifically, it assumes that if the following are
* defined, they have the same meaning as in Ghostscript: P1, P2, P3,
* ARCH_IS_BIG_ENDIAN.
*/
#include
typedef unsigned char md5_byte_t; /* 8-bit byte */
typedef unsigned int md5_word_t; /* 32-bit word */
/* Define the state of the MD5 Algorithm. */
typedef struct md5_state_s {
md5_word_t count[2]; /* message length in bits, lsw first */
md5_word_t abcd[4]; /* digest buffer */
md5_byte_t buf[64]; /* accumulate block */
} md5_state_t;
#ifdef __cplusplus
extern "C"
{
#endif
/* Initialize the algorithm. */
#ifdef P1
void md5_init(P1(md5_state_t *pms));
#else
void md5_init(md5_state_t *pms);
#endif
/* Append a string to the message. */
#ifdef P3
void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes));
#else
void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
#endif
/* Finish the message and return the digest. */
#ifdef P2
void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16]));
#else
void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
#endif
/* Returns the MD5 checksum string of a given file */
char *md5_string(void *data, size_t data_size);
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* md5_INCLUDED */
================================================
FILE: src/binwalk-0.4.1/src/mparse.c
================================================
/* Provides minimal magic file parsing capabilities */
#include
#include
#include
#include
#include
#include
#include
#include "mparse.h"
/* Parse out only the signatures entry from a magic file. 'Row' must point to the beginning of a magic signature line. */
char *parse_magic(char *row, int *offset, int *magic_size, int *wildcard, struct magic_filter *filters[], int filter_count, int ignore_short, int fast_filter)
{
char *offset_str = NULL, *type = NULL, *magic_str = NULL, *magic_literal = NULL, *magic = NULL, *description = NULL;
long long_val = 0;
short short_val = 0;
int literal_size = 0, base = 0;
/* Get the offset, type and magic values from the row entry */
offset_str = get_column(row, 0);
type = get_column(row, 1);
magic_str = get_column(row, 2);
description = get_column(row, 3);
if(!offset_str || !type || !magic_str || !description)
{
goto end;
}
/*
* If the magic signature is just the magic wildcard character, treat it as a string.
* Likewise, binwalk itself doesn't have support for type masking, so treat masked types
* (such as 'belong&0xF0FFFF00') as strings and just pass them off to libmagic.
*/
if((strcmp(magic_str, MAGIC_WILDCARD) == 0) ||
(strstr(type, AMPERSAND)))
{
*wildcard = 1;
ignore_short = 0;
free(type);
type = strdup(STRING);
}
else
{
*wildcard = 0;
}
/*
* Two byte signatures result in lots of false positives. If ignore_short is non-zero, then ignore
* all signatures that are of type beshort or leshort, or strings that are two bytes or less in length.
* But only if this signature has not been explicitly marked for inclusion!
*/
if(ignore_short && filter_check(filters, filter_count, description) != RESULT_INCLUDE)
{
if(strncmp(type, HOST_SHORT, HOST_SHORT_SIZE) == 0 || strncmp(type, LESHORT, LESHORT_SIZE) == 0 || strncmp(type, BESHORT, BESHORT_SIZE) == 0)
{
goto end;
}
else if(strncmp(type, STRING, STRING_SIZE) == 0)
{
magic_literal = string_literal(magic_str, &literal_size);
if(magic_literal) free(magic_literal);
if(literal_size <= SHORT_SIZE)
{
goto end;
}
}
}
/*
* If fast filtering has been enabled and the signature description is not in our include list,
* then completely ignore the signature.
*/
if(fast_filter)
{
if(description && strlen(description) > 0)
{
if(filter_check(filters, filter_count, description) != RESULT_INCLUDE)
{
goto end;
}
}
}
/* Offsets can be specified in hex or decimal */
if(strstr(offset_str, "0x") == offset_str)
{
*offset = strtol(offset_str, NULL, 16);
}
else
{
*offset = strtol(offset_str, NULL, 10);
}
/* Convert the magic value to a string, long or short value */
if(memcmp(type, STRING, STRING_SIZE) == 0)
{
magic = string_literal(magic_str, magic_size);
} else {
/* Numeric magic strings can be specified in hex or decimal */
if(strstr(magic_str, "0x") == magic_str)
{
base = 16;
}
else
{
base = 10;
}
if(memcmp(type, LELONG, LELONG_SIZE) == 0 || memcmp(type, HOST_LONG, HOST_LONG_SIZE) == 0)
{
long_val = strtol(magic_str, NULL, base);
*magic_size = LONG_SIZE;
} else if(memcmp(type, LESHORT, LESHORT_SIZE) == 0 || memcmp(type, HOST_SHORT, HOST_SHORT_SIZE) == 0) {
short_val = (short) strtol(magic_str, NULL, base);
*magic_size = SHORT_SIZE;
} else if(memcmp(type, BELONG, BELONG_SIZE) == 0) {
long_val = strtol(magic_str, NULL, base);
long_val = htonl(long_val);
*magic_size = LONG_SIZE;
} else if(memcmp(type, BESHORT, BESHORT_SIZE) == 0) {
short_val = (short) strtol(magic_str, NULL, base);
short_val = htons(short_val);
*magic_size = SHORT_SIZE;
}
if(*magic_size == SHORT_SIZE)
{
magic = malloc(SHORT_SIZE);
if(!magic)
{
*magic_size = 0;
goto end;
}
memcpy(magic, (void *) &short_val, SHORT_SIZE);
} else if(*magic_size == LONG_SIZE) {
magic = malloc(LONG_SIZE);
if(!magic)
{
*magic_size = 0;
goto end;
}
memcpy(magic, (void *) &long_val, LONG_SIZE);
}
}
end:
if(offset_str) free(offset_str);
if(type) free(type);
if(magic_str) free(magic_str);
if(description) free(description);
return magic;
}
/* Converts escaped hex or octal bytes to their respective values in the string */
char *string_literal(char *string, int *literal_size)
{
char *literal = NULL;
char sbyte[4] = { 0 };
char byte = 0;
int str_size = 0;
int lsize = 0, i = 0;
if(string != NULL && literal_size != NULL)
{
str_size = strlen(string);
/* The converted string will be as big or smaller than the original string */
literal = malloc(str_size+1);
if(!literal)
{
perror("malloc");
}
else
{
memset(literal, 0, str_size+1);
/* Loop through each byte of the original string */
for(i=0; i
#ifndef NOCURL
#include
#include
#endif
#include "update.h"
size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *fp)
{
size_t written = 0;
written = fwrite(ptr, size, nmemb, fp);
return written;
}
int update_magic_file(char *url, char *outfile)
{
int retval = 0;
#ifndef NOCURL
CURL *curl = NULL;
FILE *fp = NULL;
curl = curl_easy_init();
if(curl)
{
fp = fopen(outfile,"wb");
if(fp)
{
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
if(curl_easy_perform(curl) == 0)
{
retval = 1;
}
fclose(fp);
}
else
{
perror(outfile);
}
curl_easy_cleanup(curl);
}
#else
fprintf(stderr, "Sorry, this feature has been disabled!\n");
#endif
return retval;
}
================================================
FILE: src/binwalk-0.4.1/src/update.h
================================================
#ifndef UPDATE_H
#define UPDATE_H
#define BINWALK_UPDATE_URL "http://binwalk.googlecode.com/svn/trunk/src/magic.binwalk"
#define BINCAST_UPDATE_URL "http://binwalk.googlecode.com/svn/trunk/src/magic.bincast"
#define BINARCH_UPDATE_URL "http://binwalk.googlecode.com/svn/trunk/src/magic.binarch"
int update_magic_file(char *url, char *outfile);
size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *fp);
#endif
================================================
FILE: src/binwalk-1.0/docs/API
================================================
DESCRIPTION
The binwalk python module can be used by any python script to programatically perform binwalk scans and
obtain the results of those scans.
The classes, methods and objects in the binwalk modules are documented via pydoc, including examples,
so those interested in using the binwalk module are encouraged to look there. However, several common usage
examples are provided here to help jump-start development efforts.
BASIC SCAN
This is the simplest scan, and is equivalent to running binwalk on the command line with no additional arguments.
Note the use of the cleanup() method, which will ensure all temporary files generated by binwalk are cleaned up:
from binwalk import Binwalk
binwalk = Binwalk()
results = binwalk.scan('firmware.bin')
binwalk.cleanup()
The scan() method will return a list of tuples, one tuple for each offset in the target file where a matching
signature was found. The first element of each tuple is the offset into the file at which the match was found.
The second tuple is a list of dictionaries (depending on the binwalk options, there may be more than one match
for a given offset); each dictionary describes a matching signature:
results = [
(0, [{description : "LZMA compressed data..."}]),
(112, [{description : "gzip compressed data..."}]),
]
A callback function may also be specified. The callback function is called as soon as a match is identified. It
is passed two arguments: the offset at which the match was found, and a list of dictionaries as described above:
from binwalk import Binwalk
def my_callback(offset, results):
print "Found %d results at offset %d:" % (len(results), offset)
for result in results:
print " %s" % result['description']
binwalk = Binwalk(callback=my_callback)
binwalk.scan('firmware.bin')
binwalk.cleanup()
ADDING FILTERS
Include and exclude filters may be specified which operate identically to the --include, --exclude and --search
binwalk command line options:
from binwalk import Binwalk
binwalk = Binwalk()
# Adds a normally excluded signature to the existing list of signatures (same as --include)
binwalk.filter.include('minix', exclusive=False)
# Exclusively filters out all signatures except those containing the string 'filesystem' (same as --search)
binwalk.filter.include('filesystem')
# Excludes all results that contain the string 'jffs2' (same as --exclude)
binwalk.filter.exclude('jffs2')
binwalk.scan('firmware')
EXTRACTING FILES
Extract rules may be specified which operate identically to the --dd and --extract binwalk command line options.
To add a custom extract rule, or a list of extract rules (such as with the --dd option):
from binwalk import Binwalk
binwalk = Binwalk()
# Extract results containing the string 'gzip' with a file extension of 'gz' and run the gunzip command
binwalk.extractor.add_rule('gzip:gz:gunzip %e')
# Extract 'gzip' and 'filesystem' results
binwalk.extractor.add_rule(['gzip:gz', 'filesystem:fs'])
binwalk.scan('firmware')
To load the default extraction rules from the extract.conf file (such as with the --extract option):
from binwalk import Binwalk
binwalk = Binwalk()
binwalk.extractor.load_defaults()
binwalk.Scan('firmware.bin')
To enabled delayed file extraction (such as with the --delay option):
from binwalk import Binwalk
binwalk = Binwalk()
binwalk.extractor.enable_delayed_extract(True)
binwalk.Scan('firmware.bin')
To enable file cleanup after extraction (such as with the --rm option):
from binwalk import Binwalk
binwalk = Binwalk()
binwalk.extractor.cleanup_extracted_files(True)
binwalk.Scan('firmware.bin')
================================================
FILE: src/binwalk-1.0/docs/COPYING
================================================
The MIT License
Copyright (c) 2010 Craig Heffner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: src/binwalk-1.0/docs/README
================================================
DESCRIPTION
Binwalk is a tool for searching a given binary image for embedded file types. Specifically,
it was designed for identifying files embedded inside of firmware images. Binwalk file signatures
are compatible with the magic signatures used by the Unix file utility.
Binwalk includes customized/improved signatures for files that are commonly found in firmware images
such as compressed/archived files, firmware headers, Linux kernels, bootloaders, filesystems, etc.
Binwalk can scan for executable code by searching for opcodes associated with the function prologues/epiloges
of various architectures.
Binwalk can display the value of each file offset in various data types (long, short, date, etc). This is
useful for identifying unknown firmware header fields such as date and length values.
Binwalk can extract embedded files from firmware images and invoke external applications for further analysis,
decompression or extraction.
INSTALLATION
To install binwalk, run the following command from the src directory:
# python setup.py install
DEPENDENCIES
Binwalk is currently supported on the Linux and Mac OSX platforms.
Binwalk depends on the libmagic library (version 5.05 or newer) and its corresponding magic Python module. Debian
users can install these dependencies via apt-get:
$ sudo apt-get install libmagic1 python-magic
Note that some distributions/platforms may not have libmagic readily available, or may use an older version of
libmagic that is incompatible with binwalk. In this case, you may download the source code for the file utility at:
ftp://ftp.astron.com/pub/file/
Follow the file utility's documentation to build and install both libmagic and the Python magic module.
BASIC USAGE
The only required options to binwalk are the file(s) that you want to search:
$ binwalk firmware1.bin firmware2.bin firmware3.bin
Binwalk signatures and system-wide configuration files can be updated to the latest from the SVN
trunk with the --update option (this likely will need to be run as root):
# binwalk --update
To see more verbose information about the file being scanned, specify the --verbose option. This option
is automatically enabled if more than one target file is specified on the command line:
$ binwalk --verbose firmware.bin
Output can be logged to a file with the --file option:
$ binwalk --file=binwalk.log firmware.bin
Output to stdout can be suppressed with the --quiet option:
$ binwalk --file=binwalk.log --quiet firmware.bin
By default, scans start at the first byte of the specified file (offset 0) and end at the end of the
specified file. These settings can be controlled with the --offset and --length options, respectively.
For example, the following command will scan 128 bytes starting at offset 64:
$ binwalk --offset=64 --length=128 firmware.bin
By default, binwalk will scan every byte for possible signatures. To scan every 2 bytes, 4 bytes, 8 bytes,
etc, use the --align option:
$ binwalk --align=4 firmware.bin
By default binwalk will use the signatures from the magic.binwalk file, but you may specify an alternate
signature file with the --magic option:
$ binwalk --magic=/usr/share/misc/magic firmware.bin
To search for a sequence of bytes without creating a signature file, use the --raw-bytes option:
$ binwalk --raw-bytes="\x00\x01\x02\x03" firmware.bin
TYPES OF SCANS
By default binwalk will scan for file signatures inside the specified target file(s), however, other
types of scans are also supported.
To scan for known x86/MIPS/ARM/PPC opcodes, use the --opcodes option:
$ binwalk --opcodes firmware.bin
To cast each offset in the file as various data types (big/little endian shorts/longs, date fields, etc),
use the --cast option (best used with the --length / --offset options):
$ binwalk --cast --length=64 firmware.bin
CONTROLLING SCAN BEHAVIOR
Some signatures - notably those whose magic signatures are less than 3 bytes - are excluded by default
from binwalk scans. These can be individually included with the --include option, or globally with --all
(multiple --include options may be specified):
$ binwalk --include=minix firmware.bin
$ binwalk --all firmware.bin
By default results marked as invalid are not displayed. They can be displayed by specifying the --show-invalid
option:
$ binwalk --show-invalid firmware.bin
By default binwalk will stop scanning for signatures at any given offset once a valid signature has been
found at that offset. To display all signatures that match at all offsets, use the --keep-going option:
$ binwalk --keep-going firmware.bin
FILTERING SCAN RESULTS
It may at times be desirable to exclude certian signatures from the scan results. This can be done with the
--exclude option (multiple --exclude options may be specified):
$ binwalk --exclude='lzma compressed data' firmware.bin
It may at times be desirable to only search for a certian signature or group of signatures. This can be
done with the --search option (multiple --search options may be specified):
$ binwalk --search=filesystem firmware.bin
The --grep option is useful for filtering output that contains multiple results per line, such as occurs
with the --cast option:
$ binwalk --cast --grep=2012 firmware.bin
EXTRACTING FILES
Binwalk can extract matches found inside the target file(s), and optionally execute an external command
each time a file is extracted using the --dd option. At a minimum, a string to search for in the output
description and a file extension must be specified. A command to execute may also be specified. These
three fields are colon delimited.
To extract all matches that contain the text 'gzip compressed data' and save them with a file extension
of 'gz':
$ binwalk --dd='gzip compressed data:gz' firmware.bin
To extract all matches that contain the text 'gzip compressed data', save them with a file extension of
'gz' and execute the 'gunzip' command against the extracted file (note the use of the %e place holder for
the path to the extracted file):
$ binwalk --dd='gzip compressed data:gz:gunzip %e' firmware.bin
There are some file types that are commonly extracted, and specifying a --dd option for each one is tiresome.
The -e option will load extract rules from the system/user extract.conf file (see the CONFIGURATION FILES section
below):
$ binwalk -e firmware.bin
To specify a different extraction rule file, use --extract:
$ binwalk --extract=./my_extract.conf firmware.bin
Extracting files with --dd or --extract can leave a lot of uneccessary files laying around. These can be
automatically cleaned up with the --rm option. If specified, any extracted file that had a command run against
it will be deleted after the command has finished execution. Additionally, if files created by the executed
command are 0 bytes in size, they will also be removed:
$ binwalk --rm firmware.bin
Some file types do not specify their file size in their header, but rather rely on a footer or delimiter to
signify the end of the file. When extracted these files will by default be copied from the start of the header
to the end of the target file. If there are many of these files, this can take up unecessary disk space. For
those files which are supported, specifying the --delay option will delay the extraction of these files until
the end of the file can be found:
$ binwalk --delay firmware.bin
DISPLAYING SCAN PROGRESS
Some scans can take some time to complete and may not display many results during this time. You can press the
enter key at any time to force binwalk to display its current scan progress:
$ binwalk -v firmware.bin
DECIMAL HEX DESCRIPTION
------------------------------------------------------------------------------------------
Progress: 1595 / 12074736 (0.01%)
Progress: 8015 / 12074736 (0.07%)
Progress: 12424 / 12074736 (0.10%)
SIGNATURE FILES
There are three signature files used by binwalk:
o magic/binwalk - The default signature file.
o magic/binarch - The signature file used with --opcodes.
o magic/bincast - The signature file used with --cast.
Users may create their own signatures that will be added to the respective system-wide files when performing a scan.
This is as easy as editing the following files in the user home directory:
o .binwalk/magic/binwalk
o .binwalk/magic/binarch
o .binwalk/magic/bincast
Although the system-wide signature files can also be altered, the system-wide signature files will be overwritten when
upgrading binwalk, or using the --update option. The user files will not be touched however, and will survive these updates.
CONFIGURATION FILES
There is one configuration file used by binwalk only when the --extract option is specified:
o config/extract.conf
This file contains a list of extract rules, identical to the arguments that would be passed to the --dd option.
Users can override and add to this list of extract rules by adding their own rules to the following file in the user home
directory:
o .binwalk/config/extract.conf
Note that when overriding a system-wide extract rule, the 'type' field in the user extract rule must exactly match the 'type'
field in the system-wide extract rule.
Although the system-wide extract.conf file can also be altered, this file will be overwritten when upgrading binwalk or using
the --update option. The user extract.conf file will not be touched however, and will survive these updates.
MORE INFORMATION
For more detailed and up to date information, visit the binwalk wiki page at:
http://code.google.com/p/binwalk/wiki/TableOfContents
================================================
FILE: src/binwalk-1.0/src/bin/binwalk-script
================================================
#!/usr/bin/env python
import sys
import os.path
import binwalk
from threading import Thread
from binwalk.common import str2int
from getopt import GetoptError, getopt as GetOpt
def display_status(bwalk):
while True:
# Display the current scan progress when the enter key is pressed.
raw_input()
print "Progress: %.2f%% (%d / %d)\n" % (((float(bwalk.total_scanned) / float(bwalk.scan_length)) * 100), bwalk.total_scanned, bwalk.scan_length)
def usage(fd):
fd.write("\n")
fd.write("Binwalk v%s\n" % binwalk.Config.VERSION)
fd.write("Craig Heffner, http://www.devttys0.com\n")
fd.write("\n")
fd.write("Usage: %s [OPTIONS] [FILE1] [FILE2] [FILE3] ...\n" % os.path.basename(sys.argv[0]))
fd.write("\n")
fd.write("\t-o, --offset= Start scan at this file offset\n")
fd.write("\t-l, --length= Number of bytes to scan\n")
fd.write("\t-b, --align= Set byte alignment [default: 1]\n")
fd.write("\t-m, --magic= Specify an alternate magic file to use\n")
fd.write("\t-i, --include= Include matches that are normally excluded and that have in their description\n")
fd.write("\t-x, --exclude= Exclude matches that have in their description\n")
fd.write("\t-y, --search= Only search for matches that have in their description\n")
fd.write("\t-g, --grep= Grep results for the specified text\n")
fd.write("\t-R, --raw-bytes= Search for a sequence of raw bytes instead of using the default magic signatures\n")
fd.write("\t-f, --file= Log results to file\n")
fd.write("\t-D, --dd= Extract entries whose descriptions match , give them file extension , and execute \n")
fd.write("\t-e, --extract=[file] Automatically extract known file types. Load rules from file, if specified.\n")
fd.write("\t-r, --rm Cleanup extracted files and zero-size files\n")
fd.write("\t-d, --delay Delay file extraction for files with known footers\n")
fd.write("\t-a, --all Include all short signatures\n")
fd.write("\t-I, --show-invalid Show results marked as invalid\n")
fd.write("\t-A, --opcodes Scan for executable code\n")
fd.write("\t-C, --cast Cast file contents as various data types\n")
fd.write("\t-k, --keep-going Show all matching results at a given offset, not just the first one\n")
fd.write("\t-q, --quiet Supress output to stdout\n")
fd.write("\t-v, --verbose Be verbose (specify twice for very verbose)\n")
fd.write("\t-u, --update Update magic signature files\n")
fd.write("\t-h, --help Show help output\n")
fd.write("\n")
if fd == sys.stderr:
sys.exit(1)
else:
sys.exit(0)
def main():
MIN_ARGC = 2
align = 1
offset = 0
length = 0
quiet = False
pre_filter = True
verbose = 0
log_file = None
show_invalid = False
short_sig = True
custom_signature = None
delay_extraction = False
extract_rules_file = None
extract_from_config = False
cleanup_after_extract = False
magic_flags = binwalk.magic.MAGIC_NONE
options = []
magic_files = []
target_files = []
greps = []
includes = []
excludes = []
searches = []
extracts = []
config = binwalk.Config()
short_options = "aACdhkeqruvPIf:o:l:b:i:x:y:D:m:R:g:"
long_options = [
"rm",
"all",
"help",
"quiet",
"verbose",
"opcodes",
"cast",
"update",
"keep-going",
"show-invalid",
"profile",
"delay",
"file=",
"offset=",
"length=",
"align=",
"include=",
"exclude=",
"extract=",
"search=",
"dd=",
"grep=",
"magic=",
"raw-bytes=",
]
# Require at least one argument (the target file)
if len(sys.argv) < MIN_ARGC:
usage(sys.stderr)
try:
opts, args = GetOpt(sys.argv[1:], short_options, long_options)
except GetoptError, e:
sys.stderr.write("%s\n" % str(e))
usage(sys.stderr)
for opt, arg in opts:
if opt in ("-h", "--help"):
usage(sys.stdout)
elif opt in ("-d", "--delay"):
delay_extraction = True
elif opt in ("-f", "--file"):
log_file = arg
elif opt in ("-q", "--quiet"):
quiet = True
elif opt in ("-v", "--verbose"):
verbose += 1
elif opt in ("-o", "--offset"):
offset = str2int(arg)
elif opt in ("-l", "--length"):
length = str2int(arg)
elif opt in ("-b", "--align"):
align = str2int(arg)
elif opt in ("-i", "--include"):
includes.append(arg)
elif opt in ("-y", "--search"):
searches.append(arg)
elif opt in ("-x", "--exclude"):
excludes.append(arg)
elif opt in ("-D", "--dd"):
extracts.append(arg)
elif opt in ("-g", "--grep"):
greps.append(arg)
elif opt in ("-e", "--extract"):
if arg:
extract_rules_file = arg
else:
extract_from_config = True
elif opt in ("-r", "--rm"):
cleanup_after_extract = True
elif opt in ("-m", "--magic"):
magic_files.append(arg)
elif opt in ("-a", "--all"):
short_sig = False
elif opt in ("-k", "--keep-going"):
magic_flags |= binwalk.magic.MAGIC_CONTINUE
elif opt in ("-I", "--show-invalid"):
show_invalid = True
elif opt in ("-A", "--opcodes"):
# Check every single offset
align = 1
# Don't filter out short signatures as some opcode sigs are only 2 bytes
short_sig = False
# Load user file first so its signatures take precedence
magic_files.append(config.paths['user'][config.BINARCH_MAGIC_FILE])
magic_files.append(config.paths['system'][config.BINARCH_MAGIC_FILE])
elif opt in ("-C", "--cast"):
# Check every single offset
align = 1
# Don't stop at the first match (everything matches everything in this scan)
magic_flags |= binwalk.magic.MAGIC_CONTINUE
# Disable all pre filtering; we want to check everything for this scan
pre_filter = False
# Don't filter shot signatures, or else some casts won't be displayed
short_sig = False
# Load user file first so its signatures take precedence
magic_files.append(config.paths['user'][config.BINCAST_MAGIC_FILE])
magic_files.append(config.paths['system'][config.BINCAST_MAGIC_FILE])
elif opt in ("-R", "--raw-bytes"):
# Disable short signature filtering, as the supplied string may be short
short_sig = False
custom_signature = arg
elif opt in ("-u", "--update"):
try:
sys.stdout.write("Updating signatures...")
sys.stdout.flush()
binwalk.Update().update()
sys.stdout.write("done.\n")
sys.exit(0)
except Exception, e:
if 'Permission denied' in str(e):
sys.stderr.write("failed (permission denied). Check your user permissions, or run the update as root.\n")
else:
sys.stderr.write('\n' + str(e) + '\n')
sys.exit(1)
# The --profile option is handled prior to calling main()
elif opt not in ('-P', '--profile'):
usage(sys.stderr)
# Append the option and argument to the list of processed options
# This is used later to determine which argv entries are file names
options.append(opt)
options.append(arg)
options.append("%s%s" % (opt, arg))
options.append("%s=%s" % (opt, arg))
# Treat any command line options not processed by getopt as target file paths
for opt in sys.argv[1:]:
#TODO: Do we really want to not process valid files that start with a '-'?
# This is probably OK, and ensures that no options are treated as target files.
if opt not in options and not opt.startswith('-'):
target_files.append(opt)
# If more than one target file was specified, enable verbose mode; else, there is
# nothing in the output to indicate which scan corresponds to which file.
if len(target_files) > 1:
verbose = True
# Instantiate the Binwalk class
bwalk = binwalk.Binwalk(flags=magic_flags, verbose=verbose, log=log_file, quiet=quiet)
# If a custom signature was specified, create a temporary magic file containing the custom signature
# and ensure that it is the only magic file that will be loaded when Binwalk.scan() is called.
if custom_signature is not None:
magic_files = bwalk.parser.file_from_string(custom_signature)
# Set any specified filters
bwalk.filter.include(includes, exclusive=False)
bwalk.filter.exclude(excludes)
bwalk.filter.include(searches)
bwalk.filter.grep(filters=greps)
# Add any specified extract rules
bwalk.extractor.add_rule(extracts)
# If -e was specified, load the default extract rules
if extract_from_config:
bwalk.extractor.load_defaults()
# If --extract was specified, load the specified extraction rules file
if extract_rules_file is not None:
bwalk.extractor.load_from_file(extract_rules_file)
# Set the extractor cleanup value (True to clean up files, False to leave them on disk)
bwalk.extractor.cleanup_extracted_files(cleanup_after_extract)
# Enable delayed extraction, which will prevent supported file types from having trailing data when extracted
bwalk.extractor.enable_delayed_extract(delay_extraction)
# Load the magic file(s)
bwalk.load_signatures(magic_files=magic_files, pre_filter_signatures=pre_filter, filter_short_signatures=short_sig)
# Scan each target file
for target_file in target_files:
bwalk.display.header(target_file)
# Start the display_status function as a daemon thread
t = Thread(target=display_status, args=(bwalk,))
t.setDaemon(True)
t.start()
# Catch keyboard interrupts so that we can properly clean up after the scan
try:
bwalk.scan(target_file,
offset=offset,
length=length,
align=align,
show_invalid_results=show_invalid,
callback=bwalk.display.results)
except KeyboardInterrupt:
pass
bwalk.display.footer()
# Be sure to drink your ovaltine.
# And also to clean up any temporary magic files.
bwalk.cleanup()
try:
# Special options for profiling the code. For debug use only.
if '--profile' in sys.argv or '-P' in sys.argv:
import cProfile
cProfile.run('main()')
else:
main()
except KeyboardInterrupt:
pass
================================================
FILE: src/binwalk-1.0/src/binwalk/__init__.py
================================================
import os
import magic
from config import *
from update import *
from filter import *
from parser import *
from smartsig import *
from extractor import *
from prettyprint import *
from common import file_size
class Binwalk:
'''
Primary Binwalk class.
Interesting class objects:
self.filter - An instance of the MagicFilter class.
self.extractor - An instance of the Extractor class.
self.parser - An instance of the MagicParser class.
self.display - An instance of the PrettyPrint class.
self.magic_files - A list of magic file path strings to use whenever the scan() method is invoked.
self.scan_length - The total number of bytes to be scanned.
self.total_scanned - The number of bytes that have already been scanned.
'''
# Default libmagic flags. Basically disable anything we don't need in the name of speed.
DEFAULT_FLAGS = magic.MAGIC_NO_CHECK_TEXT | magic.MAGIC_NO_CHECK_ENCODING | magic.MAGIC_NO_CHECK_APPTYPE | magic.MAGIC_NO_CHECK_TOKENS
# The MAX_SIGNATURE_SIZE limits the amount of data available to a signature.
# While most headers/signatures are far less than this value, some may reference
# pointers in the header structure which may point well beyond the header itself.
# Passing the entire remaining buffer to libmagic is resource intensive and will
# significantly slow the scan; this value represents a reasonable buffer size to
# pass to libmagic which will not drastically affect scan time.
MAX_SIGNATURE_SIZE = 8092
# Max number of bytes to process at one time. Everyone should have 50MB of memory, right?
READ_BLOCK_SIZE = 50 * 1024 * 1024
# Minimum verbosity level at which to enable extractor verbosity.
VERY_VERBOSE = 2
# Scan every byte by default.
DEFAULT_BYTE_ALIGNMENT = 1
def __init__(self, magic_files=[], flags=magic.MAGIC_NONE, log=None, quiet=False, verbose=0):
'''
Class constructor.
@magic_files - A list of magic files to use.
@flags - Flags to pass to magic_open. [TODO: Might this be more appropriate as an argument to load_signaures?]
@log - Output PrettyPrint data to log file as well as to stdout.
@quiet - If set to True, supress PrettyPrint output to stdout.
@verbose - Verbosity level.
Returns None.
'''
self.flags = self.DEFAULT_FLAGS | flags
self.magic_files = magic_files
self.verbose = verbose
self.total_scanned = 0
self.scan_length = 0
self.total_read = 0
self.magic = None
self.mfile = None
# Instantiate the config class so we can access file/directory paths
self.config = Config()
# Use the system default magic file if no other was specified
if not self.magic_files or self.magic_files is None:
# Append the user's magic file first so that those signatures take precedence
self.magic_files = [
self.config.paths['user'][self.config.BINWALK_MAGIC_FILE],
self.config.paths['system'][self.config.BINWALK_MAGIC_FILE],
]
# Only set the extractor verbosity if told to be very verbose
if self.verbose >= self.VERY_VERBOSE:
extractor_verbose = True
else:
extractor_verbose = False
# Create an instance of the PrettyPrint class, which can be used to print results to screen/file.
self.display = PrettyPrint(log=log, quiet=quiet, verbose=verbose, bwalk=self)
# Create MagicFilter and Extractor class instances. These can be used to:
#
# o Create include/exclude filters
# o Specify file extraction rules to be applied during a scan
#
self.filter = MagicFilter()
self.extractor = Extractor(verbose=extractor_verbose)
# Create SmartSignature and MagicParser class instances. These are mostly for internal use.
self.smart = SmartSignature(self.filter)
self.parser = MagicParser(self.filter, self.smart)
def __del__(self):
'''
Class deconstructor.
'''
self.cleanup()
def cleanup(self):
'''
Cleanup any temporary files generated by the internal instance of MagicParser.
Returns None.
'''
try:
self.parser.cleanup()
except:
pass
def load_signatures(self, magic_files=[], pre_filter_signatures=True, filter_short_signatures=True):
'''
Load signatures from magic file(s).
Called automatically by Binwalk.scan() with all defaults, if not already called manually.
@magic_files - A list of magic files to use (default: self.magic_files).
@pre_filter_signatures - Set to False to disable pre-filtering of signatures before invoking libmagic.
@filter_short_signatures - Set to True to include signatures with short (<= 2 byte) magic strings.
Returns None.
'''
# Disable pre filtering in the smart signature class instance.
# This is also checked by Binwalk.scan() before performing pre-filtering.
self.smart.pre_filter = pre_filter_signatures
# The magic files specified here override any already set
if magic_files and magic_files is not None:
self.magic_files = magic_files
# Parse the magic file(s) and initialize libmagic
self.mfile = self.parser.parse(self.magic_files, filter_short_signatures=filter_short_signatures, pre_filter_signatures=pre_filter_signatures)
self.magic = magic.open(self.flags)
self.magic.load(self.mfile)
def scan(self, target_file, offset=0, length=0, align=DEFAULT_BYTE_ALIGNMENT, show_invalid_results=False, callback=None):
'''
Performs a Binwalk scan on the target file.
@target_file - File to scan.
@offset - Starting offset at which to start the scan.
@length - Number of bytes to scan.
@align - Look for signatures every align bytes.
@show_invalid_results - Set to True to display invalid results.
@callback - Callback function to be invoked when matches are found.
The callback function is passed two arguments: a list of result dictionaries containing the scan results
(one result per dict), and the offset at which those results were identified. Example callback function:
def my_callback(offset, results):
print "Found %d results at offset %d:" % (len(results), offset)
for result in results:
print "\t%s" % result['description']
binwalk.Binwalk(callback=my_callback).scan("firmware.bin")
Upon completion, the scan method returns a sorted list of tuples containing a list of results dictionaries
and the offsets at which those results were identified:
scan_items = [
(0, [{description : "LZMA compressed data..."}]),
(112, [{description : "gzip compressed data..."}])
]
See SmartSignature.parse for a more detailed description of the results dictionary structure.
'''
scan_results = {}
self.total_read = 0
self.total_scanned = 0
self.scan_length = length
self.filter.show_invalid_results = show_invalid_results
# Load the default signatures if self.load_signatures has not already been invoked
if self.magic is None:
self.load_signatures()
# Get a local copy of the signature sets generated by self.parser.build_signature_set.
# This is accessed heavily throughout the scan, and there is less overhead for accessing local variables in Python.
signature_set = self.parser.build_signature_set()
# Need the total size of the target file, even if we aren't scanning the whole thing
fsize = file_size(target_file)
# Open the target file and seek to the specified start offset
fd = open(target_file)
fd.seek(offset)
# If no length was specified, make the length the size of the target file minus the starting offset
if self.scan_length == 0:
self.scan_length = fsize - offset
# Sanity check on the byte alignment; default to 1
if align <= 0:
align = 1
# Main loop, scan through all the data
while True:
i = 0
# Read in the next block of data from the target file and make sure it's valid
(data, dlen) = self._read_block(fd)
if data is None or dlen == 0:
break
# The total number of bytes scanned could be bigger than the total number
# of bytes read from the file under the following circumstances:
#
# o The previous dlen was not a multiple of align
# o A previous result specified a jump offset that was beyond the end of the
# then current data block
#
# If this is the case, we need to index into this data block appropriately in order to
# resume the scan from the appropriate offset, and adjust dlen accordingly.
bufindex = self.total_scanned - self.total_read
if bufindex > 0:
# If the total_scanned > total_read, then the total_scanned offset is in a subsequent block.
# Set i to bufindex, which will cause i to be greater than dlen and this block will be skipped.
i = bufindex
elif bufindex < 0:
# If the total_scanned offset is less than total_read, then the total_scanned offset is
# somewhere inside this block. Set i to index into the block appropriately.
i = dlen + bufindex
else:
# If the total_scanned offset ends at the end of this block, don't scan any of this block
i = dlen
# Scan through each block of data looking for signatures
while i < dlen:
smart = {}
results = []
results_offset = -1
pre_filter_ok = False
smart_jump_done = False
# Pre-filter data by checking to see if the parser thinks this might be a valid match.
# This eliminates unnecessary calls into libmagic, which are very expensive.
#
# Ideally, this should be done in the MagicParser class, but function calls are expensive.
# Doing it here greatly decreases the scan time.
if self.smart.pre_filter:
for (sig_offset, sigset) in signature_set:
if data[i+sig_offset:i+sig_offset+self.parser.MATCH_INDEX_SIZE] in sigset:
pre_filter_ok = True
break
else:
pre_filter_ok = True
if pre_filter_ok:
# Pass the data to libmagic, and split out multiple results into a list
for magic_result in self.parser.split(self.magic.buffer(data[i:i+self.MAX_SIGNATURE_SIZE])):
# Some file names are not NULL byte terminated, but rather their length is
# specified in a size field. To ensure these are not marked as invalid due to
# non-printable characters existing in the file name, parse the filename(s) and
# trim them to the specified filename length, if one was specified.
magic_result = self.smart._parse_raw_strings(magic_result)
# Make sure this is a valid result before further processing
if not self.filter.invalid(magic_result):
# The smart filter parser returns a dictionary of keyword values and the signature description.
smart = self.smart.parse(magic_result)
# Validate the jump value and check if the response description should be displayed
if smart['jump'] > -1 and self._should_display(smart['description']):
# If multiple results are returned and one of them has smart['jump'] set to a non-zero value,
# the calculated results offset will be wrong since i will have been incremented. Only set the
# results_offset value when the first match is encountered.
if results_offset < 0:
results_offset = offset + smart['adjust'] + self.total_scanned
# Double check to make sure the smart['adjust'] value is sane.
# If it makes results_offset negative, then it is not sane.
if results_offset >= 0:
# Extract the result, if it matches one of the extract rules and is not a delayed extract.
if self.extractor.enabled and not (self.extractor.delayed and smart['delay']):
# If the signature did not specify a size, extract to the end of the file.
if smart['size'] == 0:
smart['size'] = fsize-results_offset
smart['extract'] = self.extractor.extract( results_offset,
smart['description'],
target_file,
smart['size'],
name=smart['name'])
# This appears to be a valid result, so append it to the results list.
results.append(smart)
# Jump to the offset specified by jump. Only do this once, so that if multiple results
# are returned each of which specify a jump offset, only the first will be honored.
if smart['jump'] > 0 and not smart_jump_done:
# Once a jump offset has been honored, we need to start scanning every byte since the
# jump offset may have thrown off the original alignment. In terms of speed this is fine,
# since the jump offset usually saves more time anyway. If this is not what the user
# wanted/intended, disabling pre filtering will disable jump offset processing completely.
align = self.DEFAULT_BYTE_ALIGNMENT
smart_jump_done = True
i += (smart['jump'] - align)
self.total_scanned += (smart['jump'] - align)
# Did we find any valid results?
if results_offset >= 0:
scan_results[results_offset] = results
if callback is not None:
callback(results_offset, results)
# Track the number of bytes scanned in this block, and the total number of bytes scanned.
i += align
self.total_scanned += align
# Sort the results before returning them
scan_items = scan_results.items()
scan_items.sort()
# Do delayed extraction, if specified.
if self.extractor.enabled and self.extractor.delayed:
scan_items = self.extractor.delayed_extract(scan_items, target_file, fsize)
return scan_items
def _should_display(self, data):
'''
Determines if a result string should be displayed to the user or not.
@data - Display string.
Returns True if the string should be displayed.
Returns False if the string should not be displayed.
'''
return (data and data is not None and not self.filter.invalid(data) and self.filter.filter(data) != self.filter.FILTER_EXCLUDE)
def _read_block(self, fd):
'''
Reads in a block of data from the target file.
@fd - File object for the target file.
Returns a tuple of (file block data, block data length).
'''
dlen = 0
data = None
# Read in READ_BLOCK_SIZE plus MAX_SIGNATURE_SIZE bytes, but return a max dlen value
# of READ_BLOCK_SIZE. This ensures that there is a MAX_SIGNATURE_SIZE buffer at the
# end of the returned data in case a signature is found at or near data[dlen].
rlen = self.READ_BLOCK_SIZE + self.MAX_SIGNATURE_SIZE
if self.total_read < self.scan_length:
data = fd.read(rlen)
if data and data is not None:
# Get the actual length of the read in data
dlen = len(data)
# If we've read in more data than the scan length, truncate the dlen value
if (self.total_read + dlen) >= self.scan_length:
dlen = self.scan_length - self.total_read
# If dlen is the expected rlen size, it should be set to READ_BLOCK_SIZE
elif dlen == rlen:
dlen = self.READ_BLOCK_SIZE
# Increment self.total_read to reflect the amount of data that has been read
# for processing (actual read size is larger of course, due to the MAX_SIGNATURE_SIZE
# buffer of data at the end of each block).
self.total_read += dlen
# Seek to the self.total_read offset so the next read can pick up where this one left off
fd.seek(self.total_read)
return (data, dlen)
================================================
FILE: src/binwalk-1.0/src/binwalk/common.py
================================================
# Common functions.
import os
import re
def file_size(filename):
'''
Obtains the size of a given file.
@filename - Path to the file.
Returns the size of the file.
'''
# Using open/lseek works on both regular files and block devices
fd = os.open(filename, os.O_RDONLY)
try:
return os.lseek(fd, 0, os.SEEK_END)
except Exception, e:
raise Exception("file_size failed to obtain the size of '%s': %s" % (filename, str(e)))
finally:
os.close(fd)
def str2int(string):
'''
Attempts to convert string to a base 10 integer; if that fails, then base 16.
@string - String to convert to an integer.
Returns the integer value on success.
Throws an exception if the string cannot be converted into either a base 10 or base 16 integer value.
'''
try:
return int(string)
except:
return int(string, 16)
def strip_quoted_strings(string):
'''
Strips out data in between double quotes.
@string - String to strip.
Returns a sanitized string.
'''
# This regex removes all quoted data from string.
# Note that this removes everything in between the first and last double quote.
# This is intentional, as printed (and quoted) strings from a target file may contain
# double quotes, and this function should ignore those. However, it also means that any
# data between two quoted strings (ex: '"quote 1" you won't see me "quote 2"') will also be stripped.
return re.sub(r'\"(.*)\"', "", string)
def get_quoted_strings(string):
'''
Returns a string comprised of all data in between double quotes.
@string - String to get quoted data from.
Returns a string of quoted data on success.
Returns a blank string if no quoted data is present.
'''
try:
# This regex grabs all quoted data from string.
# Note that this gets everything in between the first and last double quote.
# This is intentional, as printed (and quoted) strings from a target file may contain
# double quotes, and this function should ignore those. However, it also means that any
# data between two quoted strings (ex: '"quote 1" non-quoted data "quote 2"') will also be included.
return re.findall(r'\"(.*)\"', string)[0]
except:
return ''
================================================
FILE: src/binwalk-1.0/src/binwalk/config/extract.conf
================================================
#################################################################################################################
# Default extract rules loaded when --extract is specified.
#
# ::
#
# Note that %e is a place holder for the extracted file name.
#################################################################################################################
# Assumes these utilities are installed in $PATH.
gzip compressed data:gz:gzip -d -f '%e'
lzma compressed data:7z:7zr e -y '%e'
bzip2 compressed data:bz2:bzip2 -d -f '%e'
zip archive data:zip:jar xf '%e' # jar does a better job of unzipping than unzip does...
posix tar archive:tar:tar xvf '%e'
# These assume the firmware-mod-kit is installed to /opt/firmware-mod-kit.
# If not, change the file paths appropriately.
squashfs filesystem:squashfs:/opt/firmware-mod-kit/trunk/unsquashfs_all.sh '%e'
jffs2 filesystem:jffs2:/opt/firmware-mod-kit/trunk/src/jffs2/unjffs2 '%e' # requires root
cpio archive:cpio:/opt/firmware-mod-kit/trunk/uncpio.sh '%e'
# Extract, but don't run anything
ext2 filesystem:ext2
romfs filesystem:romfs
cramfs filesystem:cramfs
private key:key
================================================
FILE: src/binwalk-1.0/src/binwalk/config.py
================================================
import os
class Config:
'''
Binwalk configuration class, used for accessing user and system file paths.
After instatiating the class, file paths can be accessed via the self.paths dictionary.
System file paths are listed under the 'system' key, user file paths under the 'user' key.
For example, to get the path to both the user and system binwalk magic files:
from binwalk import Config
conf = Config()
user_binwalk_file = conf.paths['user'][conf.BINWALK_MAGIC_FILE]
system_binwalk_file = conf.paths['system'][conf.BINWALK_MAGIC_FILE]
There is also an instance of this class available via the Binwalk.config object:
import binwalk
bw = binwalk.Binwalk()
user_binwalk_file = bw.config.paths['user'][conf.BINWALK_MAGIC_FILE]
system_binwalk_file = bw.config.paths['system'][conf.BINWALK_MAGIC_FILE]
Valid file names under both the 'user' and 'system' keys are as follows:
o BINWALK_MAGIC_FILE - Path to the default binwalk magic file.
o BINCAST_MAGIC_FILE - Path to the bincast magic file (used when -C is specified with the command line binwalk script)
o BINARCH_MAGIC_FILE - Path to the binarch magic file (used when -A is specified with the command line binwalk script)
o EXTRACT_FILE - Path to the extract configuration file (used when -e is specified with the command line binwalk script)
'''
# Release version
VERSION = "1.0"
# Sub directories
BINWALK_USER_DIR = ".binwalk"
BINWALK_MAGIC_DIR = "magic"
BINWALK_CONFIG_DIR = "config"
# File names
EXTRACT_FILE = "extract.conf"
BINWALK_MAGIC_FILE = "binwalk"
BINCAST_MAGIC_FILE = "bincast"
BINARCH_MAGIC_FILE = "binarch"
def __init__(self):
'''
Class constructor. Enumerates file paths and populates self.paths.
'''
# Path to the user binwalk directory
self.user_dir = self._get_user_dir()
# Path to the system wide binwalk directory
self.system_dir = self._get_system_dir()
# Dictionary of all absolute user/system file paths
self.paths = {
'user' : {},
'system' : {},
}
# Build the paths to all user-specific files
self.paths['user'][self.BINWALK_MAGIC_FILE] = self._user_file(self.BINWALK_MAGIC_DIR, self.BINWALK_MAGIC_FILE)
self.paths['user'][self.BINCAST_MAGIC_FILE] = self._user_file(self.BINWALK_MAGIC_DIR, self.BINCAST_MAGIC_FILE)
self.paths['user'][self.BINARCH_MAGIC_FILE] = self._user_file(self.BINWALK_MAGIC_DIR, self.BINARCH_MAGIC_FILE)
self.paths['user'][self.EXTRACT_FILE] = self._user_file(self.BINWALK_CONFIG_DIR, self.EXTRACT_FILE)
# Build the paths to all system-wide files
self.paths['system'][self.BINWALK_MAGIC_FILE] = self._system_file(self.BINWALK_MAGIC_DIR, self.BINWALK_MAGIC_FILE)
self.paths['system'][self.BINCAST_MAGIC_FILE] = self._system_file(self.BINWALK_MAGIC_DIR, self.BINCAST_MAGIC_FILE)
self.paths['system'][self.BINARCH_MAGIC_FILE] = self._system_file(self.BINWALK_MAGIC_DIR, self.BINARCH_MAGIC_FILE)
self.paths['system'][self.EXTRACT_FILE] = self._system_file(self.BINWALK_CONFIG_DIR, self.EXTRACT_FILE)
def _get_system_dir(self):
'''
Find the directory where the binwalk module is installed on the system.
'''
try:
root = __file__
if os.path.islink(root):
root = os.path.realpath(root)
return os.path.dirname(os.path.abspath(root))
except:
return ''
def _get_user_dir(self):
'''
Get the user's home directory.
'''
try:
# This should work in both Windows and Unix environments
return os.getenv('USERPROFILE') or os.getenv('HOME')
except:
return ''
def _file_path(self, dirname, filename):
'''
Builds an absolute path and creates the directory and file if they don't already exist.
@dirname - Directory path.
@filename - File name.
Returns a full path of 'dirname/filename'.
'''
if not os.path.exists(dirname):
try:
os.makedirs(dirname)
except:
pass
fpath = os.path.join(dirname, filename)
if not os.path.exists(fpath):
try:
open(fpath, "w").close()
except:
pass
return fpath
def _user_file(self, subdir, basename):
'''
Gets the full path to the 'subdir/basename' file in the user binwalk directory.
@subdir - Subdirectory inside the user binwalk directory.
@basename - File name inside the subdirectory.
Returns the full path to the 'subdir/basename' file.
'''
return self._file_path(os.path.join(self.user_dir, self.BINWALK_USER_DIR, subdir), basename)
def _system_file(self, subdir, basename):
'''
Gets the full path to the 'subdir/basename' file in the system binwalk directory.
@subdir - Subdirectory inside the system binwalk directory.
@basename - File name inside the subdirectory.
Returns the full path to the 'subdir/basename' file.
'''
return self._file_path(os.path.join(self.system_dir, subdir), basename)
================================================
FILE: src/binwalk-1.0/src/binwalk/extractor.py
================================================
import os
import sys
import shlex
import tempfile
import subprocess
from config import *
from common import file_size
class Extractor:
'''
Extractor class, responsible for extracting files from the target file and executing external applications, if requested.
An instance of this class is accessible via the Binwalk.extractor object.
Example usage:
import binwalk
bw = binwalk.Binwalk()
# Create extraction rules for scan results containing the string 'gzip compressed data' and 'filesystem'.
# The former will be saved to disk with a file extension of 'gz' and the command 'gunzip ' will be executed (note the %e placeholder).
# The latter will be saved to disk with a file extension of 'fs' and no command will be executed.
# These rules will take precedence over subsequent rules with the same match string.
bw.extractor.add_rule(['gzip compressed data:gz:gunzip %e', 'filesystem:fs'])
# Load the extraction rules from the default extract.conf file(s).
bw.extractor.load_defaults()
# Run the binwalk scan.
bw.scan('firmware.bin')
'''
# Extract rules are delimited with a colon.
# :[:]
RULE_DELIM = ':'
# Comments in the extract.conf files start with a pound
COMMENT_DELIM ='#'
# Place holder for the extracted file name in the command
FILE_NAME_PLACEHOLDER = '%e'
def __init__(self, verbose=False):
'''
Class constructor.
@verbose - Set to True to display the output from any executed external applications.
Returns None.
'''
self.config = Config()
self.enabled = False
self.delayed = False
self.verbose = verbose
self.extract_rules = {}
self.remove_after_execute = False
def add_rule(self, rule):
'''
Adds a set of rules to the extraction rule list.
@rule - Rule string, or list of rule strings, in the format :[:]
Returns None.
'''
r = {
'extension' : '',
'cmd' : ''
}
if type(rule) != type([]):
rules = [rule]
else:
rules = rule
for rule in rules:
r['cmd'] = ''
r['extension'] = ''
try:
values = self._parse_rule(rule)
match = values[0].lower()
r['extension'] = values[1]
r['cmd'] = values[2]
except:
pass
# Verify that the match string and file extension were retrieved.
# Only add the rule if it is a new one (first come, first served).
if match and r['extension'] and not self.extract_rules.has_key(match):
self.extract_rules[match] = {}
self.extract_rules[match]['cmd'] = r['cmd']
self.extract_rules[match]['extension'] = r['extension']
# Once any rule is added, set self.enabled to True
self.enabled = True
def enable_delayed_extract(self, tf=None):
'''
Enables / disables the delayed extraction feature.
This feature ensures that certian supported file types will not contain extra data at the end of the
file when they are extracted, but also means that these files will not be extracted until the end of the scan.
@tf - Set to True to enable, False to disable.
Returns the current delayed extraction setting.
'''
if tf is not None:
self.delayed = tf
return self.delayed
def load_from_file(self, fname):
'''
Loads extraction rules from the specified file.
@fname - Path to the extraction rule file.
Returns None.
'''
try:
# Process each line from the extract file, ignoring comments
for rule in open(fname).readlines():
self.add_rule(rule.split(self.COMMENT_DELIM, 1)[0])
except Exception, e:
raise Exception("Extractor.load_from_file failed to load file '%s': %s" % (fname, str(e)))
def load_defaults(self):
'''
Loads default extraction rules from the user and system extract.conf files.
Returns None.
'''
# Load the user extract file first to ensure its rules take precedence.
extract_files = [
self.config.paths['user'][self.config.EXTRACT_FILE],
self.config.paths['system'][self.config.EXTRACT_FILE],
]
for extract_file in extract_files:
try:
self.load_from_file(extract_file)
except Exception, e:
if self.verbose:
raise Exception("Extractor.load_defaults failed to load file '%s': %s" % (extract_file, str(e)))
def cleanup_extracted_files(self, tf=None):
'''
Set the action to take after a file is extracted.
@tf - If set to True, extracted files will be cleaned up after running a command against them.
If set to False, extracted files will not be cleaned up after running a command against them.
If set to None or not specified, the current setting will not be changed.
Returns the current cleanup status (True/False).
'''
if tf is not None:
self.remove_after_execute = tf
return self.remove_after_execute
def extract(self, offset, description, file_name, size, name=None):
'''
Extract an embedded file from the target file, if it matches an extract rule.
Called automatically by Binwalk.scan().
@offset - Offset inside the target file to begin the extraction.
@description - Description of the embedded file to extract, as returned by libmagic.
@file_name - Path to the target file.
@size - Number of bytes to extract.
@name - Name to save the file as.
Returns the name of the extracted file (blank string if nothing was extracted).
'''
cleanup_extracted_fname = True
rule = self._match(description)
if rule is not None:
fname = self._dd(file_name, offset, size, rule['extension'], output_file_name=name)
if rule['cmd']:
# Many extraction utilities will extract the file to a new file, just without
# the file extension (i.e., myfile.7z => myfile). If the presumed resulting
# file name already exists before executing the extract command, do not attempt
# to clean it up even if its resulting file size is 0.
if self.remove_after_execute:
extracted_fname = os.path.splitext(fname)[0]
if os.path.exists(extracted_fname):
cleanup_extracted_fname = False
# Execute the specified command against the extracted file
self._execute(rule['cmd'], fname)
# Only clean up files if remove_after_execute was specified
if self.remove_after_execute:
# Remove the original file that we extracted
try:
os.unlink(fname)
except:
pass
# If the command worked, assume it removed the file extension from the extracted file
# If the extracted file name file exists and is empty, remove it
if cleanup_extracted_fname and os.path.exists(extracted_fname) and file_size(extracted_fname) == 0:
try:
os.unlink(extracted_fname)
except:
pass
else:
fname = ''
return fname
def delayed_extract(self, results, file_name, size):
'''
Performs a delayed extraction (see self.enable_delayed_extract).
Called internally by Binwalk.Scan().
@results - A list of dictionaries of all the scan results.
@file_name - The path to the scanned file.
@size - The size of the scanned file.
Returns an updated results list containing the names of the newly extracted files.
'''
index = 0
info_count = 0
nresults = results
for (offset, infos) in results:
info_count = 0
for info in infos:
ninfos = infos
if info['delay']:
end_offset = self._entry_offset(index, results, info['delay'])
if end_offset == -1:
extract_size = size
else:
extract_size = (end_offset - offset)
ninfos[info_count]['extract'] = self.extract(offset, info['description'], file_name, extract_size, info['name'])
nresults[index] = (offset, ninfos)
info_count += 1
index += 1
return nresults
def _entry_offset(self, index, entries, description):
'''
Gets the offset of the first entry that matches the description.
@index - Index into the entries list to begin searching.
@entries - Dictionary of result entries.
@description - Case insensitive description.
Returns the offset, if a matching description is found.
Returns -1 if a matching description is not found.
'''
description = description.lower()
for (offset, infos) in entries[index:]:
for info in infos:
if info['description'].lower().startswith(description):
return offset
return -1
def _match(self, description):
'''
Check to see if the provided description string matches an extract rule.
Called internally by self.extract().
@description - Description string to check.
Returns the associated rule dictionary if a match is found.
Returns None if no match is found.
'''
description = description.lower()
for (m, rule) in self.extract_rules.iteritems():
if m in description:
return rule
return None
def _parse_rule(self, rule):
'''
Parses an extraction rule.
@rule - Rule string.
Returns an array of ['', '', ''].
'''
return rule.strip().split(self.RULE_DELIM, 2)
def _dd(self, file_name, offset, size, extension, output_file_name=None):
'''
Extracts a file embedded inside the target file.
@file_name - Path to the target file.
@offset - Offset inside the target file where the embedded file begins.
@size - Number of bytes to extract.
@extension - The file exension to assign to the extracted file on disk.
@output_file_name - The requested name of the output file.
Returns the extracted file name.
'''
# Default extracted file name is .
altname = "%X.%s" % (offset, extension)
if not output_file_name or output_file_name is None:
fname = altname
else:
fname = "%s.%s" % (output_file_name, extension)
# Sanitize output file name of invalid/dangerous characters (like file paths)
fname = os.path.basename(fname)
try:
# Open the target file and seek to the offset
fdin = open(file_name, "rb")
fdin.seek(offset)
# Open the extracted file
try:
fdout = open(fname, "wb")
except:
# Fall back to the alternate name if the requested name fails
fname = altname
fdout = open(fname, "wb")
# Read size bytes from target file and write it to the extracted file
fdout.write(fdin.read(size))
# Cleanup
fdout.close()
fdin.close()
except Exception, e:
raise Exception("Extractor.dd failed to extract data from '%s' to '%s': %s" % (file_name, fname, str(e)))
return fname
def _execute(self, cmd, fname):
'''
Execute a command against the specified file.
@cmd - Command to execute.
@fname - File to run command against.
Returns None.
'''
tmp = None
# If not in verbose mode, create a temporary file to redirect stdout and stderr to
if not self.verbose:
tmp = tempfile.TemporaryFile()
try:
# Replace all instances of FILE_NAME_PLACEHOLDER in the command with fname
cmd = cmd.replace(self.FILE_NAME_PLACEHOLDER, fname)
# Execute.
subprocess.call(shlex.split(cmd), stdout=tmp, stderr=tmp)
except Exception, e:
sys.stderr.write("WARNING: Extractor.execute failed to run '%s': %s\n" % (cmd, str(e)))
if tmp is not None:
tmp.close()
================================================
FILE: src/binwalk-1.0/src/binwalk/filter.py
================================================
import common
from smartsig import SmartSignature
class MagicFilter:
'''
Class to filter libmagic results based on include/exclude rules and false positive detection.
An instance of this class is available via the Binwalk.filter object.
Example code which creates include, exclude, and grep filters before running a Binwalk scan:
import binwalk
bw = binwalk.Binwalk()
# Include all signatures whose descriptions contain the string 'filesystem' in the first line of the signature, even if those signatures are normally excluded.
# Note that if exclusive=False was specified, this would merely add these signatures to the default signatures.
# Since exclusive=True (the default) has been specified, ONLY those matching signatures will be loaded; all others will be ignored.
bw.filter.include('filesystem')
# Exclude all signatures whose descriptions contain the string 'jffs2', even if those signatures are normally included.
# In this case, we are now searching for all filesystem signatures, except JFFS2.
bw.filter.exclude('jffs2')
# Add a grep filter. Unlike the include and exclude filters, it does not affect which results are returned by Binwalk.scan(), but it does affect which results
# are printed by Binwalk.display.results(). This is particularly useful for cases like the bincast scan, where multiple lines of results are returned per offset,
# but you only want certian ones displayed. In this case, only file systems whose description contain the string '2012' will be displayed.
bw.filter.grep(filters=['2012'])
bw.scan('firmware.bin')
'''
# If the result returned by libmagic is "data" or contains the text
# 'invalid' or a backslash are known to be invalid/false positives.
DATA_RESULT = "data"
INVALID_RESULTS = ["invalid", "\\"]
INVALID_RESULT = "invalid"
NON_PRINTABLE_RESULT = "\\"
FILTER_INCLUDE = 0
FILTER_EXCLUDE = 1
def __init__(self, show_invalid_results=False):
'''
Class constructor.
@show_invalid_results - Set to True to display results marked as invalid.
Returns None.
'''
self.filters = []
self.grep_filters = []
self.show_invalid_results = show_invalid_results
self.exclusive_filter = False
self.smart = SmartSignature(self)
def include(self, match, exclusive=True):
'''
Adds a new filter which explicitly includes results that contain
the specified matching text.
@match - Case insensitive text, or list of texts, to match.
@exclusive - If True, then results that do not explicitly contain
a FILTER_INCLUDE match will be excluded. If False,
signatures that contain the FILTER_INCLUDE match will
be included in the scan, but will not cause non-matching
results to be excluded.
Returns None.
'''
include_filter = {
'type' : self.FILTER_INCLUDE,
'filter' : ''
}
if type(match) != type([]):
matches = [match]
else:
matches = match
for m in matches:
if m:
if exclusive and not self.exclusive_filter:
self.exclusive_filter = True
include_filter['filter'] = m.lower()
self.filters.append(include_filter)
def exclude(self, match):
'''
Adds a new filter which explicitly excludes results that contain
the specified matching text.
@match - Case insensitive text, or list of texts, to match.
Returns None.
'''
exclude_filter = {
'type' : self.FILTER_EXCLUDE,
'filter' : ''
}
if type(match) != type([]):
matches = [match]
else:
matches = match
for m in matches:
if m:
exclude_filter['filter'] = m.lower()
self.filters.append(exclude_filter)
def filter(self, data):
'''
Checks to see if a given string should be excluded from or included in the results.
Called internally by Binwalk.scan().
@data - String to check.
Returns FILTER_INCLUDE if the string should be included.
Returns FILTER_EXCLUDE if the string should be excluded.
'''
data = data.lower()
# Loop through the filters to see if any of them are a match.
# If so, return the registered type for the matching filter (FILTER_INCLUDE | FILTER_EXCLUDE).
for f in self.filters:
if f['filter'] in data:
return f['type']
# If there was not explicit match and exclusive filtering is enabled, return FILTER_EXCLUDE.
if self.exclusive_filter:
return self.FILTER_EXCLUDE
return self.FILTER_INCLUDE
def invalid(self, data):
'''
Checks if the given string contains invalid data.
Called internally by Binwalk.scan().
@data - String to validate.
Returns True if data is invalid, False if valid.
'''
# A result of 'data' is never ever valid.
if data == self.DATA_RESULT:
return True
# If showing invalid results, just return False.
if self.show_invalid_results:
return False
# Don't include quoted strings or keyword arguments in this search, as
# strings from the target file may legitimately contain the INVALID_RESULT text.
if self.INVALID_RESULT in common.strip_quoted_strings(self.smart._strip_tags(data)):
return True
# There should be no non-printable data in any of the data
if self.NON_PRINTABLE_RESULT in data:
return True
return False
def grep(self, data=None, filters=[]):
'''
Add or check case-insensitive grep filters against the supplied data string.
@data - Data string to check grep filters against. Not required if filters is specified.
@filters - Filter, or list of filters, to add to the grep filters list. Not required if data is specified.
Returns None if data is not specified.
If data is specified, returns True if the data contains a grep filter, or if no grep filters exist.
If data is specified, returns False if the data does not contain any grep filters.
'''
# Add any specified filters to self.grep_filters
if filters:
if type(filters) != type([]):
gfilters = [filters]
else:
gfilters = filters
for gfilter in gfilters:
# Filters are case insensitive
self.grep_filters.append(gfilter.lower())
# Check the data against all grep filters until one is found
if data is not None:
# If no grep filters have been created, always return True
if not self.grep_filters:
return True
# Filters are case insensitive
data = data.lower()
# If a filter exists in data, return True
for gfilter in self.grep_filters:
if gfilter in data:
return True
# Else, return False
return False
return None
def clear(self):
'''
Clears all include, exclude and grep filters.
Retruns None.
'''
self.filters = []
self.grep_filters = []
================================================
FILE: src/binwalk-1.0/src/binwalk/magic/binarch
================================================
# MIPS prologue
# addiu $sp, -XX
# 27 BD FF XX
1 string \377\275\47 MIPSEL function prologue
0 string \47\275\377 MIPS function prologue
# MIPS epilogue
# jr $ra
0 belong 0x03e00008 MIPS function epilogue
0 lelong 0x03e00008 MIPSEL function epilogue
# PowerPC epilogue
# blr
0 belong 0x4E800020 PowerPC big endian function epilogue
0 lelong 0x4E800020 PowerPC little endian function epilogue
# ARM prologue
# STMFD SP!, {XX}
0 beshort 0xE92D ARMEB function prologue
2 leshort 0xE92D ARM function prologue
# ARM epilogue
# LDMFD SP!, {XX}
0 beshort 0xE8BD ARMEB function epilogue
2 leshort 0xE8BD ARM function epilogue
# x86 epilogue
# push ebp
# move ebp, esp
0 string \x55\x89\xE5 Intel x86 function epilogue
================================================
FILE: src/binwalk-1.0/src/binwalk/magic/bincast
================================================
0 belong x Hex: 0x%.8X
#0 string x String: %s
0 lelong x Little Endian Long: %d
0 belong x Big Endian Long: %d
0 leshort x Little Endian Short: %d
0 beshort x Big Endian Short: %d
0 ledate x Little Endian Date: %s
0 bedate x Big Endian Date: %s
================================================
FILE: src/binwalk-1.0/src/binwalk/magic/binwalk
================================================
# ----------------------------Archive Formats--------------------------------------
# POSIX tar archives
0 string ustar\000 POSIX tar archive{offset-adjust:-257}
0 string ustar\040\040\000 POSIX tar archive (GNU){offset-adjust:-257}
# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
0 string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data{offset-adjust:-14}
0 string JARCS JAR (ARJ Software, Inc.) archive data
# ARJ archiver (jason@jarthur.Claremont.EDU)
0 leshort 0xea60 ARJ archive data
>5 byte x \b, v%d,
>8 byte &0x04 multi-volume,
>8 byte &0x10 slash-switched,
>8 byte &0x20 backup,
>34 string x original name: "%s",
>7 byte 0 os: MS-DOS
>7 byte 1 os: PRIMOS
>7 byte 2 os: Unix
>7 byte 3 os: Amiga
>7 byte 4 os: Macintosh
>7 byte 5 os: OS/2
>7 byte 6 os: Apple ][ GS
>7 byte 7 os: Atari ST
>7 byte 8 os: NeXT
>7 byte 9 os: VAX/VMS
>3 byte >0 %d]
# RAR archiver (Greg Roelofs, newt@uchicago.edu)
0 string Rar! RAR archive data
# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
0 string HPAK HPACK archive data
# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
0 string \351,\001JAM JAM archive
# LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
0 string -lzs- LHa 2.x? archive data [lzs] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh\40- LHa 2.x? archive data [lh ] [NSRL|LHA2]{offset-adjust:-2}
0 string -lhd- LHa 2.x? archive data [lhd] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh2- LHa 2.x? archive data [lh2] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh3- LHa 2.x? archive data [lh3] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh4- LHa (2.x) archive data [lh4] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh5- LHa (2.x) archive data [lh5] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh6- LHa (2.x) archive data [lh6] [NSRL|LHA2]{offset-adjust:-2}
0 string -lh7- LHa (2.x) archive data [lh7] [NSRL|LHA2]{offset-adjust:-2}
# cpio archives
#
# The SVR4 "cpio(4)" hints that there are additional formats, but they
# are defined as "short"s; I think all the new formats are
# character-header formats and thus are strings, not numbers.
#0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
0 string 070701 ASCII cpio archive (SVR4 with no CRC),
>110 byte 0 invalid
>110 string x file name: "%s"
>54 string x {jump-to-offset:0x%.8s+112}
0 string 070702 ASCII cpio archive (SVR4 with CRC)
>110 byte 0 invalid
>110 string x file name: "%s"
>54 string x {jump-to-offset:0x%.8s+112}
# HP Printer Job Language
# The header found on Win95 HP plot files is the "Silliest Thing possible"
# (TM)
# Every driver puts the language at some random position, with random case
# (LANGUAGE and Language)
# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
# From: Uwe Bonnes
#
0 string \033%-12345X@PJL HP Printer Job Language data
>&0 string >\0 "%s"
>>&0 string >\0 "%s"
>>>&0 string >\0 "%s"
>>>>&0 string >\0 "%s"
#------------------------------------------------------------------------------
#
# RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com)
#
0 belong 0xedabeedb RPM
>4 byte x v%d
>6 beshort 0 bin
>6 beshort 1 src
>8 beshort 1 i386
>8 beshort 2 Alpha
>8 beshort 3 Sparc
>8 beshort 4 MIPS
>8 beshort 5 PowerPC
>8 beshort 6 68000
>8 beshort 7 SGI
>8 beshort 8 RS6000
>8 beshort 9 IA64
>8 beshort 10 Sparc64
>8 beshort 11 MIPSel
>8 beshort 12 ARM
>10 string x "%s"
#---------------------------Bootloaders--------------------------------
# CFE bootloader
0 string CFE1CFE1 CFE boot loader, little endian
0 string 1EFC1EFC CFE boot loader, big endian
#------------------Compression Formats-----------------------------
# AFX compressed files (Wolfram Kleff)
0 string -afx- AFX compressed file data{offset-adjust:-2}
# bzip2
0 string BZh91AY&SY bzip2 compressed data, block size = 900k
0 string BZh81AY&SY bzip2 compressed data, block size = 800k
0 string BZh71AY&SY bzip2 compressed data, block size = 700k
0 string BZh61AY&SY bzip2 compressed data, block size = 600k
0 string BZh51AY&SY bzip2 compressed data, block size = 500k
0 string BZh41AY&SY bzip2 compressed data, block size = 400k
0 string BZh31AY&SY bzip2 compressed data, block size = 300k
0 string BZh21AY&SY bzip2 compressed data, block size = 200k
0 string BZh11AY&SY bzip2 compressed data, block size = 100k
# lzop from
0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data
>9 beshort <0x0940
>>9 byte&0xf0 =0x00 - version 0.
>>9 beshort&0x0fff x \b%03x,
>>13 byte 1 LZO1X-1,
>>13 byte 2 LZO1X-1(15),
>>13 byte 3 LZO1X-999,
## >>22 bedate >0 last modified: %s,
>>14 byte =0x00 os: MS-DOS
>>14 byte =0x01 os: Amiga
>>14 byte =0x02 os: VMS
>>14 byte =0x03 os: Unix
>>14 byte =0x05 os: Atari
>>14 byte =0x06 os: OS/2
>>14 byte =0x07 os: MacOS
>>14 byte =0x0A os: Tops/20
>>14 byte =0x0B os: WinNT
>>14 byte =0x0E os: Win32
>9 beshort >0x0939
>>9 byte&0xf0 =0x00 - version 0.
>>9 byte&0xf0 =0x10 - version 1.
>>9 byte&0xf0 =0x20 - version 2.
>>9 beshort&0x0fff x \b%03x,
>>15 byte 1 LZO1X-1,
>>15 byte 2 LZO1X-1(15),
>>15 byte 3 LZO1X-999,
## >>25 bedate >0 last modified: %s,
>>17 byte =0x00 os: MS-DOS
>>17 byte =0x01 os: Amiga
>>17 byte =0x02 os: VMS
>>17 byte =0x03 os: Unix
>>17 byte =0x05 os: Atari
>>17 byte =0x06 os: OS/2
>>17 byte =0x07 os: MacOS
>>17 byte =0x0A os: Tops/20
>>17 byte =0x0B os: WinNT
>>17 byte =0x0E os: Win32
# lzip
0 string LZIP lzip compressed data
>4 byte x \b, version: %d
# LZO
0 string \211LZO\000\015\012\032\012 LZO compressed data
# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
# http://www.7-zip.org or DOC/7zFormat.txt
#
0 string 7z\274\257\047\034 7-zip archive data,
>6 byte x version %d
>7 byte x \b.%d
# standard unix compress
0 beshort 0x1f9d compress'd data
>2 byte&0x80 >0 block compressed
>2 byte&0x1f !16 invalid
>2 byte&0x1f x %d bits
# http://tukaani.org/xz/xz-file-format.txt
0 string \xFD\x37\x7a\x58\x5a\x00 xz compressed data
# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
# Edited by Chris Chittleborough , March 2002
# * Original filename is only at offset 10 if "extra field" absent
# * Produce shorter output - notably, only report compression methods
# other than 8 ("deflate", the only method defined in RFC 1952).
0 string \037\213\x08 gzip compressed data
>3 byte &0x01 \b, ASCII
>3 byte &0x02 \b, has CRC
>3 byte &0x04 \b, extra field
>3 byte&0xC =0x08
>>10 string x \b{file-name:%s}
>>10 string x \b, was "%s"
>3 byte &0x10 \b, has comment
>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
>9 byte =0x01 \b, from Amiga
>9 byte =0x02 \b, from VMS
>9 byte =0x03 \b, from Unix
>9 byte =0x04 \b, from VM/CMS
>9 byte =0x05 \b, from Atari
>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT)
>9 byte =0x07 \b, from MacOS
>9 byte =0x08 \b, from Z-System
>9 byte =0x09 \b, from CP/M
>9 byte =0x0A \b, from TOPS/20
>9 byte =0x0B \b, from NTFS filesystem (NT)
>9 byte =0x0C \b, from QDOS
>9 byte =0x0D \b, from Acorn RISCOS
>9 byte >0x0D \b, invalid source
>9 byte <0 \b, invalid source
>3 byte &0x20 \b, encrypted (invalid)
# Dates before 1992 are invalid, unless of course you're DD-WRT in which
# case you don't know how to set a date in your gzip files. Brilliant.
>4 lelong =0 \b, NULL date:
>4 lelong <0 \b, invalid date:
>4 lelong >0
>>4 lelong <694224000 \b, invalid date:
>>4 lelong =694224000 \b, invalid date:
>>4 lelong >694224000 \b, last modified:
>4 ledate x %s
>8 byte 2 \b, max compression
>8 byte 4 \b, max speed
# Zlib signatures
0 beshort 0x789C zlib compressed data
0 beshort 0x78DA zlib compressed data
0 beshort 0x7801 zlib compressed data
# Supplementary magic data for the file(1) command to support
# rzip(1). The format is described in magic(5).
#
# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with
# this file.
#
0 string RZIP rzip compressed data
>4 byte x - version %d
>5 byte x \b.%d
>6 belong x (%d bytes)
# ZIP compression (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004 Zip archive data,
>4 byte 0x00 v0.0
>4 byte 0x09 at least v0.9 to extract,
>4 byte 0x0a at least v1.0 to extract,
>4 byte 0x0b at least v1.1 to extract,
>0x161 string WINZIP WinZIP self-extracting,
>4 byte 0x14
>>30 ubelong !0x6d696d65 at least v2.0 to extract,
>18 lelong !0
>>18 lelong <0 invalid
>>18 lelong x compressed size: %d,
>22 lelong !0
>>22 lelong <0 invalid
>>22 lelong x uncompressed size: %d,{extract-delay:end of zip archive}
>30 string x {file-name:{raw-replace}}name: {raw-replace}
>26 leshort x {raw-string-length:%d}
>30 string x {raw-string:%s
>61 string x \b%s
>92 string x \b%s
>123 string x \b%s
>154 string x \b%s}
# ZIP footer
0 string PK\x05\x06 End of Zip archive
>20 leshort x {offset-adjust:22+%d}
>20 leshort >0
>>20 leshort x \b, comment: {raw-replace}
>>20 leshort x {raw-string-length:%d}
>>22 string x {raw-string:%s}
# New LZMA format signature
0 string \xFFLZMA\x00 LZMA compressed data (new),
>6 byte&0x10 0 single-block stream
>6 byte&0x10 0x10 multi-block stream
# See lzma file for LZMA signatures
# Type: OpenSSL certificates/key files
# From: Nicolas Collignon
0 string -----BEGIN\x20CERTIFICATE----- PEM certificate
0 string -----BEGIN\x20CERTIFICATE\x20REQ PEM certificate request
0 string -----BEGIN\x20RSA\x20PRIVATE PEM RSA private key
0 string -----BEGIN\x20DSA\x20PRIVATE PEM DSA private key
# Type: OpenSSH key files
# From: Nicolas Collignon
0 string SSH\x20PRIVATE\x20KEY OpenSSH RSA1 private key,
>28 string >\0 version "%s"
0 string ssh-dss\x20 OpenSSH DSA public key
0 string ssh-rsa\x20 OpenSSH RSA public key
# Type: Certificates/key files in DER format
# From: Gert Hulselmans
0 string \x30\x82 Private key in DER format (PKCS#8),
>4 string !\x02\x01\x00 invalid,
>>2 beshort x header length: 4, sequence length: %d
0 string \x30\x82 Certificate in DER format (x509 v3),
>4 string !\x30\x82 invalid,
>>2 beshort x header length: 4, sequence length: %d
# GnuPG
# The format is very similar to pgp
0 string \001gpg GPG key trust database
>4 byte x version %d
0 beshort 0x9901 GPG key public ring
# This magic is not particularly good, as the keyrings don't have true
# magic. Nevertheless, it covers many keyrings.
#------------------------------------------------------------------------------
# Mavroyanopoulos Nikos
# mcrypt: file(1) magic for mcrypt 2.2.x;
0 string \0m\3 mcrypt 2.5 encrypted data,
>4 byte 0 invalid
>4 string >\0 algorithm: "%s",
>>&1 leshort <1 invalid
>>&1 leshort >0 keysize: %d bytes,
>>>&0 byte 0 invalid
>>>&0 string >\0 mode: "%s",
0 string \0m\2 mcrypt 2.2 encrypted data,
>3 byte 0 algorithm: blowfish-448,
>3 byte 1 algorithm: DES,
>3 byte 2 algorithm: 3DES,
>3 byte 3 algorithm: 3-WAY,
>3 byte 4 algorithm: GOST,
>3 byte 6 algorithm: SAFER-SK64,
>3 byte 7 algorithm: SAFER-SK128,
>3 byte 8 algorithm: CAST-128,
>3 byte 9 algorithm: xTEA,
>3 byte 10 algorithm: TWOFISH-128,
>3 byte 11 algorithm: RC2,
>3 byte 12 algorithm: TWOFISH-192,
>3 byte 13 algorithm: TWOFISH-256,
>3 byte 14 algorithm: blowfish-128,
>3 byte 15 algorithm: blowfish-192,
>3 byte 16 algorithm: blowfish-256,
>3 byte 100 algorithm: RC6,
>3 byte 101 algorithm: IDEA,
>3 byte <0 invalid algorithm
>3 byte >101 invalid algorithm,
>3 byte >16
>>3 byte <100 invalid algorithm,
>4 byte 0 mode: CBC,
>4 byte 1 mode: ECB,
>4 byte 2 mode: CFB,
>4 byte 3 mode: OFB,
>4 byte 4 mode: nOFB,
>4 byte <0 invalid mode,
>4 byte >4 invalid mode,
>5 byte 0 keymode: 8bit
>5 byte 1 keymode: 4bit
>5 byte 2 keymode: SHA-1 hash
>5 byte 3 keymode: MD5 hash
>5 byte <0 invalid keymode
>5 byte >3 invalid keymode
#------------------------------------------------------------------------------
# pgp: file(1) magic for Pretty Good Privacy
#
#0 beshort 0x9900 PGP key public ring
#0 beshort 0x9501 PGP key security ring
#0 beshort 0x9500 PGP key security ring
#0 beshort 0xa600 PGP encrypted data
0 string -----BEGIN\040PGP PGP armored data
>15 string PUBLIC\040KEY\040BLOCK- public key block
>15 string MESSAGE- message
>15 string SIGNED\040MESSAGE- signed message
>15 string PGP\040SIGNATURE- signature
#------------------Standard file formats------------------------------------
#------------------------------------------------------------------------------
# elf: file(1) magic for ELF executables
#
# We have to check the byte order flag to see what byte order all the
# other stuff in the header is in.
#
# What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
#
# updated by Daniel Quinlan (quinlan@yggdrasil.com)
0 string \177ELF ELF
>4 byte 0 invalid class
>4 byte 1 32-bit
# only for MIPS - in the future, the ABI field of e_flags should be used.
>>18 leshort 8
>>>36 lelong &0x20 N32
>>18 leshort 10
>>>36 lelong &0x20 N32
>>18 beshort 8
>>>36 belong &0x20 N32
>>18 beshort 10
>>>36 belong &0x20 N32
>4 byte 2 64-bit
>5 byte 0 invalid byte order
>5 byte 1 LSB
# The official e_machine number for MIPS is now #8, regardless of endianness.
# The second number (#10) will be deprecated later. For now, we still
# say something if #10 is encountered, but only gory details for #8.
>>18 leshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 lelong&0xf0000000 0x00000000 MIPS-I
>>>>36 lelong&0xf0000000 0x10000000 MIPS-II
>>>>36 lelong&0xf0000000 0x20000000 MIPS-III
>>>>36 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>36 lelong&0xf0000000 0x40000000 MIPS-V
>>>>36 lelong&0xf0000000 0x60000000 MIPS32
>>>>36 lelong&0xf0000000 0x70000000 MIPS64
>>>>36 lelong&0xf0000000 0x80000000 MIPS32 rel2
>>>>36 lelong&0xf0000000 0x90000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 lelong&0xf0000000 0x00000000 MIPS-I
>>>>48 lelong&0xf0000000 0x10000000 MIPS-II
>>>>48 lelong&0xf0000000 0x20000000 MIPS-III
>>>>48 lelong&0xf0000000 0x30000000 MIPS-IV
>>>>48 lelong&0xf0000000 0x40000000 MIPS-V
>>>>48 lelong&0xf0000000 0x60000000 MIPS32
>>>>48 lelong&0xf0000000 0x70000000 MIPS64
>>>>48 lelong&0xf0000000 0x80000000 MIPS32 rel2
>>>>48 lelong&0xf0000000 0x90000000 MIPS64 rel2
>>16 leshort 0 no file type,
>>16 leshort 1 relocatable,
>>16 leshort 2 executable,
>>16 leshort 3 shared object,
# Core handling from Peter Tobias
# corrections by Christian 'Dr. Disk' Hechelmann
>>16 leshort 4 core file
# Core file detection is not reliable.
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) lelong >0 (signal %d),
>>16 leshort &0xff00 processor-specific,
>>18 leshort 0 no machine,
>>18 leshort 1 AT&T WE32100 - invalid byte order,
>>18 leshort 2 SPARC - invalid byte order,
>>18 leshort 3 Intel 80386,
>>18 leshort 4 Motorola
>>>36 lelong &0x01000000 68000 - invalid byte order,
>>>36 lelong &0x00810000 CPU32 - invalid byte order,
>>>36 lelong 0 68020 - invalid byte order,
>>18 leshort 5 Motorola 88000 - invalid byte order,
>>18 leshort 6 Intel 80486,
>>18 leshort 7 Intel 80860,
>>18 leshort 8 MIPS,
>>18 leshort 9 Amdahl - invalid byte order,
>>18 leshort 10 MIPS (deprecated),
>>18 leshort 11 RS6000 - invalid byte order,
>>18 leshort 15 PA-RISC - invalid byte order,
>>>50 leshort 0x0214 2.0
>>>48 leshort &0x0008 (LP64),
>>18 leshort 16 nCUBE,
>>18 leshort 17 Fujitsu VPP500,
>>18 leshort 18 SPARC32PLUS,
>>18 leshort 20 PowerPC,
>>18 leshort 22 IBM S/390,
>>18 leshort 36 NEC V800,
>>18 leshort 37 Fujitsu FR20,
>>18 leshort 38 TRW RH-32,
>>18 leshort 39 Motorola RCE,
>>18 leshort 40 ARM,
>>18 leshort 41 Alpha,
>>18 leshort 0xa390 IBM S/390 (obsolete),
>>18 leshort 42 Hitachi SH,
>>18 leshort 43 SPARC V9 - invalid byte order,
>>18 leshort 44 Siemens Tricore Embedded Processor,
>>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 leshort 46 Hitachi H8/300,
>>18 leshort 47 Hitachi H8/300H,
>>18 leshort 48 Hitachi H8S,
>>18 leshort 49 Hitachi H8/500,
>>18 leshort 50 IA-64 (Intel 64 bit architecture)
>>18 leshort 51 Stanford MIPS-X,
>>18 leshort 52 Motorola Coldfire,
>>18 leshort 53 Motorola M68HC12,
>>18 leshort 62 AMD x86-64,
>>18 leshort 75 Digital VAX,
>>18 leshort 97 NatSemi 32k,
>>18 leshort 0x9026 Alpha (unofficial),
>>20 lelong 0 invalid version
>>20 lelong 1 version 1
>>36 lelong 1 MathCoPro/FPU/MAU Required
>5 byte 2 MSB
# only for MIPS - see comment in little-endian section above.
>>18 beshort 8
# only for 32-bit
>>>4 byte 1
>>>>36 belong&0xf0000000 0x00000000 MIPS-I
>>>>36 belong&0xf0000000 0x10000000 MIPS-II
>>>>36 belong&0xf0000000 0x20000000 MIPS-III
>>>>36 belong&0xf0000000 0x30000000 MIPS-IV
>>>>36 belong&0xf0000000 0x40000000 MIPS-V
>>>>36 belong&0xf0000000 0x60000000 MIPS32
>>>>36 belong&0xf0000000 0x70000000 MIPS64
>>>>36 belong&0xf0000000 0x80000000 MIPS32 rel2
>>>>36 belong&0xf0000000 0x90000000 MIPS64 rel2
# only for 64-bit
>>>4 byte 2
>>>>48 belong&0xf0000000 0x00000000 MIPS-I
>>>>48 belong&0xf0000000 0x10000000 MIPS-II
>>>>48 belong&0xf0000000 0x20000000 MIPS-III
>>>>48 belong&0xf0000000 0x30000000 MIPS-IV
>>>>48 belong&0xf0000000 0x40000000 MIPS-V
>>>>48 belong&0xf0000000 0x60000000 MIPS32
>>>>48 belong&0xf0000000 0x70000000 MIPS64
>>>>48 belong&0xf0000000 0x80000000 MIPS32 rel2
>>>>48 belong&0xf0000000 0x90000000 MIPS64 rel2
>>16 beshort 0 no file type,
>>16 beshort 1 relocatable,
>>16 beshort 2 executable,
>>16 beshort 3 shared object,
>>16 beshort 4 core file,
#>>>(0x38+0xcc) string >\0 of '%s'
#>>>(0x38+0x10) belong >0 (signal %d),
>>16 beshort &0xff00 processor-specific,
>>18 beshort 0 no machine,
>>18 beshort 1 AT&T WE32100,
>>18 beshort 2 SPARC,
>>18 beshort 3 Intel 80386 - invalid byte order,
>>18 beshort 4 Motorola
>>>36 belong &0x01000000 68000,
>>>36 belong &0x00810000 CPU32,
>>>36 belong 0 68020,
>>18 beshort 5 Motorola 88000,
>>18 beshort 6 Intel 80486 - invalid byte order,
>>18 beshort 7 Intel 80860,
>>18 beshort 8 MIPS,
>>18 beshort 9 Amdahl,
>>18 beshort 10 MIPS (deprecated),
>>18 beshort 11 RS6000,
>>18 beshort 15 PA-RISC
>>>50 beshort 0x0214 2.0
>>>48 beshort &0x0008 (LP64)
>>18 beshort 16 nCUBE,
>>18 beshort 17 Fujitsu VPP500,
>>18 beshort 18 SPARC32PLUS,
>>>36 belong&0xffff00 &0x000100 V8+ Required,
>>>36 belong&0xffff00 &0x000200 Sun UltraSPARC1 Extensions Required,
>>>36 belong&0xffff00 &0x000400 HaL R1 Extensions Required,
>>>36 belong&0xffff00 &0x000800 Sun UltraSPARC3 Extensions Required,
>>18 beshort 20 PowerPC or cisco 4500,
>>18 beshort 21 cisco 7500,
>>18 beshort 22 IBM S/390,
>>18 beshort 24 cisco SVIP,
>>18 beshort 25 cisco 7200,
>>18 beshort 36 NEC V800 or cisco 12000,
>>18 beshort 37 Fujitsu FR20,
>>18 beshort 38 TRW RH-32,
>>18 beshort 39 Motorola RCE,
>>18 beshort 40 ARM,
>>18 beshort 41 Alpha,
>>18 beshort 42 Hitachi SH,
>>18 beshort 43 SPARC V9,
>>18 beshort 44 Siemens Tricore Embedded Processor,
>>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>>18 beshort 46 Hitachi H8/300,
>>18 beshort 47 Hitachi H8/300H,
>>18 beshort 48 Hitachi H8S,
>>18 beshort 49 Hitachi H8/500,
>>18 beshort 50 Intel Merced Processor,
>>18 beshort 51 Stanford MIPS-X,
>>18 beshort 52 Motorola Coldfire,
>>18 beshort 53 Motorola M68HC12,
>>18 beshort 73 Cray NV1,
>>18 beshort 75 Digital VAX,
>>18 beshort 97 NatSemi 32k,
>>18 beshort 0x9026 Alpha (unofficial),
>>18 beshort 0xa390 IBM S/390 (obsolete),
>>18 beshort 0xde3d Ubicom32,
>>20 belong 0 invalid version
>>20 belong 1 version 1
>>36 belong 1 MathCoPro/FPU/MAU Required
# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
# like proper ELF, but extracting the string had bad results.
>4 byte <0x80
>>8 string >\0 ("%s")
>8 string \0
>>7 byte 0 (SYSV)
>>7 byte 1 (HP-UX)
>>7 byte 2 (NetBSD)
>>7 byte 3 (GNU/Linux)
>>7 byte 4 (GNU/Hurd)
>>7 byte 5 (86Open)
>>7 byte 6 (Solaris)
>>7 byte 7 (Monterey)
>>7 byte 8 (IRIX)
>>7 byte 9 (FreeBSD)
>>7 byte 10 (Tru64)
>>7 byte 11 (Novell Modesto)
>>7 byte 12 (OpenBSD)
>>7 byte 97 (ARM)
>>7 byte 255 (embedded)
# XXX - according to Microsoft's spec, at an offset of 0x3c in a
# PE-format executable is the offset in the file of the PE header;
# unfortunately, that's a little-endian offset, and there's no way
# to specify an indirect offset with a specified byte order.
# So, for now, we assume the standard MS-DOS stub, which puts the
# PE header at 0x80 = 128.
#
# Required OS version and subsystem version were 4.0 on some NT 3.51
# executables built with Visual C++ 4.0, so it's not clear that
# they're interesting. The user version was 0.0, but there's
# probably some linker directive to set it. The linker version was
# 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
#
# many of the compressed formats were extraced from IDARC 1.23 source code
#
0 string MZ Microsoft
>0x18 leshort <0x40 MS-DOS executable
>0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
>>&18 leshort&0x2000 >0 (DLL)
>>&88 leshort 0 (unknown subsystem)
>>&88 leshort 1 (native)
>>&88 leshort 2 (GUI)
>>&88 leshort 3 (console)
>>&88 leshort 7 (POSIX)
>>&0 leshort 0x0 unknown processor
>>&0 leshort 0x14c Intel 80386
>>&0 leshort 0x166 MIPS R4000
>>&0 leshort 0x184 Alpha
>>&0 leshort 0x268 Motorola 68000
>>&0 leshort 0x1f0 PowerPC
>>&0 leshort 0x290 PA-RISC
>>&18 leshort&0x0100 >0 32-bit
>>&18 leshort&0x1000 >0 system file
>>&228 lelong >0 \b, Mono/.Net assembly
>>&0xf4 search/0x140 \x0\x40\x1\x0
>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
>30 string Copyright\x201989-1990\x20PKWARE\x20Inc. Self-extracting PKZIP archive
# Is next line correct? One might expect "Corp." not "Copr." If it is right, add a note to that effect.
>30 string PKLITE\x20Copr. Self-extracting PKZIP archive
>0x18 leshort >0x3f
>>(0x3c.l) string PE\0\0 PE
>>>(0x3c.l+25) byte 1 \b32 executable
>>>(0x3c.l+25) byte 2 \b32+ executable
# hooray, there's a DOS extender using the PE format, with a valid PE
# executable inside (which just prints a message and exits if run in win)
>>>(0x3c.l+92) leshort <10
>>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
>>>>(8.s*16) string !32STUB for MS Windows
>>>>>(0x3c.l+22) leshort&0x2000 >0 (DLL)
>>>>>(0x3c.l+92) leshort 0 (unknown subsystem)
>>>>>(0x3c.l+92) leshort 1 (native)
>>>>>(0x3c.l+92) leshort 2 (GUI)
>>>>>(0x3c.l+92) leshort 3 (console)
>>>>>(0x3c.l+92) leshort 7 (POSIX)
>>>(0x3c.l+92) leshort 10 (EFI application)
>>>(0x3c.l+92) leshort 11 (EFI boot service driver)
>>>(0x3c.l+92) leshort 12 (EFI runtime driver)
>>>(0x3c.l+92) leshort 13 (XBOX)
>>>(0x3c.l+4) leshort 0x0 unknown processor
>>>(0x3c.l+4) leshort 0x14c Intel 80386
>>>(0x3c.l+4) leshort 0x166 MIPS R4000
>>>(0x3c.l+4) leshort 0x184 Alpha
>>>(0x3c.l+4) leshort 0x268 Motorola 68000
>>>(0x3c.l+4) leshort 0x1f0 PowerPC
>>>(0x3c.l+4) leshort 0x290 PA-RISC
>>>(0x3c.l+4) leshort 0x200 Intel Itanium
>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
>>>(0x3c.l+22) leshort&0x1000 >0 system file
>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
>>>>(0x3c.l+0xf8) search/0x140 UPX2
>>>>>(&0x10.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>(0x3c.l+0xf8) search/0x140 .idata
>>>>>(&0xe.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
>>>>>(&0xe.l+(-4)) string ZZ0 \b, ZZip self-extracting archive
>>>>>(&0xe.l+(-4)) string ZZ1 \b, ZZip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .rsrc
>>>>>(&0x0f.l+(-4)) string a\\\4\5 \b, WinHKI self-extracting archive
>>>>>(&0x0f.l+(-4)) string Rar! \b, RAR self-extracting archive
>>>>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
>>>>>(&0x0f.l+(-4)) search/32 Nullsoft \b, Nullsoft Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .data
>>>>>(&0x0f.l) string WEXTRACT \b, MS CAB-Installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .petite\0 \b, Petite compressed
>>>>>(0x3c.l+0xf7) byte x
>>>>>>(&0x104.l+(-4)) string =!sfx! \b, ACE self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .WISE \b, WISE installer self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .dz\0\0\0 \b, Dzip self-extracting archive
>>>>(0x3c.l+0xf8) search/0x140 .reloc
>>>>>(&0xe.l+(-4)) search/0x180 PK\3\4 \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 _winzip_ \b, ZIP self-extracting archive (WinZip)
>>>>&(0x3c.l+0xf8) search/0x100 SharedD \b, Microsoft Installer self-extracting archive
>>>>0x30 string Inno \b, InnoSetup self-extracting archive
>>(0x3c.l) string !PE\0\0 MS-DOS executable
>>(0x3c.l) string NE \b, NE
>>>(0x3c.l+0x36) byte 0 (unknown OS)
>>>(0x3c.l+0x36) byte 1 for OS/2 1.x
>>>(0x3c.l+0x36) byte 2 for MS Windows 3.x
>>>(0x3c.l+0x36) byte 3 for MS-DOS
>>>(0x3c.l+0x36) byte >3 (unknown OS)
>>>(0x3c.l+0x36) byte 0x81 for MS-DOS, Phar Lap DOS extender
>>>(0x3c.l+0x0c) leshort&0x8003 0x8002 (DLL)
>>>(0x3c.l+0x0c) leshort&0x8003 0x8001 (driver)
>>>&(&0x24.s-1) string ARJSFX \b, ARJ self-extracting archive
>>>(0x3c.l+0x70) search/0x80 WinZip(R)\x20Self-Extractor \b, ZIP self-extracting archive (WinZip)
>>(0x3c.l) string LX\0\0 \b, LX
>>>(0x3c.l+0x0a) leshort <1 (unknown OS)
>>>(0x3c.l+0x0a) leshort 1 for OS/2
>>>(0x3c.l+0x0a) leshort 2 for MS Windows
>>>(0x3c.l+0x0a) leshort 3 for DOS
>>>(0x3c.l+0x0a) leshort >3 (unknown OS)
>>>(0x3c.l+0x10) lelong&0x28000 =0x8000 (DLL)
>>>(0x3c.l+0x10) lelong&0x20000 >0 (device driver)
>>>(0x3c.l+0x10) lelong&0x300 0x300 (GUI)
>>>(0x3c.l+0x10) lelong&0x28300 <0x300 (console)
>>>(0x3c.l+0x08) leshort 1 i80286
>>>(0x3c.l+0x08) leshort 2 i80386
>>>(0x3c.l+0x08) leshort 3 i80486
>>>(8.s*16) string emx \b, emx
>>>>&1 string x "%s"
>>>&(&0x54.l-3) string arjsfx \b, ARJ self-extracting archive
#------------------------------------------------------------------------------
# bFLT: file(1) magic for BFLT uclinux binary files
#
# From Philippe De Muyter
#
# Additional fields added by Craig Heffner
#
0 string bFLT BFLT executable
>4 belong x version %ld,
>4 belong 4
>8 belong x code offset: 0x%.8X,
>12 belong x data segment starts at: 0x%.8X,
>16 belong x bss segment starts at: 0x%.8X,
>20 belong x bss segment ends at: 0x%.8X,
>24 belong x stack size: %d bytes,
>28 belong x relocation records start at: 0x%.8X,
>32 belong x number of reolcation records: %d,
>>36 belong&0x1 0x1 ram
>>36 belong&0x2 0x2 gotpic
>>36 belong&0x4 0x4 gzip
>>36 belong&0x8 0x8 gzdata
#-----------------------------------------------------------------
# MIPS COFF file formats
#
0 beshort 0x0160 MIPSEB ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x \b.%ld
#
0 beshort 0x0162 MIPSEL-BE ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x \b.%ld
#
0 beshort 0x6001 MIPSEB-LE ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %d
>22 byte x \b.%ld
#
0 beshort 0x6201 MIPSEL ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x \b.%ld
# MIPS 2 additions
#
0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x \b.%ld
#
0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x \b.%ld
#
0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x \b.%ld
#
0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x \b.%ld
# MIPS 3 additions
#
0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x \b.%ld
#
0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
>20 beshort 0407 (impure)
>20 beshort 0410 (swapped)
>20 beshort 0413 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>22 byte x - version %ld
>23 byte x \b.%ld
#
0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x \b.%ld
#
0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
>20 beshort 03401 (impure)
>20 beshort 04001 (swapped)
>20 beshort 05401 (paged)
>8 belong >0 not stripped
>8 belong 0 stripped
>23 byte x - version %ld
>22 byte x \b.%ld
#
0 beshort 0x180 MIPSEB Ucode
0 beshort 0x182 MIPSEL-BE Ucode
# Windows CE package files
0 string MSCE\0\0\0\0 Microsoft WinCE installer
>20 lelong 0 \b, architecture-independent
>20 lelong 103 \b, Hitachi SH3
>20 lelong 104 \b, Hitachi SH4
>20 lelong 0xA11 \b, StrongARM
>20 lelong 4000 \b, MIPS R4000
>20 lelong 10003 \b, Hitachi SH3
>20 lelong 10004 \b, Hitachi SH3E
>20 lelong 10005 \b, Hitachi SH4
>20 lelong 70001 \b, ARM 7TDMI
>52 leshort 1 \b, 1 file
>52 leshort >1 \b, %u files
>56 leshort 1 \b, 1 registry entry
>56 leshort >1 \b, %u registry entries
#------------------------------------------------------------------------------
# Microsoft Xbox executables .xbe (Esa Hyytiä )
0 string XBEH XBE, Microsoft Xbox executable
# probabilistic checks whether signed or not
>0x0004 ulelong =0x0
>>&2 ulelong =0x0
>>>&2 ulelong =0x0 \b, not signed
>0x0004 ulelong >0
>>&2 ulelong >0
>>>&2 ulelong >0 \b, signed
# expect base address of 0x10000
>0x0104 ulelong =0x10000
>>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
>>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
>>>(0x0118-0x0FF60) ulelong >0 (regions:
>>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
>>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
>>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
>>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
>>>(0x0118-0x0FF60) ulelong >0 \b)
#------------------------------------------------------------------------------
# motorola: file(1) magic for Motorola 68K and 88K binaries
#
# 68K
#
0 beshort 0x0208 mc68k COFF
>18 beshort ^00000020 object
>18 beshort &00000020 executable
>12 belong >0 not stripped
>168 string .lowmem Apple toolbox
>20 beshort 0407 (impure)
>20 beshort 0410 (pure)
>20 beshort 0413 (demand paged)
>20 beshort 0421 (standalone)
0 beshort 0x0209 mc68k executable (shared)
>12 belong >0 not stripped
0 beshort 0x020A mc68k executable (shared demand paged)
>12 belong >0 not stripped
#
# Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
#
0 beshort 0x022A 68K BCS executable
#
# 88K
#
# Motorola/88Open BCS
#
0 beshort 0x022B 88K BCS executable
#------------------------------------------------------------------------------
# Sony Playstation executables (Adam Sjoegren ) :
0 string PS-X\x20EXE Sony Playstation executable
# Area:
>113 string x ("%s")
#------------------------------------------------------------------------------
# cisco: file(1) magic for cisco Systems routers
#
# Most cisco file-formats are covered by the generic elf code
#
# Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
0 beshort 0x8501 cisco IOS
>0 belong&0xffffff00 0x85011400 microcode
>0 belong&0xffffff00 0x8501cb00 experimental microcode
>7 string >\0 for "%s"
# EST flat binary format (which isn't, but anyway)
# From: Mark Brown
0 string ESTFBINR EST flat binary
# These are not the binaries themselves, but string references to them
# are a strong indication that they exist elsewhere...
#0 string /bin/busybox Busybox string reference: "%s"{one-of-many}
#0 string /bin/sh Shell string reference: "%s"{one-of-many}
#--------------------File Systems---------------------
# Minix filesystems - Juan Cespedes
0x410 leshort 0x137f Minix filesystem
>0x402 beshort !0 \b, %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x138f Minix filesystem, 30 char names
0x410 leshort 0x2468 Minix filesystem, version 2
0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
0x410 leshort 0x4d5a Minix filesystem, version 3
0x410 leshort 0x4d6a Minix filesystem, version 3, 30 char names
0x410 beshort 0x137f Minix filesystem (big endian)
>0x402 beshort !0 \b, %d zones
>0x1e string minix \b, bootable
0x410 beshort 0x138f Minix filesystem (big endian), 30 char names
0x410 beshort 0x2468 Minix filesystem (big endian), version 2
0x410 beshort 0x2478 Minix filesystem (big endian), version 2, 30 char names
0x410 beshort 0x4d5a Minix filesystem (big endian), version 3
0x410 beshort 0x4d6a Minix filesystem (big endian), version 3, 30 char names
# YAFFS
0 string \x03\x00\x00\x00\x01\x00\x00\x00\xFF\xFF YAFFS filesystem
# EFS2 file system - jojo@utulsa.edu
0 lelong 0x53000000 EFS2 Qualcomm filesystem super block, little endian,
>8 string !EFSSuper invalid,
>4 leshort &1 NAND
>4 leshort ^1 NOR
>4 leshort x version 0x%x,
>24 lelong x %d blocks,
>16 lelong x 0x%x pages per block,
>20 lelong x 0x%x bytes per page
0 belong 0x53000000 EFS2 Qualcomm filesystem super block, big endian,
>8 string !SSFErepu invalid,
>4 beshort &1 NAND
>4 beshort ^1 NOR
>4 beshort x version 0x%x,
>24 belong x %d blocks,
>16 belong x 0x%x pages per block,
>20 belong x 0x%x bytes per page
# TROC file system
0 string TROC TROC filesystem,
>4 lelong x %d file entries
# PFS file system
0 string PFS/ PFS filesystem,
>4 string x version "%s",
>14 leshort x %d files
# MPFS file system
0 string MPFS MPFS (Microchip) filesystem,
>4 byte x version %d.
>5 byte x \b%d,
>6 leshort x %d file entries
# cramfs filesystem - russell@coker.com.au
0 lelong 0x28cd3d45 CramFS filesystem, little endian
>4 lelong <0 invalid
>4 lelong x size %lu
>8 lelong &1 version #2
>8 lelong &2 sorted_dirs
>8 lelong &4 hole_support
>32 lelong x CRC 0x%x,
>36 lelong x edition %lu,
>40 lelong <0 invalid
>40 lelong x %lu blocks,
>44 lelong <0 invalid
>44 lelong x %lu files
>4 lelong x {jump-to-offset:%lu}
>4 lelong x {file-size:%lu}
0 belong 0x28cd3d45 CramFS filesystem, big endian
>4 belong <0 invalid
>4 belong x size %lu
>8 belong &1 version #2
>8 belong &2 sorted_dirs
>8 belong &4 hole_support
>32 belong x CRC 0x%x,
>36 belong x edition %lu,
>40 belong <0 invalid
>40 belong x %lu blocks,
>44 belong <0 invalid
>44 belong x %lu files
>4 belong x {jump-to-offset:%lu}
>4 belong x {file-size:%lu}
# JFFS2 file system
# If used with binwalk's smart signature feature (on by default, -S to disable)
# this signature can potentially lead to missing some JFFS2 file systems if there
# are multiple JFFS2 file systems in a target file and there are no other identified
# files in between the JFFS2 file systems. This is an unlikely scenario however, and
# the below signatures are much improved in terms of readability and accuracy in the
# vast majority of real world scenarios.
0 leshort 0x1985 JFFS2 filesystem, little endian{filter-include}
>2 leshort !0xE001
>>2 leshort !0xE002
>>>2 leshort !0x2003
>>>>2 leshort !0x2004
>>>>>2 leshort !0x2006
>>>>>>2 leshort !0xE008
>>>>>>>2 leshort !0xE009 \b, invalid
>(4.l) leshort !0x1985
>>(4.l+1) leshort !0x1985
>>>(4.l+2) leshort !0x1985
>>>>(4.l+3) leshort !0x1985
>>>>>(4.l) leshort !0xFFFF
>>>>>>(4.l+1) leshort !0xFFFF
>>>>>>>(4.l+2) leshort !0xFFFF
>>>>>>>>(4.l+3) leshort !0xFFFF \b, invalid
>4 lelong x {one-of-many}{jump-to-offset:%d}
0 beshort 0x1985 JFFS2 filesystem, big endian{filter-include}
>2 beshort !0xE001
>>2 beshort !0xE002
>>>2 beshort !0x2003
>>>>2 beshort !0x2004
>>>>>2 beshort !0x2006
>>>>>>2 beshort !0xE008
>>>>>>>2 beshort !0xE009 \b, invalid
>(4.L) beshort !0x1985
>>(4.L+1) beshort !0x1985
>>>(4.L+2) beshort !0x1985
>>>>(4.L+3) beshort !0x1985
>>>>>(4.L) beshort !0xFFFF
>>>>>>(4.L+1) beshort !0xFFFF
>>>>>>>(4.L+2) beshort !0xFFFF
>>>>>>>>(4.L+3) beshort !0xFFFF \b, invalid
>4 belong x {one-of-many}{jump-to-offset:%d}
# Squashfs, big endian
0 string sqsh Squashfs filesystem, big endian,
>28 beshort >10 invalid
>28 beshort <1 invalid
>30 beshort >10 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>>20 beshort 0 \binvalid,
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>28 beshort 3
>>63 bequad x size: %lld bytes,
>28 beshort >3
>>40 bequad x size: %lld bytes,
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs, little endian
0 string hsqs Squashfs filesystem, little endian,
>28 leshort >10 invalid
>28 leshort <1 invalid
>30 leshort >10 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort >3 compression:
>>20 leshort 1 \bgzip,
>>20 leshort 2 \blzma,
>>20 leshort 0 \binvalid,
>>20 leshort >4 \binvalid,
>28 leshort <3
>>8 lelong x size: %d bytes,
>>8 lelong x {file-size:%d}
>28 leshort 3
>>63 lequad x size: %lld bytes,
>>63 lequad x {file-size:%lld}
>28 leshort >3
>>40 lequad x size: %lld bytes,
>>40 lequad x {file-size:%lld}
>4 lelong x %d inodes,
>28 leshort >3
>>12 lelong blocksize: %d bytes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort 2
>>51 lelong x blocksize: %d bytes,
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>28 leshort >3
>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
>28 leshort <3
>>8 lelong x {jump-to-offset:%d}
>28 leshort 3
>>63 lequad x {jump-to-offset:%lld}
>28 leshort >3
>>40 lequad x {jump-to-offset:%lld}
# Squashfs with LZMA compression
0 string sqlz Squashfs filesystem, big endian, lzma compression,
>28 beshort >10 invalid
>28 beshort <1 invalid
>30 beshort >10 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>>20 beshort 0 \binvalid,
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>>8 belong x {file-size:%d}
>28 beshort 3
>>63 bequad x size: %lld bytes,
>>63 bequad x {file-size:%lld}
>28 beshort >3
>>40 bequad x size: %lld bytes,
>>40 bequad x {file-size:%lld}
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs 3.3 LZMA signature
0 string qshs Squashfs filesystem, big endian, lzma signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>30 beshort >10 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>>20 beshort 0 \binvalid,
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>>8 belong x {file-size:%d}
>28 beshort 3
>>63 bequad x size: %lld bytes,
>>63 bequad x {file-size:%lld}
>28 beshort >3
>>40 bequad x size: %lld bytes,
>>40 bequad x {file-size:%lld}
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs for DD-WRT
0 string tqsh Squashfs filesystem, big endian, DD-WRT signature,
>28 beshort >10 invalid
>28 beshort <1 invalid
>30 beshort >10 invalid
>28 beshort x version %d.
>30 beshort x \b%d,
>28 beshort >3 compression:
>>20 beshort 1 \bgzip,
>>20 beshort 2 \blzma,
>>20 beshort 0 \binvalid,
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>>8 belong x {file-size:%d}
>28 beshort 3
>>63 bequad x size: %lld bytes,
>>63 bequad x {file-size:%lld}
>28 beshort >3
>>40 bequad x size: %lld bytes,
>>40 bequad x {file-size:%lld}
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
>28 beshort <2
>>32 beshort x blocksize: %d bytes,
>28 beshort 2
>>51 belong x blocksize: %d bytes,
>28 beshort 3
>>51 belong x blocksize: %d bytes,
>28 beshort >3
>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs for DD-WRT
0 string hsqt Squashfs filesystem, little endian, DD-WRT signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>30 leshort >10 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort >3 compression:
>>20 leshort 1 \bgzip,
>>20 leshort 2 \blzma,
>>20 leshort 0 \binvalid,
>>20 leshort >4 \binvalid,
>28 leshort <3
>>8 lelong x size: %d bytes,
>>8 lelong x {file-size:%d}
>28 leshort 3
>>63 lequad x size: %lld bytes,
>>63 lequad x {file-size:%lld}
>28 leshort >3
>>40 lequad x size: %lld bytes,
>>40 lequad x {file-size:%lld}
>4 lelong x %d inodes,
>28 leshort >3
>>12 lelong blocksize: %d bytes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort 2
>>51 lelong x blocksize: %d bytes,
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>28 leshort >3
>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
>28 leshort <3
>>8 lelong x {jump-to-offset:%d}
>28 leshort 3
>>63 lequad x {jump-to-offset:%lld}
>28 leshort >3
>>40 lequad x {jump-to-offset:%lld}
# Non-standard Squashfs signature found on some D-Link routers
0 string shsq Squashfs filesystem, little endian, non-standard signature,
>28 leshort >10 invalid
>28 leshort <1 invalid
>30 leshort >10 invalid
>28 leshort x version %d.
>30 leshort x \b%d,
>28 leshort >3 compression:
>>20 leshort 1 \bgzip,
>>20 leshort 2 \blzma,
>>20 leshort 0 \binvalid,
>>20 leshort >4 \binvalid,
>28 leshort <3
>>8 lelong x size: %d bytes,
>>8 lelong x {file-size:%d}
>28 leshort 3
>>63 lequad x size: %lld bytes,
>>63 lequad x {file-size:%lld}
>28 leshort >3
>>40 lequad x size: %lld bytes,
>>40 lequad x {file-size:%lld}
>4 lelong x %d inodes,
>28 leshort >3
>>12 lelong blocksize: %d bytes,
>28 leshort <2
>>32 leshort x blocksize: %d bytes,
>28 leshort 2
>>51 lelong x blocksize: %d bytes,
>28 leshort 3
>>51 lelong x blocksize: %d bytes,
>28 leshort >3
>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
>28 leshort <3
>>8 lelong x {jump-to-offset:%d}
>28 leshort 3
>>63 lequad x {jump-to-offset:%lld}
>28 leshort >3
>>40 lequad x {jump-to-offset:%lld}
# ext2/ext3 filesystems - Andreas Dilger