reswitched / pegaswitch

PegaSwitch is an exploit toolkit for the Nintendo Switch
https://reswitched.team
ISC License
934 stars 107 forks source link

Add support for firmware versions 5.0.0 to 6.0.1 #131

Closed hexkyz closed 5 years ago

hexkyz commented 5 years ago

This PR adds support for firmware versions 5.0.0 up to 6.0.1. It currently relies on two different "minmain" js files that must be switched on index.html. This method is not optimal so I would appreciate some feedback on how to better implement firmware detection and provide automatic exploit switching. Additionally, smhax availability detection has also been implemented in utils.js and propagated across relevant parts of the exploit code.

pixel-stuck commented 5 years ago

Is there any reason for two different exploits? (I assume there is, but I'm not sure) in the past we always usually just used the newest vuln for all versions

hexkyz commented 5 years ago

Formatting will be reverted to tabs on the next code changes.

@pixel-stuck The recent exploit derived from a bad source update, therefore it doesn't work on older firmware versions.

misson20000 commented 5 years ago

Can you run the indentation fix again without affecting comments/strings?

hexkyz commented 5 years ago

I've reverted the formatting to what it was before on the latest PegaSwitch commit. I've also added a numeric version variable and modified the code accordingly. I'm also using the UA string in start.js to decide which minmain file to serve. Everything was tested under 2.0.0 and 6.0.0 and is confirmed working.

misson20000 commented 5 years ago

Merged! :+1: I've squashed your commits, and reverted the space -> tabs change for some comments in sc.call since I don't think that was intentional and it's easy enough for me to just do that myself.