SkillAgentSearch skills...

Deark

A utility for file format and metadata analysis, data extraction, decompression, and image format decoding

Install / Use

/learn @jsummers/Deark
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Deark

Deark is a command-line utility that can decode certain types of files, and either:

  1. convert them to a more-modern or more-readable format; or
  2. extract embedded files from them

The files it writes are usually named "output.*".

When processing "archive" formats that contain other files, it's usually best to use Deark only to convert to ZIP format, so that the filenames and paths can be retained. Suggest options "-zip -ka".

Features are subject to change without notice, as new versions are released.

Windows binaries are available at the main website.

For additional information, see the technical.md file.

Usage

deark [options] [-file] <input-file> [options]
deark [options] -mp <input-file1> <input-file2>...
deark <-h|-version|-modules>

Command-line options:

<pre> -m &lt;module> The "module" to use to process the input file. The default is to autodetect. A module may represent one file format, or a group of related formats, or may have some special purpose. See formats.txt for a list of modules. You usually don't need to use -m, unless the format can't be detected, or you want to use a special-purpose module such as "copy". See also the -onlydetect option. -l Don't extract, but list the files that would be extracted. This option is not necessarily very efficient. Deark will still go through all the motions of extracting the files, but will not actually write them. -main Extract only "primary" files (e.g. not thumbnail images). -aux Extract only "auxiliary" files, such as thumbnail images. -a, -extractall Extract more data than usual, including things that are rarely of interest, such as comments. See also the "-opt extract..." options, and the format- specific options in technical.md. In a few contexts, -a has some other type of "do more" function. -o &lt;name> Make output filenames start with this string. This can include a directory path. Default is "output", except in some cases when using -zip/-tar. -t &lt;name> Use exactly this filename for the first (and presumably only) output file. The "-maxfiles 1" option is enabled automatically. Including the -main option is suggested. -k, -k2, -k3 "Keep" the input filename, and use it as the initial part of the output filename(s). Incompatible with -o. -k: Use only the base filename. -k2: Use the full path, but not as an actual path. -k3: Use the full path, as-is. -od &lt;directory> The directory in which to write output files. The directory must exist. This affects only files that Deark writes directly, not e.g. the names of ZIP member files when using -zip. -n Do not overwrite existing output files. -file &lt;input-file> This is an alternate syntax for specifying the primary input file. It works even if the filename begins with "-". -file2 &lt;file> For certain formats that involve more than one input file, you can use -file2 to specify the secondary file. Refer to the formats.txt file for details. Note that certain "segmented" formats require the -mp option instead. -zip Write output files to a .zip file, instead of to individual files. If the input format is an "archive" format (e.g. "ar" or "zoo"), then by default, the filenames in the ZIP archive might not include the usual "output.NNN" prefix. -tar Write output files to a .tar file, instead of to individual files. Similar to -zip, but may work better with large files. The -tostdout option is not currently supported when using -tar. -ta &lt;filename> (alias: -arcfn) When using -zip/-tar, use this name for the output file. Default is "output.zip" or "output.tar". -ka, -ka2, -ka3 When using -zip/-tar, "keep" the input filename, and use it as the initial part of the archive output filename. A suitable filename extension like ".zip" will be appended. Incompatible with -arcfn. -ka: Use only the base filename. -ka2: Use the full path, but not as an actual path. -ka3: Use the full path, as-is. -extrlist &lt;filename> Also create a text file containing a list of the names of the extracted files. Format is UTF-8, no BOM, LF terminators. To append to the file instead of overwriting, use with "-opt extrlist:append". -tostdout Write the output file(s) to the standard output stream (stdout). It is recommended to put -tostdout early on the command line. The -msgstostderr option is enabled automatically. If used with -zip: Write the ZIP file to standard output. Otherwise: The "-maxfiles 1" option is enabled automatically. Including the -main option is recommended. -fromstdin Read the input file from the standard input stream (stdin). If you use -fromstdin, supplying an input filename is optional. If it is supplied, the file will not be read (and need not exist), but the name might be used to help guess the file format. This option might not be very efficient, and might not work with extremely large files. -start &lt;n> Pretend that the input file starts at byte offset &lt;n>. As a special case, for EXE files, use "-start overlay" to process only the "overlay" segment. This can be used to handle the executable form of a number of DOS formats, such as some self-extracting archives. -size &lt;n> Pretend that the input file contains only (up to) &lt;n> bytes. -mp Allow multiple input files. Only certain modules support this feature. This option must appear before the second input filename. -firstfile &lt;n> Don't extract the first &lt;n> files found. -maxfiles &lt;n> Extract at most &lt;n> files. The normal default is 1000, or effectively unlimited if using -zip. -get &lt;n> Extract only the file identified by &lt;n>. The first file is 0. Equivalent to "-firstfile &lt;n> -maxfiles 1". To unconditionally show the file identifiers, use "-l -opt list:fileid". -maxfilesize &lt;n> Do not write a file larger than &lt;n> bytes. The default is 10 GiB. This is an "emergency brake". If the limit is exceeded, Deark will stop all processing. This setting is for physical output files, so if you use -zip/-tar, it applies to the ZIP/tar file, not to the individual member files. This option implicitly increases the -maxtotalsize setting to be at least &lt;n>. -maxtotalsize &lt;n> Do not write files totaling more than about &lt;n> bytes. The default is 15 GiB. Currently, this feature is not implemented very precisely. The limit is only checked when an output file is completed. -maxdim &lt;n> Allow image dimensions up to &lt;n> pixels. By default, Deark refuses to generate images with a dimension larger than 10000 pixels. You can use -maxdim to decrease or increase the limit. Increase the limit at your own risk. Deark does not generate large images efficiently. In practice, a large dimension will only work if the other dimension is very small. -padpix Include "padding" pixels/bits in the image output. Some images have extra bits at the end of each row that are used for alignment, and are not normally made visible. This option is not implemented for all formats. -nobom Do not add a BOM to UTF-8 output files generated or converted by Deark. If a BOM already exists in the source data, however, it will not necessarily be removed. -nodens Do not try to record the original aspect ratio and pixel density in output image files. -asciihtml When generating an HTML document, use ASCII encoding instead of UTF-8. This does not change how a browser will render the file; it just makes it larger and very slightly more portable. -nonames Make Deark less likely to try to improve output filenames by using names from the contents of the input file. The output filenames will be more predictable, but less informative. -nomodtime In some cases, mainly when reading archive formats, a last-modified timestamp contained in an input file will be used to set the timestamp of an output file written directly to your computer (or with -zip/-tar, of a member file inside that file). Use -nomodtime to disable this. This does not affect internal timestamps that may be maintained when Deark converts an item to some other format (such as PNG or HTML). -opt &lt;module:option>=&lt;value> Module-specific and feature-specific options. See formats.txt. Caution: Unrecognized or misspelled options will be silently ignored. Options not specific to one format: -opt font:output=&lt;font|image> Requested output format class. "image" creates a PNG image of the characters. "font", when available, converts/extracts the font to a font file format such as PSF. -opt font:charsperrow=&lt;n> The number of characters per row, when rendering a font to a bitmap -opt font:tounicode=&lt;0|1> [Don't] Try to translate a font's codepoints to Unicode codepoints. -opt char:output=&lt;html|image> The output format for character graphics (such as ANSI Art). -opt char:charwidth=&lt;8|9> The VGA character cell width for character graphics, when the output format is "image". -opt archive:subdirs=0 When using -zip/-tar, disallow subdirectories (the "/" character) in member filenames. -opt archive:zipcmprlevel=&lt;n> When using -zip, the compression level to use, from 0 (none) to 9 (max). -opt pngcmprlevel=&lt;n> When generating a PNG file, the compression level to use, from 0 (low) to 10 (max). -opt archive:timestamp=&lt;n> -opt archive:repro Make the -zip/-tar output reproducible, by not including modification times that are not contained in the source file. (That is, don't use the current time, or the source file's timestamp.) If you use "repro", the times will be set to some arbitrary value. If you use "timestamp", the
View on GitHub
GitHub Stars217
CategoryData
Updated8h ago
Forks15

Languages

C

Security Score

80/100

Audited on Apr 6, 2026

No findings