[Release] HACToolGUI - A very simple GUI for HACTool

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by SimonMKWii, Mar 24, 2018.

?
  1. No, I could already use hactool.

  2. No, but I'm sure it will help other people out.

  3. I could already use hactool, but this makes it easier.

  4. Yes, I was having a bit of trouble with hactool.

  5. Yes, I didn't know how to use hactool at all.

Results are only viewable after voting.

    88,415

    189
    Front-page
    Updated to Version 0.3a - urgent bug fix because I accidentally completely broke the program.

    New:
    Official Discord support server!
    Source code now available!



    Well, in honour of Master_Key_01 and Master_Key_02's release, I present to you...
    HACToolGUI!

    [​IMG]

    It does everything you need to extract XCI, NCA and RomFS files, support for other formats coming soon.

    :switch: Features:
    Simple to use and easy to understand GUI
    Built-in keylist manager (Bring your own keys)
    Uses HACTool to extract XCI, NCA and RomFS files
    Supports all keys
    Choose to dump as plaintext NCA, RomFS or to extract the files to a folder
    Tiny filesize; around 120KB decompressed
    Portable, no installation required

    :switch: Dependencies:
    Requires the latest release of hactool.exe and all its .dll files in the same directory.
    Get it from here.

    Screenshots:
    Complete v0.3 change list:

    • Added PFS0 support! (Used in .nsp)
    • Automatically fills in the textboxes with keydata from keys.dat when key manager is opened. (Also added a manual option)
    • Drag-and-drop file support added for all extraction types
    • Key manager button added to main screen
    • Internet access no longer required for use; now you can check for updates by clicking the option
    • Remembers last selected NCA extraction option
    • Remembers previous directory used
    • NCA extraction is disabled unless keys are filled and a key file is present
    • Checks for incorrectly formatted keys.dat
    • Quotes no longer required in directory names


    Coming soon:
    • Name change
    • The hactool files will not be required, the code will be built into the program
    • Key verification
    • Key derivation, the usual stuff, but will also generate the master_key, package1_key and various others from a supplied keyblob, provided you have the wrapper key for the specific keyblob and the console-unique SBK and TSEC keys
    • Bulk file extraction
    • Support for all other hactool formats, including Rights ID-encrypted NCAs and SD card files
    • Built-in CDN downloader, provide a private key and cert, then add the Title ID, it will get the latest version of the meta file, decrypt the NCA, read the cnmt, get the NCAID of each file and download the NCA of them from the Atum server (provided you have the keys)
    • Various file type extractors (BFSAR, BFRES, BFGRP, SARC, SZS, Yaz0, etc.)
    • Background music (optional)
    • Themes (optional)
    • More easter eggs
     
    LAsly44, zeldaism, klear and 51 others like this.
    Discussion (189 replies)
  1. punderino
    This message by punderino has been removed from public view by porkiewpyne, Mar 24, 2018.
    Mar 24, 2018
  2. jackzhang
    This message by jackzhang has been removed from public view by porkiewpyne, Mar 24, 2018.
    Mar 24, 2018
  3. fire3element

    fire3element GBAtemp Regular

    Member
    2
    Jul 24, 2015
    United States
    Thank you for taking up the task and doing this. Sorry no one has bothered to reply. This has been sorely needed, even though it is a relatively simple tool still.

    Maybe attach some instructions to your OP. I have tried both extraction options (NCA and XCI) with no luck. The tool simply fails to extract any files.
    And I will note that I have successfully used hactool many times, so it is not a problem with key data.

    This might be an issue with not having the key input file named correctly or in the correct format. Instructions would be helpful for future users. ^_^
     
  4. SocraticBliss

    SocraticBliss GBAtemp Regular

    Member
    2
    Jun 3, 2017
    United States
    You can decompile the exe with dnSpy, it's written in C#/.NET, looks like calls the NCA command is as follows...

    Process.Start("cmd", ("/c hactool -k keys.dat --plaintext=" + this.TextBox2.Text + ".nca " + this.TextBox1.Text) ?? "");

    I don't think I have used the plaintext option before when using hactool... anyways, looking forward to the OP uploading the legit source, also, OP, since you are already coding it in C#/.NET, it may be worthwhile to look at making it cross-platform :)
     
    Last edited by SocraticBliss, Mar 24, 2018
    richexpert likes this.
  5. fire3element

    fire3element GBAtemp Regular

    Member
    2
    Jul 24, 2015
    United States
    Yep, looks like that may have been the issue. File with the key info in it needs to be named " keys.dat "

    The tool also showed more options when attempting to extract this time. It only showed the Open File filed, and Output Directory field on my first run.
    Not sure if changing the key file to keys.dat caused that, or if there are some bugs to be worked out. Changing my keys file back to the old name did not remove the additional options.
     
  6. SimonMKWii
    OP

    SimonMKWii GBAtemp Advanced Fan

    Member
    9
    Nov 18, 2017
    Australia
    Melbourne, Victoria
    That's pretty close, the real segment of code is:

    Code:
     If IO.File.Exists("keys.dat") Then
                Process.Start("cmd", "/c hactool -k keys.dat " + "--plaintext=" + TextBox2.Text + ".nca" + " " + "" + TextBox1.Text + "")
            Else
                MsgBox("You must add keys first.")
                KeyForm.Show()
            End If
    But yeah, you can probably see what I mean about it being messy code!
     
    Last edited by SimonMKWii, Mar 24, 2018
    damiano2712 likes this.
  7. SocraticBliss

    SocraticBliss GBAtemp Regular

    Member
    2
    Jun 3, 2017
    United States
    Yea that's one of the main issues with modern language compilers, it makes it really easy to reverse, unless it's obfuscated, but I figured you were not trying to hide anything :)

    Since you are already coding it in C#/.NET, it may be worthwhile to look at making it cross-platform :)

    https://opensource.com/article/17/5/cross-platform-console-apps
     
    damiano2712 likes this.
  8. SimonMKWii
    OP

    SimonMKWii GBAtemp Advanced Fan

    Member
    9
    Nov 18, 2017
    Australia
    Melbourne, Victoria
    Sorry, I should have explained more clearly!
    You need to use the built-in key manager and click save, or rename the file to keys.dat and place it in the working directory.
     
  9. fire3element

    fire3element GBAtemp Regular

    Member
    2
    Jul 24, 2015
    United States
    Ok, I see it now. The "Config" option at the top of the window was not showing up previously, but it is now.
    There might be a few bugs to iron out ;)
     
  10. Natehaxx

    Natehaxx GBAtemp Maniac

    Member
    8
    Jul 26, 2017
    Eritrea
    for this question you should get banned
     
  11. Masterwin

    Masterwin GBAtemp Fan

    Member
    4
    Jan 7, 2016
    Spain
    nice job
     
    CatmanFan and salamandrusker like this.
  12. salamandrusker

    salamandrusker GBAtemp Regular

    Member
    2
    Mar 12, 2018
    Spain
    nice job!!!
     
    Masterwin likes this.
  13. asper

    asper GBAtemp Advanced Fan

    Member
    6
    May 14, 2010
    United States
    I cannot see the "config" option...

    EDIT
    Now it is there:
    [​IMG]

    @SimonMKWii : BUG (gui or hactool?): NO SPACES in woking folders otherwise it will not extract data.
     
    Last edited by asper, Mar 24, 2018
    Masterwin likes this.
  14. SimonMKWii
    OP

    SimonMKWii GBAtemp Advanced Fan

    Member
    9
    Nov 18, 2017
    Australia
    Melbourne, Victoria
    Yeah, it's actually an issue with how command prompt handles file and directory names, I need to add extra quotation marks to the output...
    Version 0.2 will be coming soon, it will fix bugs and also feature support for other file types.
     
  15. peteruk

    peteruk GBAtemp Addict

    Member
    11
    Jun 26, 2015
    Really useful tool, looking forward to watching it's progress

    Managed to extract a couple of XCI files and dumped the NCA files but no luck dumping the NCA content 'yet'


    EDIT - scratch that, NCA's extracting fine now also

    Very good job on this tool :bow:
     
    Last edited by peteruk, Mar 24, 2018
    kop365 and Alex-Kidd like this.
  16. blinkzane

    blinkzane Panic at your moms house

    Member
    5
    GBAtemp Patron
    blinkzane is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 24, 2012
    United States
    Florida
    Dependencies:
    Requires hactool.exe and all its .dll files in the same directory.

    this helps me none
    I did this, no launch.
     
  17. peteruk

    peteruk GBAtemp Addict

    Member
    11
    Jun 26, 2015

    Did you place all the files from sciresM's release https://github.com/SciresM/hactool/releases in the same folder with the GUI version ?

    Also make sure there's no spaces in the name of the folder, that's what messed me up at first
     
    NassaCln, kop365 and Alex-Kidd like this.
  18. SimonMKWii
    OP

    SimonMKWii GBAtemp Advanced Fan

    Member
    9
    Nov 18, 2017
    Australia
    Melbourne, Victoria
    I actually fixed that issue.
     
    peteruk likes this.
  19. blinkzane

    blinkzane Panic at your moms house

    Member
    5
    GBAtemp Patron
    blinkzane is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 24, 2012
    United States
    Florida
    yes. ill try again.
    edit: no i didn't use this, I was using the updated version from the repo. I see why it wasn't working now
     
    peteruk likes this.
  20. SuinkaiVS

    SuinkaiVS GBAtemp Regular

    Member
    3
    Apr 3, 2017
    Inside Hombrew
    When i try to extract a NCA, a window opens and immediately closes. What am i doing wrong?

    EDIT: nvm, i was missing a letter :rofl2:
     
    Last edited by SuinkaiVS, Mar 24, 2018
  21. TheGreek Boy

    TheGreek Boy GBAtemp Maniac

    Member
    5
    Jan 9, 2016
    Greece
    Behind you.
    what keys i need to decrypt and extract a .nca file?
     
Loading...