Skip to content

sk-zk/Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extractor

A cross-platform .scs extractor for both HashFS and ZIP.

Features

  • Supports HashFS v1 and v2 as well as ZIP (including "locked" ZIP files)
  • Can extract multiple archives at once
  • Partial extraction
  • Raw dumps
  • Built-in path-finding mode for HashFS archives without directory listings
  • Automatic conversion of 3nK-encoded and encrypted SII files

Build

A Windows executable is available on the Releases page. On other platforms, install the .NET 8 SDK and run the following:

git clone https://github.com/sk-zk/Extractor.git
cd Extractor
dotnet publish -c Release

Usage

extractor path... [options]

General options

Short Long Description
-a --all Extracts all .scs archives in the specified directory.
-d --dest Sets the output directory. Defaults to ./extracted.
--list Lists paths contained in the archive. Can be combined with --deep.
-p --partial Limits extraction to the comma-separated list of files and/or directories specified. Examples:
-p=/locale
-p=/def,/map
-p=/def/world/road.sii
When extracting a HashFS archive (without --deep), directory traversal begins at the given paths, allowing for extraction of known directories and files not discoverable from the top level. In all other cases, extraction is limited to files whose paths begin with any of the paths given to this parameter.
-P --paths Same as --partial, but expects a text file containing paths to extract, separated by line breaks.
-s --skip-existing Don't overwrite existing files.
--tree Prints the directory tree and exits. Can be combined with --deep, --partial, --paths, and --all.
-?, -h --help Prints the extractor's version and usage information.

HashFS options

Short Long Description
--additional When using --deep, specifies additional start paths to search. Expects a text file containing paths to extract, separated by line breaks.
--deep An extraction mode which scans the contained entries for referenced paths instead of traversing the directory tree from /. Use this option to extract archives without a top level directory listing.
--list-all When using --deep, lists all paths referenced by files in the archive, even if they are not contained in it.
--list-entries Lists entries contained in the archive.
-r --raw Directly dumps the contained files with their hashed filenames rather than traversing the archive's directory tree.
--salt Ignores the salt specified in the archive header and uses the given one instead.
--table-at-end [v1 only] Ignores what the archive header says and reads the entry table from the end of the file.

Examples

Normal extraction:

extractor "path\to\file.scs"

Extract two .scs files at once:

extractor "path\to\file1.scs" "path\to\file2.scs"

Extract all .scs files in a directory:

extractor "path\to\directory" -a

Extract def and manifest.sii only:

extractor "path\to\file.scs" -p=/def,/manifest.sii

Extract with deep mode:

extractor "path\to\file.scs" --deep

Extract with deep mode when the mod has a separate defs archive:

extractor "defs.scs" --deep
extractor "defs.scs" --deep --list-all > paths.txt
extractor "other.scs" --deep --additional=paths.txt

About

cross-platform .scs extractor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages