Giter Site home page Giter Site logo

extractor's Introduction

Extractor

A cross-platform .scs (HashFS) extractor written in C#. Supports raw dumps, partial extraction, and extracting all .scs files at once.

HashFS v2, introduced with game version 1.50, is supported.

Build

A self-contained binary for Windows is available on the Releases page. On other platforms, install the .NET 6 (or higher) SDK and run the following:

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

Usage

extractor path... [options]

Options:
  -a, --all                  Extracts all .scs archives in the specified
                               directory.
  -d, --dest=VALUE           The output directory.
                               Default: ./extracted/
      --list                 Lists entries and exits.
  -p, --partial=VALUE        Partial extraction, e.g.:
                               -p=/locale
                               -p=/def,/map
                               -p=/def/world/road.sii
  -P, --paths=VALUE          Same as --partial, but expects a text file
                               containing paths to extract, separated by
                               newlines.
  -r, --raw                  Directly dumps the contained files with their
                               hashed filenames rather than traversing the
                               archive's directory tree.
      --salt=VALUE           Ignores the salt in the archive header and uses
                               this one instead.
  -s, --skip-existing        Don't overwrite existing files.
      --table-at-end         [HashFS v1 only] Ignores what the archive header
                               says and reads the entry table from the end of
                               the file.
      --tree                 Prints the directory tree and exits. Can be
                               combined with --partial, --paths, and --all.
  -?, -h, --help             Prints this message and exits.

Usage samples

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 /map only for all .scs files in a directory:

extractor "path\to\directory" -a -p=/map

Extract locale.scs:

extractor "path\to\locale.scs" -p=/locale

extractor's People

Contributors

sk-zk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

extractor's Issues

Full mod unlock

Hello

I tell you that I tried the extractor but it only works in some mods, not in all since they have the reinforced hashfs v2, even if I try to unlock it, it doesn't work.
image

here is an example

In fact, I drag the mod to the extractor but it closes immediately, the extractor cannot extract it and that is because the hash does not detect it as it is blocked with that scs# city

Problem with .pmg files when extracting

hello

I wanted to open a .scs using Extractor.
The directories were hidden, I gave the list of directories with the help of -P and executed.
The files were extracted, but the size of all .pmg files is the same and 512KB

image

what is the problem?

Files with headers damaged

Would it be possible to add a function to the program to read external headers? I have some scs files that have a damaged header and I would like to place an external file with the list of known directories.

extraction is not achieved

Hello. I tried to do the extraction but it asks me to use --raw when using it, it still doesn't allow me to use -p, -a,

image

image

... I don't know if giving up this hashfs thing for someone who is basic in computing is too complicated. You have to know a lot about cybersecurity to specify the issue of hashes and especially with hexadecimal code.

Another possibly "obfuscated" mod

I recently got into the world of ETS2 and I'm lovin' it. With the recent v1.5 update that broke a lot of mod tools I stumbled upon your nice extractor project :)

Here is a Mazda Miata mod that I'm trying to extract and change the super dark windshield tint:
https://forum.scssoft.com/viewtopic.php?t=312737

But both official v1.50 extractor and your extractor failed to extract it, showing "not supported file format".
It works fine in the v1.5 game though, so the .scs file is definitely not corrupted.
I saw from the closed issues that there were quite some mods that seems to be "obfuscated" so it cannot be extracted, I wonder if this is the same case.
Also if it really is obfuscation, how does it even work in game? That's really amazing to think of.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.