Hacking Discussion Info on SHA-256 hashes on FS patches

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country
@mrdude i tested the patches for 10.2.0 and 11.0.0 they work
now that you know how to make them what does this mean for script
or a guide so everyone can make them
Just chill dude, there's things going on that you don't know about that are not public. It's more difficult to make an auto patcher because of patch 3 and the amount changes between firmware versions. However I am sure if you wait a little while something will be released. It's better for everyone if ALL the bugs are ironed out and we all fully understand the patches, before anything gets released. There's more than enough info now on this thread now so that quite a few people will know how to make patches, and things have been simplified greatly already. Patience is a virtue!
 

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
534
Trophies
0
XP
907
Country
Bulgaria
Just chill dude, there's things going on that you don't know about that are not public. It's more difficult to make an auto patcher because of patch 3 and the amount changes between firmware versions. However I am sure if you wait a little while something will be released. It's better for everyone if ALL the bugs are ironed out and we all fully understand the patches, before anything gets released. There's more than enough info now on this thread now so that quite a few people will know how to make patches, and things have been simplified greatly already. Patience is a virtue!

take all the time you need i was just ask if its possible seen how difficult it is compared to the loader and fs patches
Thanks for everything you have done
 
Last edited by LyuboA,

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country
@crckd:

Ok thought of a good workaround to fix the patches :-)

In the batch file you created you can also search for this: SDK Version: xxx, then create a text file with the sdk version, that can then be read by the makeips file.

Example:
Firmware 11.0.1
SDK Version: 11.4.0.0
Version: 11.0.0-1280 (738198784)

Firmware 10.2
SDK Version: 10.4.0.0
Version: 10.1.0-256 (672137472)

Then in your makeips file, use 2 sets of patches - 1 set for firmware with SDK version 10 or less use patch set 1, if the SDK version is greater than 10 - use patch set 2. That way if the patches change again on higher sdk, that patch set could also be added to the script easily. That would be an easy way to solve our problem.

This was added to the end of the python file to check sdk version & create a txt file containing that info:
Code:
outlines = subprocess.check_output(['hactool','--keyset=' + keyset,'--disablekeywarns', FIRMWARE_DIR + '/' + ES_NCA])
            for line in outlines.splitlines():
                line = line.decode('ascii').replace(" ","")
                if line.startswith("SDKVersion:"):
                    f = open("sdk.txt", "w")
                    f.write((line).replace("SDKVersion:", "").replace(".", ""))
                    f.close()
        
                    #read back file to make sure our file got created properly...
                    f = open("sdk.txt", "r")
                    data = f.read()
                    f.close()
                    print("SDK:" + data)
            break

Output:
xsr9U1w.png


Next - read data in makeips file and check if greater than: xxx - example:
Code:
f = open("sdk.txt", "r")
data = f.read()
f.close()

value =  int(data)
if value < 11400:
    patterns = patterns2
else:
    patterns = patterns1
 
Last edited by mrdude,

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country
Done! Got the ES patches bit finished. Don't know If I can share or not as it uses some code that was not made by me + plus it's a bit "hacky", but generates all the right patches for now. If I get the OK from the person that gave me the code, I'll post, but maybe they want to change some stuff first or keep it private. I expect you'll find out soon. But at least that's me done with this now :-)
 

ShadowOne333

QVID PRO QVO
Developer
Joined
Jan 17, 2013
Messages
10,965
Trophies
1
XP
13,634
Country
Mexico
fingers crossed that he/she/non binary allows the use of it then, because this will be a real game changer
Agree 100%.
With these scripts and proper documentation, we won't have to worry as much about sigpatches or Nintendo going after repositories that host them.
With this, users can easily generate their own patches.
 

peteruk

Well-Known Member
Member
Joined
Jun 26, 2015
Messages
2,865
Trophies
1
XP
6,282
Country
United Kingdom
Agree 100%.
With these scripts and proper documentation, we won't have to worry as much about sigpatches or Nintendo going after repositories that host them.
With this, users can easily generate their own patches.

Mate, I love these kind of threads... where adults work together in harmony to create great software for the benefit of everyone

It really brings me back to the days just before a9lh with Dark Samus and all the guys working on it on freenode (i think), those were really good days
 
Test version for 9.2.0 to 11.0.1

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country
Here you go (for testing), edit run.bat to point to the key file, python location, firmware you want to generate es patches for. Then click on run.bat. Or you can just put keys.dat and a folder called firmware (containing firmware files), into the same folder as you extract these files.

*Remember though, patches can and do change from time to time so maybe this won't work in the next firmware version...tested from 9.20 - to 11.0.1 and generates proper patches.

I tried to mod this as best I could with my limited python knowledge, so there's lots of room for improvement, so feel free to update and post as necessary. Thanks to crckd/darkmattercore and all the others that helped on this thread + to unknown for the juicy patches and code....
 

Attachments

  • es-autoips.zip
    182.4 KB · Views: 203

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
534
Trophies
0
XP
907
Country
Bulgaria
Here you go (for testing), edit run.bat to point to the key file, python location, firmware you want to generate es patches for. Then click on run.bat. Or you can just put keys.dat and a folder called firmware (containing firmware files), into the same folder as you extract these files.

*Remember though, patches can and do change from time to time so maybe this won't work in the next firmware version...tested from 9.20 - to 11.0.1 and generates proper patches.

I tried to mod this as best I could with my limited python knowledge, so there's lots of room for improvement, so feel free to update and post as necessary. Thanks to crckd/darkmattercore and all the others that helped on this thread + to unknown for the juicy patches and code....

Thanks man
 

linuxares

I'm not a generous god!
Global Moderator
Joined
Aug 5, 2007
Messages
9,667
Trophies
1
XP
11,610
Country
Sweden
Here you go (for testing), edit run.bat to point to the key file, python location, firmware you want to generate es patches for. Then click on run.bat. Or you can just put keys.dat and a folder called firmware (containing firmware files), into the same folder as you extract these files.

*Remember though, patches can and do change from time to time so maybe this won't work in the next firmware version...tested from 9.20 - to 11.0.1 and generates proper patches.

I tried to mod this as best I could with my limited python knowledge, so there's lots of room for improvement, so feel free to update and post as necessary. Thanks to crckd/darkmattercore and all the others that helped on this thread + to unknown for the juicy patches and code....
Awesome work you all.

I put a "Important post" on it, so people that don't wanna scurry through the whole thread can find it easier.
 

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country

mrdude

Well-Known Member
Member
Joined
Dec 11, 2015
Messages
1,555
Trophies
1
Age
54
XP
4,346
Country
N
@mrdude happy to confirm patches made with your script work great tested on 10.0.4, 10.2.0 and 11.0.1

Big Thanks to you @mrdude @crckd and @DarkMatterCore
Now that we know the basics, I think this will be next.

1: Clean up/mod/improve scripts and write a batch/bash menu to incorporate loader/fw/es patches into 1 tool.
2: Create a windows standalone GUI program so we use without python.
3: Maybe some dev with good c++ coding knowledge can make this work directly from the switch?
 

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
534
Trophies
0
XP
907
Country
Bulgaria
Thanks, is it possible to know which is for fat32 and which for exfat? Not really that important but interesting to know.

the script first makes for ExFat and then for Fat32 you can see which is which in the command window

for 11.0.1 ExFat is

0BA15BB304B505633B6DA6B2C6E991B6A06EBAFB3378DF02BF6B494075976F06

and 11.0.1 Fat32 is

E399156E844EB0AA3CC5152979961C879F5E90696C1224A1BBE0FF1BCDBFD7DC
 
  • Like
Reactions: subcon959

linuxares

I'm not a generous god!
Global Moderator
Joined
Aug 5, 2007
Messages
9,667
Trophies
1
XP
11,610
Country
Sweden
the script first makes for ExFat and then for Fat32 you can see which is which in the command window

for 11.0.1 ExFat is

0BA15BB304B505633B6DA6B2C6E991B6A06EBAFB3378DF02BF6B494075976F06

and 11.0.1 Fat32 is

E399156E844EB0AA3CC5152979961C879F5E90696C1224A1BBE0FF1BCDBFD7DC
Tried on Atmosphere 0.18?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KenniesNewName @ KenniesNewName: Afrocandy looks like a good movie