[Release] HACToolGUI - A very simple GUI for HACTool

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!

m0GW3mg.png


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.

SI3CDlT.png

XWmJZx6.png

rjxr1FA.png
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
 

Attachments

  • HACToolGUI_v0_3a.zip
    88.4 KB · Views: 14,214
Last edited by SimonMKWii,
D

Deleted-368796

Guest
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. ^_^
 

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
34
XP
252
Country
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. ^_^

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,
  • Like
Reactions: richexpert
D

Deleted-368796

Guest
Process.Start("cmd", ("/c hactool -k keys.dat --plaintext=" + this.TextBox2.Text + ".nca " + this.TextBox1.Text) ?? "");
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.
 

SimonMKWii

Professional Idiot
OP
Member
Joined
Nov 18, 2017
Messages
666
Trophies
0
Location
Melbourne, Victoria
XP
2,722
Country
Australia
You can decompile the exe with dnSpy, it's written in C#, 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 :)
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,
  • Like
Reactions: damiano2712

SocraticBliss

Well-Known Member
Member
Joined
Jun 3, 2017
Messages
130
Trophies
0
Age
34
XP
252
Country
United States
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

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
 
  • Like
Reactions: damiano2712

SimonMKWii

Professional Idiot
OP
Member
Joined
Nov 18, 2017
Messages
666
Trophies
0
Location
Melbourne, Victoria
XP
2,722
Country
Australia
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.
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.
 
D

Deleted-368796

Guest
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 ;)
 

SimonMKWii

Professional Idiot
OP
Member
Joined
Nov 18, 2017
Messages
666
Trophies
0
Location
Melbourne, Victoria
XP
2,722
Country
Australia
I cannot see the "config" option...

EDIT
Now it is there:
zymCPB1.png


@SimonMKWii : BUG (gui or hactool?): NO SPACES in woking folders otherwise it will not extract data.
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.
 

peteruk

Well-Known Member
Member
Joined
Jun 26, 2015
Messages
2,878
Trophies
1
XP
6,370
Country
United Kingdom
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,

peteruk

Well-Known Member
Member
Joined
Jun 26, 2015
Messages
2,878
Trophies
1
XP
6,370
Country
United Kingdom
Dependencies:
Requires hactool.exe and all its .dll files in the same directory.

this helps me none
I did this, no launch.


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
 

blinkzane

Panic at your moms house
Member
Joined
Jul 24, 2012
Messages
944
Trophies
0
Location
Florida
XP
1,625
Country
United States
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
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
 
  • Like
Reactions: peteruk
General chit-chat
Help Users
    KenniesNewName @ KenniesNewName: He's a billionaire