mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Add key file exporting to hactoolnet
This commit is contained in:
parent
e740d13bbe
commit
e798a8dd45
2 changed files with 13 additions and 1 deletions
|
@ -202,6 +202,8 @@ namespace hactoolnet
|
|||
sb.AppendLine(" --outdir <dir> Specify directory path to save contents to.");
|
||||
sb.AppendLine(" --debugoutdir <dir> Specify directory path to save intermediate data to for debugging.");
|
||||
sb.AppendLine(" --sign Sign the save file. (Requires device_key in key file)");
|
||||
sb.AppendLine("Keygen options:");
|
||||
sb.AppendLine(" --outdir <dir> Specify directory path to save key files to.");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
|
|
@ -97,6 +97,16 @@ namespace hactoolnet
|
|||
{
|
||||
ctx.Keyset.SetSdSeed(ctx.Options.SdSeed.ToBytes());
|
||||
}
|
||||
|
||||
if (ctx.Options.OutDir != null)
|
||||
{
|
||||
string dir = ctx.Options.OutDir;
|
||||
Directory.CreateDirectory(dir);
|
||||
|
||||
File.WriteAllText(Path.Combine(dir, "prod.keys"), ExternalKeys.PrintCommonKeys(ctx.Keyset));
|
||||
File.WriteAllText(Path.Combine(dir, "console.keys"), ExternalKeys.PrintUniqueKeys(ctx.Keyset));
|
||||
File.WriteAllText(Path.Combine(dir, "title.keys"), ExternalKeys.PrintTitleKeys(ctx.Keyset));
|
||||
}
|
||||
}
|
||||
|
||||
private static void ProcessKeygen(Context ctx)
|
||||
|
|
Loading…
Reference in a new issue