mirror of
https://github.com/shchmue/Lockpick.git
synced 2024-11-24 19:46:53 +01:00
v1.2.5: Support Hekate 5 fuse dump, adjust UI
This commit is contained in:
parent
31a882496f
commit
b65668144f
2
Makefile
2
Makefile
@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
APP_TITLE := Lockpick
|
APP_TITLE := Lockpick
|
||||||
APP_AUTHOR := shchmue
|
APP_AUTHOR := shchmue
|
||||||
APP_VERSION := 1.2.4
|
APP_VERSION := 1.2.5
|
||||||
|
|
||||||
TARGET := $(subst $e ,_,$(notdir $(APP_TITLE)))
|
TARGET := $(subst $e ,_,$(notdir $(APP_TITLE)))
|
||||||
BUILD := build
|
BUILD := build
|
||||||
|
@ -36,7 +36,7 @@ Notes
|
|||||||
|
|
||||||
Building
|
Building
|
||||||
=
|
=
|
||||||
Release built with [libnx commit d2e2c15](https://github.com/switchbrew/libnx/tree/d2e2c159374f18c22350846019f2a615cb35b523).
|
Release built with [libnx release v2.2.0](https://github.com/switchbrew/libnx).
|
||||||
|
|
||||||
Uses `freetype` which comes with `switch-portlibs` via `devkitPro pacman`:
|
Uses `freetype` which comes with `switch-portlibs` via `devkitPro pacman`:
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
## Version 1.2.5
|
||||||
|
* Support Hekate v5 fuse dump format
|
||||||
|
* Make names consistent with libnx v2.2.0
|
||||||
|
* Adjust text alignment and coloring in Lockpick_RCM note
|
||||||
|
|
||||||
## Version 1.2.4
|
## Version 1.2.4
|
||||||
* Support new emunand FS memory layout
|
* Support new emunand FS memory layout
|
||||||
* No longer save header_key if empty
|
* No longer save header_key if empty
|
||||||
|
@ -125,8 +125,10 @@ namespace Common {
|
|||||||
framebufferEnd(&fb);
|
framebufferEnd(&fb);
|
||||||
|
|
||||||
draw_text(0x010, 0x020, YELLOW, "Lockpick! by shchmue");
|
draw_text(0x010, 0x020, YELLOW, "Lockpick! by shchmue");
|
||||||
draw_text(0x190, 0x020, YELLOW, "Note: This can only dump keys 00-05 (or 00-06 on 6.2.0)");
|
draw_text(0x190, 0x020, YELLOW, "Note:");
|
||||||
draw_text(0x190, 0x040, YELLOW, "Use Lockpick_RCM for newer keys on firmware 7.0.0+!");
|
draw_text(0x1e0, 0x020, YELLOW, "Lockpick can only dump keys 00-05 (or 00-06 on 6.2.0)");
|
||||||
|
draw_text(0x1e0, 0x040, CYAN, "Lockpick_RCM");
|
||||||
|
draw_text(0x2a0, 0x040, YELLOW, "can get newer keys on firmware 7.0.0+!");
|
||||||
|
|
||||||
draw_set_rect(814, 452 + 42 * 0, 450, 42, FLAG_RED);
|
draw_set_rect(814, 452 + 42 * 0, 450, 42, FLAG_RED);
|
||||||
draw_set_rect(814, 452 + 42 * 1, 450, 42, FLAG_ORANGE);
|
draw_set_rect(814, 452 + 42 * 1, 450, 42, FLAG_ORANGE);
|
||||||
@ -159,8 +161,9 @@ namespace Common {
|
|||||||
if (std::filesystem::exists("/backup")) {
|
if (std::filesystem::exists("/backup")) {
|
||||||
for (auto &p : std::filesystem::recursive_directory_iterator("/backup")) {
|
for (auto &p : std::filesystem::recursive_directory_iterator("/backup")) {
|
||||||
if (p.is_regular_file()) {
|
if (p.is_regular_file()) {
|
||||||
if (!sbk.found() && (p.file_size() == 0x2fc) &&
|
if (!sbk.found() && (p.file_size() == 0x2fc || p.file_size() == 0x300) &&
|
||||||
(std::string("fuse").compare(std::string(p.path().filename()).substr(0, 4)) == 0))
|
((p.path().filename().string().substr(0, 5).compare("fuses") == 0) ||
|
||||||
|
(p.path().filename().string().substr(0, 11).compare("fuse_cached") == 0)))
|
||||||
{
|
{
|
||||||
FILE *fuse_file = fopen(p.path().c_str(), "rb");
|
FILE *fuse_file = fopen(p.path().c_str(), "rb");
|
||||||
if (!fuse_file) continue;
|
if (!fuse_file) continue;
|
||||||
@ -171,7 +174,7 @@ namespace Common {
|
|||||||
fclose(fuse_file);
|
fclose(fuse_file);
|
||||||
}
|
}
|
||||||
else if (!tsec.found() && (p.file_size() == 0x20 || p.file_size() == 0x30) &&
|
else if (!tsec.found() && (p.file_size() == 0x20 || p.file_size() == 0x30) &&
|
||||||
(std::string("tsec").compare(std::string(p.path().filename()).substr(0, 4)) == 0))
|
(p.path().filename().string().substr(0, 4).compare("tsec") == 0))
|
||||||
{
|
{
|
||||||
FILE *tsec_file = fopen(p.path().c_str(), "rb");
|
FILE *tsec_file = fopen(p.path().c_str(), "rb");
|
||||||
if (!tsec_file) continue;
|
if (!tsec_file) continue;
|
||||||
|
@ -580,7 +580,7 @@ void KeyCollection::get_titlekeys() {
|
|||||||
esInitialize();
|
esInitialize();
|
||||||
esCountCommonTicket(&common_count);
|
esCountCommonTicket(&common_count);
|
||||||
esCountPersonalizedTicket(&personalized_count);
|
esCountPersonalizedTicket(&personalized_count);
|
||||||
NcmRightsId common_rights_ids[common_count], personalized_rights_ids[personalized_count];
|
NcmNcaId common_rights_ids[common_count], personalized_rights_ids[personalized_count];
|
||||||
esListCommonTicket(&ids_written, common_rights_ids, sizeof(common_rights_ids));
|
esListCommonTicket(&ids_written, common_rights_ids, sizeof(common_rights_ids));
|
||||||
esListPersonalizedTicket(&ids_written, personalized_rights_ids, sizeof(personalized_rights_ids));
|
esListPersonalizedTicket(&ids_written, personalized_rights_ids, sizeof(personalized_rights_ids));
|
||||||
esExit();
|
esExit();
|
||||||
|
@ -97,7 +97,7 @@ Result esCountPersonalizedTicket(u32 *num_tickets)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize) {
|
Result esListCommonTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize) {
|
||||||
IpcCommand c;
|
IpcCommand c;
|
||||||
ipcInitialize(&c);
|
ipcInitialize(&c);
|
||||||
ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal);
|
ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal);
|
||||||
@ -133,7 +133,7 @@ Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize) {
|
Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize) {
|
||||||
IpcCommand c;
|
IpcCommand c;
|
||||||
ipcInitialize(&c);
|
ipcInitialize(&c);
|
||||||
ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal);
|
ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal);
|
||||||
|
@ -8,5 +8,5 @@ void esExit();
|
|||||||
|
|
||||||
Result esCountCommonTicket(u32 *num_tickets); //9
|
Result esCountCommonTicket(u32 *num_tickets); //9
|
||||||
Result esCountPersonalizedTicket(u32 *num_tickets); // 10
|
Result esCountPersonalizedTicket(u32 *num_tickets); // 10
|
||||||
Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize);
|
Result esListCommonTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize);
|
||||||
Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize);
|
Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize);
|
Loading…
Reference in New Issue
Block a user