Hacking Discussion Info on SHA-256 hashes on FS patches

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Does the order count? As soon as the offset and the value are correctly written it shouldn't be a problem should it?

Edit: Can you check if everything has been corrected in this release?
See here for loader - newline needs added:

7rPrN52.png


Also when generating patches to switch folder - no fs ips is being made for exfat as explained above.
 

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Yep, that fixes the ips files now, just need to add the newline before "[Loader:xxxx]"
Can you please test this release if it solves your patches.ini issue (if you have an exisiting patches with the newline issue, put a newline manually)? Can you also try if the patches.ini works correctly when you're in exFat (when you don't have a patches.ini in the bootloader in the first place and when you already have one)? Thank you

Edit: Fixed an issue where I forgot to close a file
 
Last edited by dogcsty,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Can you please test this release if it solves your patches.ini issue (if you have an exisiting patches with the newline issue, put a newline manually)? Can you also try if the patches.ini works correctly when you're in exFat (when you don't have a patches.ini in the bootloader in the first place and when you already have one)? Thank you

Edit: Fixed an issue where I forgot to close a file
Yep, that's fixed the patches.ini file now. I have only tried on 14.1.2 firmware and firmware 11.0.0 - that's everything fixed now.

Also another point, you should add an option to reboot the switch once the patches have been made, if you need code for this I can supply it. As an extra you should also put a switch in so that if keys.dat does not exist you can use prod.keys that have been generated by Lockpic_rcm. That way you can directly dump the keys and make the patches with no computer needed if there's a firmware update that changed the keys.
 
Last edited by mrdude,
  • Like
Reactions: impeeza and Mrblue

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Yep, that's fixed the patches.ini file now. I have only tried on 14.1.2 firmware and firmware 11.0.0 - that's everything fixed now.

Also another point, you should add an option to reboot the switch once the patches have been made, if you need code for this I can supply it. As an extra you should also put a switch in so that if keys.dat does not exist you can use prod.keys that have been generated by Lockpic_rcm. That way you can directly dump the keys and make the patches with no computer needed if there's a firmware update that changed the keys.
Thank you for your feedback. Like hactool the app already looks for a prod.keys in the switch folder if no keys.dat is available. Asking to reboot the switch is a great addition I'll add it when I have the time. I've corrected some other bugs with the handling of the files. Please use this release for testing

Edit: corrected some return carriage stuff
 
Last edited by dogcsty,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Thank you for your feedback. Like hactool the app already looks for a prod.keys in the switch folder if no keys.dat is available. Asking to reboot the switch is a great addition I'll add it when I have the time. I've corrected some other bugs with the handling of the files. Please use this release for testing
Thanks, I have a out of date prod.keys in the switch folder (for testing), I removed keys.dat - so was expected an error.

I get the message - Error - failed to decrypt a file. make sure you have keys.dat. Anyway the app freezes at 25% because of this, which I figured it would. Would it be possible to quit trying to decrypt at this point to stop the app freezing. I know that sounds a bit anal, but if someone updates their firmware and the keys changed, and they tried to generate the patches - they might not know the keys are out of date, maybe add a message to re-dump their keys with lockpic_rmc or something. Also if decryption failed, temp folder and dumped loader remains in your apps folder, and when you re-try to make the patches it crashes Atmosphere - maybe remove this folder if it exists before generating the patches.
 
Last edited by mrdude,

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Thanks, I have a out of date prod.keys in the switch folder (for testing), I removed keys.dat - so was expected an error.

I get the message - Error - failed to decrypt a file. make sure you have keys.dat. Anyway the app freezes at 25% because of this, which I figured it would. Would it be possible to quit trying to decrypt at this point to stop the app freezing. I know that sounds a bit anal, but if someone updates their firmware and the keys changed, and they tried to generate the patches - they might not know the keys are out of date, maybe add a message to re-dump their keys with lockpic_rmc or something. Also if decryption failed, temp folder remains in your apps folder, and when you re-try to make the patches it crashes Atmoshphere - maybe remove this folder if it exists before generating the patches.
Can you try with the app I just posted? Tested with this one and it worked without a keys.dat. Btw the app isn't freezing I just stop the progress bar (you can press b to go back to the main menu) but the exception is handled. I normally remove the temp folder before retrying. I've tested with the new app I posted didnt have any crash from atmosphere
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Can you try with the app I just posted? Tested with this one and it worked without a keys.dat. Btw the app isn't freezing I just stop the progress bar (you can press b to go back to the main menu) but the exception is handled. I normally remove the temp folder before retrying. I've tested with the new app I posted didnt have any crash from atmosphere
That's the one I tried with.

If you remove all temp folders and dumped loader + keys.dat from your app folder. The mod prod.keys and remove references to key 0D (for decrypting firmware 14.1.2), and then run your app, you'll see what I mean.
 
Last edited by mrdude,

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
That's the one I tried with.

If you remove all temp folders and dumped loader + keys.dat from your app folder. The mod prod.keys and remove references to key 0D (for decrypting firmware 14.1.2), and then run your app, you'll see what I mean.
I tried spamming around when no keys were placed and I can't seem to make it crash. What do you have on your switch folder?
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
I tried spamming around when no keys were placed and I can't seem to make it crash. What do you have on your switch folder?
It seems if I don't have keys.dat and only have prod.keys in the switch folder - with this new version, the app crashes trying to generate the loader. If I remove prod.keys and just have keys.dat in the app folder, still freezes generating IPS Loader patch screen. The switch freezes - .press home and have a black screen, eventaully get a reboot crash: Error Code 2144-001 (0x29).
 
Last edited by mrdude,

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
It seems if I also have dev.keys or title.keys in the switch folder this makes it crash - but when I ftp into the switch and delete those then it's OK, do you have some sort of wildcard search for keys in the code?
I added a titlekey, removed it, added dev.keys prod.keys removed it spammed the hell of the buttons and I still can't get it to crash.

The search for the keys is the same than what hactool does - it looks for a dev.keys or a prod.keys in a home folder (in your pc it is located in users/.switch and on the switch I put it in the switch folder) then hactool does the rest.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
This should fix the crash. Can you please test it on your end? Thank you
I did a clean install of this, removed all my keys and used lockpic_rcm to generate a new set of keys. Run your app (not in applet mode), and clicked Generate Everything, Directly copy the generated files - NO, The app crashes instantly. (I didn't put keys.dat in the folder, just tried switch/prod.keys)

Next test - remove prod.keys from switch folder, put keys.dat in the app folder - then do the same test above - app freezes trying to generate the IPS Loader patch.
 
Last edited by mrdude,
  • Like
Reactions: dogcsty

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
I did a clean install of this, removed all my keys and used lockpic_rcm to generate a new set of keys. Run your app (not in applet mode), and clicked Generate Everything, Directly copy the generated files - NO, app crashes instantly.
Great news! I think that leaving a message telling people to update their keys is a good idea I' ll do that after I'm done hitting the gym. I'll add the option to restart the switch maybe tomorrow. Thank you for testing this I really appreciate it!
 
  • Like
Reactions: mrdude

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Thanks for signing up at LinusTechTips
  • QuarterCut @ QuarterCut:
    holey shmoley!
  • BigOnYa @ BigOnYa:
    Your credit card has been charged. Thank you.
  • K3Nv2 @ K3Nv2:
    Your screwdriverPlus will arrive in three weeks
    +1
  • QuarterCut @ QuarterCut:
    K64_Waddle_Dee_Artwork_1.jpg

    my reaction to such information
    +2
  • BigOnYa @ BigOnYa:
    Press 1 for English. Press 2 for Pig Latin. Or press 3 to speak to a representative.
  • BakerMan @ BakerMan:
    guys, i need help, i got into an argument about what genre radioactive is, and i forgot who made it
  • Sicklyboy @ Sicklyboy:
    @BakerMan, Imagine Dragons
  • Sicklyboy @ Sicklyboy:
    Dragon deez nuts across yo face GOTEEM
  • Sicklyboy @ Sicklyboy:
    lmao now I realize that was probably the joke in the first place
    +1
  • BakerMan @ BakerMan:
    IMAGINE DRAGON DEEZ NUTS ACROSS YO- FUCK HE BEAT ME TO IT
  • BigOnYa @ BigOnYa:
    You have selected 4 - Death by Snu Snu, please stand by...
    +1
  • BakerMan @ BakerMan:
    lucky bastard
    +1
  • Sicklyboy @ Sicklyboy:
    hahahaha I'm half way through a bag off my Volcano and my tolerance is way down because I haven't been smoking much lately, so I was a little slow to catch that that was what your angle was 🤣🤣
    +1
  • Sicklyboy @ Sicklyboy:
    Also I was just excited to know a music reference for once (I am the LAST person in the world that you want on your trivia team)
    +2
  • K3Nv2 @ K3Nv2:
    Bummer webos 7.4 isnt working with dejavuln-autoroot
  • Sicklyboy @ Sicklyboy:
    PS4 right? I think that's what mine's on. Or 5.6, maybe.
  • K3Nv2 @ K3Nv2:
    [!] Installation failed (devmode_enabled not recognized)
  • K3Nv2 @ K3Nv2:
    0.5 seemed to work whatever lol i wont bitch
  • Alysh_Graham @ Alysh_Graham:
    Hehehe
    Alysh_Graham @ Alysh_Graham: Hehehe