Skip to content

Commit

Permalink
Deploying to gh-pages from @ c6df8a4 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
lifehackerhansol committed Jul 15, 2023
1 parent 18ba442 commit 33ac299
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
58 changes: 45 additions & 13 deletions assets/js/selecting.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,42 @@
const DEVICE_N3DS = 1;
const DEVICE_O3DS = 0;

// Possible max minor for each major, major as key
const major_minor_map = {
0: -1, // invalidate all 0.x
1: 1,
2: 2,
3: 1,
4: 5,
5: 1,
6: 4,
7: 2,
8: 1,
9: 9,
10: 7,
11: 17
}

// Validate version
// CHN/TWN doesn't have new model
// KOR/CHN/TWN doesn't have 11.17 currently
function validate_version(major, minor, native, region, model) {
if (model == DEVICE_N3DS && ["C", "T"].includes(region)) {
return false;
}

if (major == 11 && minor == 17 && ["K", "C", "T"].includes(region)) {
return false;
}

const minor_max = major_minor_map[major];
if (!isNaN(minor_max) && minor > minor_max) {
return false;
}

return true;
}

// Soundhax
// 1.0-11.3, all regions, all consoles
function can_soundhax(major, minor, native, region, model) {
Expand Down Expand Up @@ -221,43 +257,39 @@ function is_o3ds_1117(major, minor, native, region, model) {
- Use alternate exploits; can't hack without any extra stuff
*/
function redirect() {
let major = document.getElementById("major");
let minor = document.getElementById("minor");
let nver = document.getElementById("nver");
let region = document.getElementById("region");
let isN3DS = document.getElementById("new3DS").checked;
let isO3DS = document.getElementById("old3DS").checked;
const major = document.getElementById("major").value;
const minor = document.getElementById("minor").value;
const nver = document.getElementById("nver").value;
const region = document.getElementById("region").value;
const isN3DS = document.getElementById("new3DS").checked;
const isO3DS = document.getElementById("old3DS").checked;
document.getElementById("result_noneSelected").style.display = "none";
document.getElementById("result_invalidVersion").style.display = "none";
document.getElementById("result_methodUnavailable").style.display = "none";
if ((!isN3DS) && (!isO3DS)) {
document.getElementById("result_noneSelected").style.display = "block";
return;
}
else if (major.value == 0) {
document.getElementById("result_invalidVersion").style.display = "block";
return;
}

// Realistically only one of these should be possible with the given elements
let model = -1;
if(isO3DS) model = DEVICE_O3DS
else if(isN3DS) model = DEVICE_N3DS;

if (model == DEVICE_N3DS && ["C", "T"].includes(region.value)) {
if (!validate_version(major, minor, nver, region, model)) {
document.getElementById("result_invalidVersion").style.display = "block";
return;
}

let redirected = [
const redirected = [
can_soundhax,
can_ssloth,
can_safecerthax,
can_miimine,
can_seedminer,
can_superskaterhax,
is_o3ds_1117
].some(func => func(major.value, minor.value, nver.value, region.value, model));
].some(func => func(major, minor, nver, region, model));
if (redirected) return true;

// if it actually got to this point, there is no exploit available.
Expand Down
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="https://3ds.hacks.guide/feed.xml" rel="self" type="application/atom+xml" /><link href="https://3ds.hacks.guide/" rel="alternate" type="text/html" /><updated>2023-07-13T04:14:07+00:00</updated><id>https://3ds.hacks.guide/feed.xml</id><title type="html">3DS Hacks Guide</title><subtitle>A complete guide to 3DS custom firmware</subtitle><author><name>Nintendo Homebrew</name></author></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="https://3ds.hacks.guide/feed.xml" rel="self" type="application/atom+xml" /><link href="https://3ds.hacks.guide/" rel="alternate" type="text/html" /><updated>2023-07-15T10:25:25+00:00</updated><id>https://3ds.hacks.guide/feed.xml</id><title type="html">3DS Hacks Guide</title><subtitle>A complete guide to 3DS custom firmware</subtitle><author><name>Nintendo Homebrew</name></author></feed>

0 comments on commit 33ac299

Please sign in to comment.