-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
110 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
using LibSceSharp; | ||
|
||
namespace Refresher.Core.Patching; | ||
|
||
public class EncryptionDetails | ||
{ | ||
public string? LicenseDirectory { get; internal set; } | ||
public LibSce? Sce { get; internal set; } | ||
public Self? Self { get; internal set; } | ||
|
||
public string? DownloadedActDatPath { get; internal set; } | ||
public string? DownloadedLicensePath { get; internal set; } | ||
public byte[]? ConsoleIdps { get; internal set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
...Pipelines/Steps/ReadEbootContentIdStep.cs → ...re/Pipelines/Steps/LoadAndReadSelfStep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
using SCEToolSharp; | ||
using LibSceSharp; | ||
|
||
namespace Refresher.Core.Pipelines.Steps; | ||
|
||
public class ReadEbootContentIdStep : Step | ||
public class LoadAndReadSelfStep : Step | ||
{ | ||
public ReadEbootContentIdStep(Pipeline pipeline) : base(pipeline) | ||
{} | ||
public LoadAndReadSelfStep(Pipeline pipeline) : base(pipeline) | ||
{ | ||
} | ||
|
||
public override float Progress { get; protected set; } | ||
public override Task ExecuteAsync(CancellationToken cancellationToken = default) | ||
{ | ||
string ebootPath = this.Game.DownloadedEbootPath!; | ||
Self self = new(this.Encryption.Sce!, File.ReadAllBytes(this.Game.DownloadedEbootPath!), true); | ||
this.Encryption.Self = self; | ||
|
||
LibSceToolSharp.Init(); | ||
this.Progress = 0.5f; | ||
|
||
string? contentId = LibSceToolSharp.GetContentId(ebootPath)?.TrimEnd('\0'); | ||
this.Game.ContentId = contentId; | ||
|
||
this.Progress = 1f; | ||
string? contentId = this.Encryption.Self!.ContentId; | ||
|
||
if(contentId != null) | ||
State.Logger.LogDebug(InfoRetrieval, "Got content ID from the game's EBOOT: {0}", contentId); | ||
else | ||
State.Logger.LogDebug(InfoRetrieval, "Unable to find content ID in the game's EBOOT."); | ||
|
||
this.Game.ContentId = contentId; | ||
this.Game.ShouldUseNpdrmEncryption = self.NeedsNpdrmLicense; | ||
|
||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters