diff options
author | shchmue <shchmue@gmail.com> | 2019-07-09 13:05:07 -0400 |
---|---|---|
committer | shchmue <shchmue@gmail.com> | 2019-07-09 13:05:07 -0400 |
commit | b65668144f5393d7dc91bbd6bc2842fd96f2acd9 (patch) | |
tree | 9697d5ea7f0d27fc8e7a1619c7a97efe53ba9632 | |
parent | 31a882496f1c86a0b0c8f6fe68ac5fd091449ccc (diff) |
v1.2.5: Support Hekate 5 fuse dump, adjust UIv1.2.5
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | changelog.md | 5 | ||||
-rw-r--r-- | source/Common.cpp | 13 | ||||
-rw-r--r-- | source/KeyCollection.cpp | 2 | ||||
-rw-r--r-- | source/nx/es.c | 4 | ||||
-rw-r--r-- | source/nx/es.h | 4 |
7 files changed, 20 insertions, 12 deletions
@@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules | |||
32 | #--------------------------------------------------------------------------------- | 32 | #--------------------------------------------------------------------------------- |
33 | APP_TITLE := Lockpick | 33 | APP_TITLE := Lockpick |
34 | APP_AUTHOR := shchmue | 34 | APP_AUTHOR := shchmue |
35 | APP_VERSION := 1.2.4 | 35 | APP_VERSION := 1.2.5 |
36 | 36 | ||
37 | TARGET := $(subst $e ,_,$(notdir $(APP_TITLE))) | 37 | TARGET := $(subst $e ,_,$(notdir $(APP_TITLE))) |
38 | BUILD := build | 38 | BUILD := build |
@@ -36,7 +36,7 @@ Notes | |||
36 | 36 | ||
37 | Building | 37 | Building |
38 | = | 38 | = |
39 | Release built with [libnx commit d2e2c15](https://github.com/switchbrew/libnx/tree/d2e2c159374f18c22350846019f2a615cb35b523). | 39 | Release built with [libnx release v2.2.0](https://github.com/switchbrew/libnx). |
40 | 40 | ||
41 | Uses `freetype` which comes with `switch-portlibs` via `devkitPro pacman`: | 41 | Uses `freetype` which comes with `switch-portlibs` via `devkitPro pacman`: |
42 | ``` | 42 | ``` |
diff --git a/changelog.md b/changelog.md index 2f9040b..0481b7c 100644 --- a/changelog.md +++ b/changelog.md | |||
@@ -1,4 +1,9 @@ | |||
1 | # Changelog | 1 | # Changelog |
2 | ## Version 1.2.5 | ||
3 | * Support Hekate v5 fuse dump format | ||
4 | * Make names consistent with libnx v2.2.0 | ||
5 | * Adjust text alignment and coloring in Lockpick_RCM note | ||
6 | |||
2 | ## Version 1.2.4 | 7 | ## Version 1.2.4 |
3 | * Support new emunand FS memory layout | 8 | * Support new emunand FS memory layout |
4 | * No longer save header_key if empty | 9 | * No longer save header_key if empty |
diff --git a/source/Common.cpp b/source/Common.cpp index e8fa6ba..8fec2ff 100644 --- a/source/Common.cpp +++ b/source/Common.cpp | |||
@@ -125,8 +125,10 @@ namespace Common { | |||
125 | framebufferEnd(&fb); | 125 | framebufferEnd(&fb); |
126 | 126 | ||
127 | draw_text(0x010, 0x020, YELLOW, "Lockpick! by shchmue"); | 127 | draw_text(0x010, 0x020, YELLOW, "Lockpick! by shchmue"); |
128 | draw_text(0x190, 0x020, YELLOW, "Note: This can only dump keys 00-05 (or 00-06 on 6.2.0)"); | 128 | draw_text(0x190, 0x020, YELLOW, "Note:"); |
129 | draw_text(0x190, 0x040, YELLOW, "Use Lockpick_RCM for newer keys on firmware 7.0.0+!"); | 129 | draw_text(0x1e0, 0x020, YELLOW, "Lockpick can only dump keys 00-05 (or 00-06 on 6.2.0)"); |
130 | draw_text(0x1e0, 0x040, CYAN, "Lockpick_RCM"); | ||
131 | draw_text(0x2a0, 0x040, YELLOW, "can get newer keys on firmware 7.0.0+!"); | ||
130 | 132 | ||
131 | draw_set_rect(814, 452 + 42 * 0, 450, 42, FLAG_RED); | 133 | draw_set_rect(814, 452 + 42 * 0, 450, 42, FLAG_RED); |
132 | draw_set_rect(814, 452 + 42 * 1, 450, 42, FLAG_ORANGE); | 134 | draw_set_rect(814, 452 + 42 * 1, 450, 42, FLAG_ORANGE); |
@@ -159,8 +161,9 @@ namespace Common { | |||
159 | if (std::filesystem::exists("/backup")) { | 161 | if (std::filesystem::exists("/backup")) { |
160 | for (auto &p : std::filesystem::recursive_directory_iterator("/backup")) { | 162 | for (auto &p : std::filesystem::recursive_directory_iterator("/backup")) { |
161 | if (p.is_regular_file()) { | 163 | if (p.is_regular_file()) { |
162 | if (!sbk.found() && (p.file_size() == 0x2fc) && | 164 | if (!sbk.found() && (p.file_size() == 0x2fc || p.file_size() == 0x300) && |
163 | (std::string("fuse").compare(std::string(p.path().filename()).substr(0, 4)) == 0)) | 165 | ((p.path().filename().string().substr(0, 5).compare("fuses") == 0) || |
166 | (p.path().filename().string().substr(0, 11).compare("fuse_cached") == 0))) | ||
164 | { | 167 | { |
165 | FILE *fuse_file = fopen(p.path().c_str(), "rb"); | 168 | FILE *fuse_file = fopen(p.path().c_str(), "rb"); |
166 | if (!fuse_file) continue; | 169 | if (!fuse_file) continue; |
@@ -171,7 +174,7 @@ namespace Common { | |||
171 | fclose(fuse_file); | 174 | fclose(fuse_file); |
172 | } | 175 | } |
173 | else if (!tsec.found() && (p.file_size() == 0x20 || p.file_size() == 0x30) && | 176 | else if (!tsec.found() && (p.file_size() == 0x20 || p.file_size() == 0x30) && |
174 | (std::string("tsec").compare(std::string(p.path().filename()).substr(0, 4)) == 0)) | 177 | (p.path().filename().string().substr(0, 4).compare("tsec") == 0)) |
175 | { | 178 | { |
176 | FILE *tsec_file = fopen(p.path().c_str(), "rb"); | 179 | FILE *tsec_file = fopen(p.path().c_str(), "rb"); |
177 | if (!tsec_file) continue; | 180 | if (!tsec_file) continue; |
diff --git a/source/KeyCollection.cpp b/source/KeyCollection.cpp index b86856a..7fb23db 100644 --- a/source/KeyCollection.cpp +++ b/source/KeyCollection.cpp | |||
@@ -580,7 +580,7 @@ void KeyCollection::get_titlekeys() { | |||
580 | esInitialize(); | 580 | esInitialize(); |
581 | esCountCommonTicket(&common_count); | 581 | esCountCommonTicket(&common_count); |
582 | esCountPersonalizedTicket(&personalized_count); | 582 | esCountPersonalizedTicket(&personalized_count); |
583 | NcmRightsId common_rights_ids[common_count], personalized_rights_ids[personalized_count]; | 583 | NcmNcaId common_rights_ids[common_count], personalized_rights_ids[personalized_count]; |
584 | esListCommonTicket(&ids_written, common_rights_ids, sizeof(common_rights_ids)); | 584 | esListCommonTicket(&ids_written, common_rights_ids, sizeof(common_rights_ids)); |
585 | esListPersonalizedTicket(&ids_written, personalized_rights_ids, sizeof(personalized_rights_ids)); | 585 | esListPersonalizedTicket(&ids_written, personalized_rights_ids, sizeof(personalized_rights_ids)); |
586 | esExit(); | 586 | esExit(); |
diff --git a/source/nx/es.c b/source/nx/es.c index 0eb1a9a..0ebdbc8 100644 --- a/source/nx/es.c +++ b/source/nx/es.c | |||
@@ -97,7 +97,7 @@ Result esCountPersonalizedTicket(u32 *num_tickets) | |||
97 | return rc; | 97 | return rc; |
98 | } | 98 | } |
99 | 99 | ||
100 | Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize) { | 100 | Result esListCommonTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize) { |
101 | IpcCommand c; | 101 | IpcCommand c; |
102 | ipcInitialize(&c); | 102 | ipcInitialize(&c); |
103 | ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); | 103 | ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); |
@@ -133,7 +133,7 @@ Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t | |||
133 | return rc; | 133 | return rc; |
134 | } | 134 | } |
135 | 135 | ||
136 | Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize) { | 136 | Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize) { |
137 | IpcCommand c; | 137 | IpcCommand c; |
138 | ipcInitialize(&c); | 138 | ipcInitialize(&c); |
139 | ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); | 139 | ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); |
diff --git a/source/nx/es.h b/source/nx/es.h index f1ad03a..212e199 100644 --- a/source/nx/es.h +++ b/source/nx/es.h | |||
@@ -8,5 +8,5 @@ void esExit(); | |||
8 | 8 | ||
9 | Result esCountCommonTicket(u32 *num_tickets); //9 | 9 | Result esCountCommonTicket(u32 *num_tickets); //9 |
10 | Result esCountPersonalizedTicket(u32 *num_tickets); // 10 | 10 | Result esCountPersonalizedTicket(u32 *num_tickets); // 10 |
11 | Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize); | 11 | Result esListCommonTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize); |
12 | Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize); \ No newline at end of file | 12 | Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmNcaId *outBuf, size_t bufSize); \ No newline at end of file |