Hacking SARCExtract - A SARC extractor for Switch, 3DS, and Wii U games!

KoopaStarRpad

Well-Known Member
Newcomer
Joined
Apr 27, 2015
Messages
86
Trophies
0
XP
173
Country
Zimbabwe
I really need more experience and knowledge with the command line.
Now, how do you "bulk extract"?
Preferably like this, extract all SARC/SZS within this folder and its sub folders.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
On Windows, you create a batch file and enter this command:
Code:
for %%f in (*.sarc) do python SARCExtract.py "%%f"

On Mac OS X, use bash: (not tested)
Code:
shopt -s nullglob
for f in *.sarc ; do python3 SARCExtract.py "$f" ; done
 
Last edited by AboodXD,
  • Like
Reactions: KoopaStarRpad

Bladexdsl

fanboys triggered 9k+
Member
Joined
Nov 17, 2008
Messages
21,038
Trophies
2
Location
Queensland
XP
12,056
Country
Australia
What's a SARC?
THIS
latest
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Sorry for the dumb question, but what is the use for this?
Switch games use the format SARC/SZS for archives. This tool can extract those archives.
Can you add repacker to szs and sarc for switch ???
Use this to repack to SARC and this to compress the SARC file to SZS.
 

HelpTheWretched

Well-Known Member
Member
Joined
Feb 4, 2010
Messages
315
Trophies
1
XP
1,557
Country
Canada
Works great for me!

Do you know of any other program(s) that can re-pack a SARC? I've been using a Python script but it seems to bugger up a lot with subdirectories. ("Permission denied" and/or when I check the resulting SARC in a hex editor, it has Backslash/and\Foreslash all mixed together.) (Thanks!)
 

pinkupi13

Well-Known Member
Member
Joined
May 8, 2016
Messages
154
Trophies
0
XP
668
Country
Australia
you need to drag a sarc file over it, it's meant to do that

clearly if you don't know what it's for you shouldn't be using it
 

Fusseldieb

New Member
Newbie
Joined
Dec 29, 2022
Messages
1
Trophies
0
Age
28
XP
29
Country
Brazil
Hey @AboodXD ! Firstly, thanks for this awesome tool/lib.

I tried to decompress sarc files with it and it worked like a charm, however, putting them back together resulted in changed file sizes and content.

For instance, the beginning bytes of original sarc are "S A R C" (and the file is 916KB), whereas the recompressed one begins with the bytes "Y a z 0", is 1031KB and contains a lot of FF bytes in the middle of texts.
Am I doing something wrong?

Thanks in advance!

EDIT: Asking was the rubber ducky method I needed! Turns out I was using the -compression flag (I thought I would need this for it to recombine all files), which resulted in an szs file (a sarc already compressed inside a zstd file). Removing the flag created an szs extension too, but without the compression and now both files are identical! Nevermind, newbies :)
Documenting this here in case a future reader scratches their head on this.
 
Last edited by Fusseldieb,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Veho @ Veho:
    The fuuuuu---
  • Veho @ Veho:
    I thought it was an actual xBox at that price.
  • Sicklyboy @ Sicklyboy:
    I wanna grab a 360 Slim and a 360 E one of these days. Missed the boat of getting them at their lowest though, once they were discontinued. Could've got them for cheap back when I was a broke 20 something working at Target, but then again, I was a broke 20 something working at Target
  • Veho @ Veho:
    Being broke is no fun.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, $150 isn't that bad for a jtag slim on ebay
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +1
    The Real Jdbye @ The Real Jdbye: @LeoTCK actually good quality products are dying out because they can't compete with dropshipped... +1