From f606fec7ea9df31c4106aee60d12063a49392273 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Sun, 12 Feb 2017 16:53:58 +0100 Subject: [PATCH] Updated readme file --- README.md | 13 +++++++------ source/game/ticket.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2c2ae8b..bf3166e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ You may now run GodMode9 via the X Button (or any other button you chose). See b ## What you can do with GodMode9 -With the possibilites GodMode9 provides not everything may be obvious at first glance. So, for your convenience a (incomplete!) list of what GodMode9 can do follows below. +With the possibilites GodMode9 provides, not everything may be obvious at first glance. In short, __GodMode9 includes improved versions of basically everything that Decrypt9 has, and more__. Any kind of dumps and injections are handled via standard copy operations and more specific operations are found inside the A button menu. The A button menu also works for batch operations when multiple files are selected. For your convenience a (incomplete!) list of what GodMode9 can do follows below. * __Manage files on all your data storages__: You wouldn't have expected this, right? Included are all standard file operations such as copy, delete, rename files and create folders. Use the L button to mark multiple files and apply file operations to multiple files at once. * __Make screenshots__: Press R+L anywhere. Screenshots are in BMP format. * __Use multiple panes__: Press R+left|right. This enables you to stay in one location in the first pane and open another in the second pane. @@ -32,16 +32,17 @@ With the possibilites GodMode9 provides not everything may be obvious at first g * __Direct access to SD installed contents__: Just take a look inside the `A:`/`B:` drives. On-the-fly-crypto is taken care for, you can access this the same as any other content. * __Build CIAs from NCCH / NCSD (.3DS) / TMD (installed contents)__: Press A on the file you want converted, the option will be shown. Installed contents are found (among others) in `1:/titles/`(SysNAND) and `A:/titles/`(SD installed). Where applicable, you will also be able to generate legit CIAs. Note: this works also from a file search. * __Decrypt, encrypt and verify NCCH / NCSD / CIA / BOSS / FIRM images__: Options are found inside the A button menu. You will be able to decrypt/encrypt to the standard output directory or (where applicable) in place. -* __Decrypt content downloaded from CDN /NUS__: Press A on the file you want decrypted. For this to work, you need at least a TMD file (`encTitlekeys.bin` / `decTitlekeys.bin` also required, see `Support files` below) or a CETK file. Either keep the names provided by CDN / NUS, or rename the downloaded content to `(anything).nus` or `(anything).cdn` and the CETK to `(anything).cetk`. +* __Decrypt content downloaded from CDN / NUS__: Press A on the file you want decrypted. For this to work, you need at least a TMD file (`encTitlekeys.bin` / `decTitlekeys.bin` also required, see _Support files_ below) or a CETK file. Either keep the names provided by CDN / NUS, or rename the downloaded content to `(anything).nus` or `(anything).cdn` and the CETK to `(anything).cetk`. * __Batch mode for the above operations__: Just select multiple files of the same type via the L button, then press the A button on one of the selected files. -* __Access any file inside NCCH / NCSD / CIA / FIRM images__: Just mount the file via the A button menu and browse to the file you want. -* __Inject any NCCH CXI file into Health & Safety__: The option is found inside the A button menu for any NCCH CXI file. NCCH CXIs are found, f.e. inside of CIAs. +* __Access any file inside NCCH / NCSD / CIA / FIRM images__: Just mount the file via the A button menu and browse to the file you want. For CIAs and CDN / NUS content, prior decryption may be advisable for full access. +* __Mount ticket.db files and dump tickets__: Mount the file via the A button menu. Tickets are sorted into `eshop` (stuff from eshop, probably legit), `system` (system tickets, probably legit) and `unknown`(everything else, never legit) categories. +* __Inject any NCCH CXI file into Health & Safety__: The option is found inside the A button menu for any NCCH CXI file. NCCH CXIs are found, f.e. inside of CIAs. Keep in mind there is a (system internal) size restriction on H&S injectable apps. * __Inject and dump GBA VC saves__: Look for a file called `gbavc.sav` inside the `S:` drive. Keep in mind that you need to start the specific GBA game on your console before dumping / injecting the save. * __Dump 3DS / NDS / DSi type retail game cartridges__: Insert the cartridge and take a look inside the `C:` drive. You may also dump private headers from 3DS game cartridges. -* __Generate XORpads from ´ncchinfo.bin´ files__: Start this via the appropriate entry inside A button menu. +* __Generate XORpads from `ncchinfo.bin` files__: Start this via the appropriate entry inside the A button menu. * __Generate XORpads for any NAND partition__: Take a look inside the `X:` drive. You can use these XORpads for decryption of encrypted NAND images on PC. Additional tools such as [3dsFAT16Tool](https://github.com/d0k3/3DSFAT16tool/releases) are required on PC. * __Directly mount and access NAND dumps or standard FAT images__: Just press the A button on these files to get the option. You can only mount NAND dumps from the same console. -* __Restore NAND dumps while keeping your A9LH / sighax installation intact__: Select `Restore SysNAND (safe)` from inside the +* __Restore NAND dumps while keeping your A9LH / sighax installation intact__: Select `Restore SysNAND (safe)` from inside the A button menu. * __Restore / dump NAND partitions or even full NANDs__: Just take a look into the `S:` (or `E:`/ `I:`) drive. This is done the same as any other file operation. * __Compare and verify files__: Press the A button on the first file, select `Calculate SHA-256`. Do the same for the second file. If the two files are identical, you will get a message about them being identical. On the SDCARD drive (`0:`) you can also write a SHA file, so you can check for any modifications at a later point. * __Hexview and hexedit any file__: Press the A button on a file and select `Show in Hexeditor`. A button again enables edit mode, hold the A button and press arrow buttons to edit bytes. You will get an additional confirmation prompt to take over changes. Take note that for certain file, write permissions can't be enabled. diff --git a/source/game/ticket.c b/source/game/ticket.c index 141b923..c8f9811 100644 --- a/source/game/ticket.c +++ b/source/game/ticket.c @@ -147,6 +147,21 @@ u32 FindTitleKey(Ticket* ticket, u8* title_id) { return (found) ? 0 : 1; } +/*u32 BuildTitleKeyInfo(TitleKeysInfo* tik_info, TicketInfo* tick_info, bool decrypt) { + memset(tik_info, 0, 16); + for (u32 i = 0; i < tick_info->n_entries; i++) { + TicketEntry* tick_entry = tick_info->entries + i; + TitleKeyEntry* tik_entry = tik_info->entries + tik_info->n_entries; + if (!getbe64(tick_entry->ticket_id)) continue; + tik_entry->commonkey_idx = tick_entry->commonkey_idx; + memcpy(tik_entry->title_id, tick_entry->title_id, 8); + memcpy(tik_entry->titlekey, tick_entry->titlekey, 16); + if (decrypt) CryptTitleKey(tik_entry, false, false); + tik_info->n_entries++; + } + return 0; +}*/ + u32 BuildFakeTicket(Ticket* ticket, u8* title_id) { const u8 sig_type[4] = { TICKET_SIG_TYPE }; // RSA_2048 SHA256 const u8 ticket_cnt_index[] = { // whatever this is