mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-03-21 17:24:28 -05:00
Removed ability to download Cemu files (broken feature)
This commit is contained in:
parent
d2e1e9405b
commit
09dee1722b
30
package-lock.json
generated
30
package-lock.json
generated
|
|
@ -10,7 +10,6 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@discordjs/rest": "^0.5.0",
|
||||
"adm-zip": "^0.5.9",
|
||||
"browserify": "^17.0.0",
|
||||
"colors": "^1.4.0",
|
||||
"cookie-parser": "^1.4.5",
|
||||
|
|
@ -29,8 +28,7 @@
|
|||
"mongoose": "^6.4.0",
|
||||
"morgan": "^1.10.0",
|
||||
"nodemailer": "^6.7.5",
|
||||
"stripe": "^9.9.0",
|
||||
"uuid": "^8.3.2"
|
||||
"stripe": "^9.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0"
|
||||
|
|
@ -395,14 +393,6 @@
|
|||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz",
|
||||
"integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
|
|
@ -4499,14 +4489,6 @@
|
|||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-compile-cache": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
|
||||
|
|
@ -4917,11 +4899,6 @@
|
|||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
|
||||
"integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA=="
|
||||
},
|
||||
"adm-zip": {
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz",
|
||||
"integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg=="
|
||||
},
|
||||
"ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
|
|
@ -8090,11 +8067,6 @@
|
|||
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
"homepage": "https://github.com/PretendoNetwork/website#readme",
|
||||
"dependencies": {
|
||||
"@discordjs/rest": "^0.5.0",
|
||||
"adm-zip": "^0.5.9",
|
||||
"browserify": "^17.0.0",
|
||||
"colors": "^1.4.0",
|
||||
"cookie-parser": "^1.4.5",
|
||||
|
|
@ -42,8 +41,7 @@
|
|||
"mongoose": "^6.4.0",
|
||||
"morgan": "^1.10.0",
|
||||
"nodemailer": "^6.7.5",
|
||||
"stripe": "^9.9.0",
|
||||
"uuid": "^8.3.2"
|
||||
"stripe": "^9.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0"
|
||||
|
|
|
|||
|
|
@ -1,45 +1,6 @@
|
|||
const onlineFilesModal = document.querySelector('.modal-wrapper#onlinefiles');
|
||||
const onlineFilesModalButtonConfirm = document.getElementById('onlineFilesConfirmButton');
|
||||
const onlineFilesModalButtonClose = document.getElementById('onlineFilesCloseButton');
|
||||
const onlineFilesModalPasswordInput = document.getElementById('password');
|
||||
|
||||
const editSettingsModal = document.querySelector('.modal-wrapper#edit-settings');
|
||||
const editSettingsModalButtonClose = document.getElementById('editSettingsCloseButton');
|
||||
|
||||
document.getElementById('download-cemu-files')?.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
|
||||
onlineFilesModal.classList.remove('hidden');
|
||||
});
|
||||
|
||||
onlineFilesModalButtonConfirm?.addEventListener('click', () => {
|
||||
fetch('/account/online-files', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
password: onlineFilesModalPasswordInput.value
|
||||
})
|
||||
})
|
||||
.then(response => response.blob())
|
||||
.then(blob => URL.createObjectURL(blob))
|
||||
.then(blobUrl => {
|
||||
const a = document.createElement('a');
|
||||
a.href = blobUrl;
|
||||
a.setAttribute('download', 'Cemu Pretendo Online Files.zip');
|
||||
a.click();
|
||||
|
||||
onlineFilesModal.classList.add('hidden');
|
||||
})
|
||||
.catch(console.log);
|
||||
});
|
||||
|
||||
onlineFilesModalButtonClose?.addEventListener('click', () => {
|
||||
onlineFilesModal.classList.add('hidden');
|
||||
});
|
||||
|
||||
editSettingsModalButtonClose?.addEventListener('click', () => {
|
||||
editSettingsModal.classList.add('hidden');
|
||||
});
|
||||
|
|
@ -47,7 +8,7 @@ editSettingsModalButtonClose?.addEventListener('click', () => {
|
|||
document.addEventListener('click', event => {
|
||||
if (event.target.classList.contains('edit')) {
|
||||
event.preventDefault();
|
||||
|
||||
|
||||
editSettingsModal.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
const express = require('express');
|
||||
const crypto = require('crypto');
|
||||
const DiscordOauth2 = require('discord-oauth2');
|
||||
const { v4: uuidv4 } = require('uuid');
|
||||
const AdmZip = require('adm-zip');
|
||||
const Stripe = require('stripe');
|
||||
const { REST: DiscordRest } = require('@discordjs/rest');
|
||||
const { Routes: DiscordRoutes } = require('discord-api-types/v10');
|
||||
|
|
@ -242,47 +240,6 @@ router.get('/remove/discord', requireLoginMiddleware, async (request, response)
|
|||
}
|
||||
});
|
||||
|
||||
router.post('/online-files', requireLoginMiddleware, async (request, response) => {
|
||||
const { account } = request;
|
||||
const { password } = request.body;
|
||||
|
||||
const hashedPassword = util.nintendoPasswordHash(password, account.pid);
|
||||
|
||||
const miiNameBuffer = Buffer.alloc(0x16);
|
||||
const miiName = Buffer.from(account.mii.name, 'utf16le').swap16();
|
||||
miiName.copy(miiNameBuffer);
|
||||
|
||||
let accountDat = 'AccountInstance_00000000\n';
|
||||
accountDat += 'PersistentId=80000001\n';
|
||||
accountDat += 'TransferableIdBase=0\n';
|
||||
accountDat += `Uuid=${uuidv4().replace(/-/g, '')}\n`;
|
||||
accountDat += `MiiData=${Buffer.from(account.mii.data, 'base64').toString('hex')}\n`;
|
||||
accountDat += `MiiName=${miiNameBuffer.toString('hex')}\n`;
|
||||
accountDat += `AccountId=${account.username}\n`;
|
||||
accountDat += 'BirthYear=0\n';
|
||||
accountDat += 'BirthMonth=0\n';
|
||||
accountDat += 'BirthDay=0\n';
|
||||
accountDat += 'Gender=0\n';
|
||||
accountDat += `EmailAddress=${account.email.address}\n`;
|
||||
accountDat += 'Country=0\n';
|
||||
accountDat += 'SimpleAddressId=0\n';
|
||||
accountDat += `PrincipalId=${account.pid.toString(16)}\n`;
|
||||
accountDat += 'IsPasswordCacheEnabled=1\n';
|
||||
accountDat += `AccountPasswordCache=${hashedPassword}`;
|
||||
|
||||
const onlineFiles = new AdmZip();
|
||||
|
||||
onlineFiles.addFile('mlc01/usr/save/system/act/80000001/account.dat', Buffer.from(accountDat)); // Minimal account.dat
|
||||
onlineFiles.addFile('otp.bin', Buffer.alloc(0x400)); // nulled OTP
|
||||
onlineFiles.addFile('seeprom.bin', Buffer.alloc(0x200)); // nulled SEEPROM
|
||||
|
||||
response.status(200);
|
||||
response.set('Content-Disposition', 'attachment; filename="Cemu Pretendo Online Files.zip');
|
||||
response.set('Content-Type', 'application/zip');
|
||||
|
||||
response.end(onlineFiles.toBuffer());
|
||||
});
|
||||
|
||||
router.get('/miieditor', requireLoginMiddleware, async (request, response) => {
|
||||
const { account } = request;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,6 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="button secondary" id="download-cemu-files" href="/account/online-files" download>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
|
||||
<p class="caption">{{ locale.account.settings.downloadFiles }}</p>
|
||||
<p class="cemu-warning">{{ locale.account.settings.downloadFilesDescription }}</p>
|
||||
</a>
|
||||
|
||||
<a class="button secondary" id="account-upgrade" href="/account/upgrade">
|
||||
<p class="caption">{{ locale.account.settings.upgrade }}</p>
|
||||
</a>
|
||||
|
|
@ -185,18 +179,6 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="modal-wrapper hidden" id="onlinefiles">
|
||||
<div class="modal">
|
||||
<h1 class="title dot">{{ locale.account.settings.settingCards.password }}</h1>
|
||||
<p class="modal-caption">{{ locale.account.settings.settingCards.passwordPrompt }}</p>
|
||||
<input name="password" id="password" type="password" required />
|
||||
<div class="modal-button-wrapper">
|
||||
<button class="button cancel" id="onlineFilesCloseButton">{{ locale.modals.cancel }}</button>
|
||||
<button class="button primary confirm" id="onlineFilesConfirmButton">{{ locale.modals.confirm }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-wrapper hidden" id="edit-settings">
|
||||
<div class="modal">
|
||||
<h1 class="title dot">{{ locale.account.settings.unavailable }}</h1>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user