justtryingthingsout / sepsplit-rs

SEP firmware splitter, made in rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sepsplit-rs

A utility to split a SEP firmware into its various modules, made in Rust.

Building

  1. Install cargo if you haven't already, instructions are here
  2. Run cargo install --path /path/to/sepsplit-rs/
  3. Run the executable with sepsplit-rs

Note for Windows

In order to get the program to compile, you may need to

  • Install LLVM as shown here
  • Either comment out or modify line 52 in lzvn_decode.c in the lzvn repo to #define _LZVN_DEBUG_DUMP(...) if you are using the MSVC compiler.

Usage

As a binary

sepsplit-rs /path/to/sep-firmware.bin [output folder]
The SEP firmware has to be decrypted and extracted.

As a library

  1. Use ./src/seplib.h as the header for importing the function.
  2. Compile a static library with cargo rustc --lib --crate-type staticlib.
  3. Finally, run the main logic of the program with split(const char* filein, const char* outdir, unsigned int verbose), replacing the parameters with arguments with the necessary safety requirements listed in the header.

Testing

  1. cd into the project
  2. Run ./download_testfws.sh to download test SEP Firmwares
  3. Run the tests with cargo test

Credits

About

SEP firmware splitter, made in rust.

License:GNU General Public License v3.0


Languages

Language:Rust 85.2%Language:Shell 10.4%Language:C 4.3%