Imported Upstream version 1.2.2-1
[packages/binwalk.git] / binwalk / config / extract.conf
1 #################################################################################################################
2 # Default extract rules loaded when --extract is specified.
3
4 # <case-insensitive unique string from binwalk output text>:<desired file extension>:<command to execute>
5 #
6 # Note that %e is a place holder for the extracted file name.
7 #################################################################################################################
8
9 # Assumes these utilities are installed in $PATH.
10 ^gzip compressed data:gz:gzip -d -f '%e'
11 ^lzma compressed data:7z:7zr e -y '%e'
12 ^bzip2 compressed data:bz2:bzip2 -d -f '%e'
13 ^zip archive data:zip:jar xf '%e' # jar does a better job of unzipping than unzip does...
14 ^posix tar archive:tar:tar xvf '%e'
15 ^rar archive data:rar:unrar e '%e'
16 ^arj archive data.*comment header:arj:arj e '%e'
17 ^iso 9660:iso:7z x '%e' -oiso-root
18
19 # These assume the firmware-mod-kit is installed to /opt/firmware-mod-kit.
20 # If not, change the file paths appropriately.
21 ^squashfs filesystem:squashfs:/opt/firmware-mod-kit/unsquashfs_all.sh '%e'
22 ^jffs2 filesystem:jffs2:/opt/firmware-mod-kit/src/jffs2/unjffs2 '%e'
23 ^ascii cpio archive:cpio:/opt/firmware-mod-kit/uncpio.sh '%e'
24 ^cramfs filesystem:cramfs:/opt/firmware-mod-kit/uncramfs_all.sh '%e'
25 ^bff volume entry:bff:/opt/firmware-mod-kit/src/bff/bffxtractor.py '%e'
26 ^wdk file system:wdk:/opt/firmware-mod-kit/src/firmware-tools/unwdk.py '%e'
27 ^zlib header:zlib:/opt/firmware-mod-kit/src/firmware-tools/unzlib.py '%e'
28 ^ext2 filesystem:ext2:/opt/firmware-mod-kit/src/mountcp/mountcp '%e' ext2-root
29 ^romfs filesystem:romfs:/opt/firmware-mod-kit/src/mountcp/mountcp '%e' romfs-root
30
31 # These paths are for the depreciated firmware-mod-kit file paths, which included the 'trunk' directory.
32 # These will only be run if the above file paths don't exist.
33 ^squashfs filesystem:squashfs:/opt/firmware-mod-kit/trunk/unsquashfs_all.sh '%e'
34 ^jffs2 filesystem:jffs2:/opt/firmware-mod-kit/trunk/src/jffs2/unjffs2 '%e' # requires root
35 ^ascii cpio archive:cpio:/opt/firmware-mod-kit/trunk/uncpio.sh '%e'
36 ^cramfs filesystem:cramfs:/opt/firmware-mod-kit/trunk/uncramfs_all.sh '%e'
37 ^bff volume entry:bff:/opt/firmware-mod-kit/trunk/src/bff/bffxtractor.py '%e'
38
39 # If FMK isn't installed, try the system's unsquashfs for SquashFS files
40 ^squashfs filesystem:squashfs:unsquashfs '%e'
41
42 # Extract, but don't run anything
43 private key:key
44 certificate:crt