Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
49c6fd8dc7 | |||
4d460e9509 |
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.1
|
APP_VERSION := 1.1.1
|
||||||
|
|
||||||
TARGET := $(subst $e ,_,$(notdir $(APP_TITLE)))
|
TARGET := $(subst $e ,_,$(notdir $(APP_TITLE)))
|
||||||
BUILD := build
|
BUILD := build
|
||||||
|
@ -366,13 +366,15 @@ void KeyCollection::get_memory_keys() {
|
|||||||
|
|
||||||
header_key_source.find_key(FSData.data);
|
header_key_source.find_key(FSData.data);
|
||||||
|
|
||||||
ESRodata.get_from_memory(ES_TID, SEG_RODATA);
|
|
||||||
for (auto k : es_keys)
|
|
||||||
k->find_key(ESRodata.data);
|
|
||||||
|
|
||||||
SSLRodata.get_from_memory(SSL_TID, SEG_RODATA);
|
SSLRodata.get_from_memory(SSL_TID, SEG_RODATA);
|
||||||
for (auto k : ssl_keys)
|
for (auto k : ssl_keys)
|
||||||
k->find_key(SSLRodata.data);
|
k->find_key(SSLRodata.data);
|
||||||
|
|
||||||
|
if (!kernelAbove200())
|
||||||
|
return;
|
||||||
|
ESRodata.get_from_memory(ES_TID, SEG_RODATA);
|
||||||
|
for (auto k : es_keys)
|
||||||
|
k->find_key(ESRodata.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyCollection::derive_keys() {
|
void KeyCollection::derive_keys() {
|
||||||
@ -435,6 +437,8 @@ void KeyCollection::derive_keys() {
|
|||||||
u32 bytes_read, file_pos = 0;
|
u32 bytes_read, file_pos = 0;
|
||||||
|
|
||||||
// dump sd seed
|
// dump sd seed
|
||||||
|
if (!kernelAbove200())
|
||||||
|
return;
|
||||||
FILE *sd_private = fopen("/Nintendo/Contents/private", "rb");
|
FILE *sd_private = fopen("/Nintendo/Contents/private", "rb");
|
||||||
if (!sd_private) return;
|
if (!sd_private) return;
|
||||||
fread(seed_vector, 0x10, 1, sd_private);
|
fread(seed_vector, 0x10, 1, sd_private);
|
||||||
@ -445,8 +449,13 @@ void KeyCollection::derive_keys() {
|
|||||||
FIL save_file;
|
FIL save_file;
|
||||||
|
|
||||||
fsOpenBisStorage(&storage, 31);
|
fsOpenBisStorage(&storage, 31);
|
||||||
if (f_mount(&fs, "", 1) || f_chdir("/save")) return;
|
if (f_mount(&fs, "", 1) ||
|
||||||
if (f_open(&save_file, "8000000000000043", FA_READ | FA_OPEN_EXISTING)) return;
|
f_chdir("/save") ||
|
||||||
|
f_open(&save_file, "8000000000000043", FA_READ | FA_OPEN_EXISTING))
|
||||||
|
{
|
||||||
|
fsStorageClose(&storage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
fr = f_read(&save_file, buffer, 0x10, &bytes_read);
|
fr = f_read(&save_file, buffer, 0x10, &bytes_read);
|
||||||
|
Reference in New Issue
Block a user