No description
Find a file
2018-02-03 22:09:16 -08:00
mbedtls Add config.mk to mbedtls Makefiles 2018-02-02 04:14:07 -08:00
.gitignore Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
aes.c Add support for deriving keys from master key + seeds (#6) 2018-02-02 20:57:24 -08:00
aes.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
bktr.c First pass implementation for BKTR support (#1). 2018-01-26 21:31:55 -08:00
bktr.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
config.mk.template Port to mbedtls 2018-01-29 18:39:30 +00:00
filepath.c Fix extraction filepath copying on WIN32 2018-01-24 22:28:35 -08:00
filepath.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
hfs0.c Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
hfs0.h Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
ivfc.h Implement -t romfs (and placeholder code for remaining types) (#4) 2018-02-03 21:18:53 -08:00
LICENSE First Public commit. 2018-01-24 09:52:25 -08:00
main.c Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
Makefile Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
nca.c Implement header, decrypted NCA saving. 2018-02-03 11:28:08 -08:00
nca.h Implement -t romfs (and placeholder code for remaining types) (#4) 2018-02-03 21:18:53 -08:00
npdm.c Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
npdm.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
pfs0.c Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
pfs0.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
pki.c Add support for deriving keys from master key + seeds (#6) 2018-02-02 20:57:24 -08:00
pki.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
README.md Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
romfs.c Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
rsa.c Port to mbedtls 2018-01-29 18:39:30 +00:00
rsa.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
settings.h Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
sha.c Port to mbedtls 2018-01-29 18:39:30 +00:00
sha.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
types.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00
utils.c Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
utils.h Implement -t hfs0, Re-work --outdir override. 2018-02-03 22:09:16 -08:00
version.h Re-brand ourselves, bump version number to 0.9 2018-02-02 21:35:43 -08:00

hactool

License

hactool is a tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives.

It is heavily inspired by ctrtool.

Usage

Usage: hactool [options...] <file>
Options:
-i, --info        Show file info.
                      This is the default action.
-x, --extract     Extract data from file.
                      This is also the default action.
  -r, --raw          Keep raw data, don't unpack.
  -y, --verify       Verify hashes and signatures.
  -d, --dev          Decrypt with development keys instead of retail.
  -t, --intype=type  Specify input file type [nca, pfs0, romfs]
  --titlekey=key     Set title key for Rights ID crypto titles.
  --contentkey=key   Set raw key for NCA body decryption.
NCA options:
  --plaintext=file   Specify file path for saving a decrypted copy of the NCA.
  --header=file      Specify Header file path.
  --section0=file    Specify Section 0 file path.
  --section1=file    Specify Section 1 file path.
  --section2=file    Specify Section 2 file path.
  --section3=file    Specify Section 3 file path.
  --section0dir=dir  Specify Section 0 directory path.
  --section1dir=dir  Specify Section 1 directory path.
  --section2dir=dir  Specify Section 2 directory path.
  --section3dir=dir  Specify Section 3 directory path.
  --exefs=file       Specify ExeFS file path. Overrides appropriate section file path.
  --exefsdir=dir     Specify ExeFS directory path. Overrides appropriate section directory path.
  --romfs=file       Specify RomFS file path. Overrides appropriate section file path.
  --romfsdir=dir     Specify RomFS directory path. Overrides appropriate section directory path.
  --listromfs        List files in RomFS.
  --baseromfs        Set Base RomFS to use with update partitions.
  --basenca          Set Base NCA to use with update partitions.
PFS0 options:
  --pfs0dir=dir      Specify PFS0 directory path.
  --outdir=dir       Specify PFS0 directory path. Overrides previous path, if present.
  --exefsdir=dir     Specify PFS0 directory path. Overrides previous paths, if present for ExeFS PFS0.
RomFS options:
  --romfsdir=dir     Specify RomFS directory path.
  --outdir=dir       Specify RomFS directory path. Overrides previous path, if present.
  --listromfs        List files in RomFS.
HFS0 options:
  --hfs0dir=dir      Specify HFS0 directory path.
  --outdir=dir       Specify HFS0 directory path. Overrides previous path, if present.
  --exefsdir=dir     Specify HFS0 directory path. Overrides previous paths, if present.

Building

Copy config.mk.template to config.mk, make changes as required, and then run make. If your make is not GNU make (e.g. on BSD variants), you need to call gmake instead.

You may need libiconv when not building on Linux. If on Windows, I recommend using MinGW.

Licensing

This software is licensed under the terms of the ISC License.
You can find a copy of the license in the LICENSE file.