mirror of
https://github.com/shchmue/Lockpick.git
synced 2024-11-25 09:56:55 +01:00
No longer try dumping SD seed or ES keys on 1.0.0
This commit is contained in:
parent
922cf3f4c4
commit
4d460e9509
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user