Merge pull request #74 from lordfriky/standard_payloads
Use standard payload files and update the payloads automaticallypull/76/head
commit
41b35f84f8
|
@ -0,0 +1,83 @@
|
|||
name: Update payloads
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 3 * * 5" # 3:00 am on fridays
|
||||
jobs:
|
||||
Update-Payloads:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install jq
|
||||
run: sudo apt install -y jq
|
||||
|
||||
- name: Determine actual and latest versions of all payloads
|
||||
run: |
|
||||
# To-do: Maybe improve this process?
|
||||
|
||||
# Actual versions
|
||||
echo "AMS_VERSION=$(sed -n 5p payloads/payloads.json | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
echo "HKT_VERSION=$(sed -n 10p payloads/payloads.json | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
echo "TEX_VERSION=$(sed -n 15p payloads/payloads.json | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
|
||||
# Latest versions
|
||||
echo "AMS_LATEST=$(curl -s https://api.github.com/repos/Atmosphere-NX/Atmosphere/releases/latest | grep tag_name | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
echo "HKT_LATEST=$(curl -s https://api.github.com/repos/CTCaer/hekate/releases/latest | grep tag_name | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
echo "TEX_LATEST=$(curl -s https://api.github.com/repos/suchmememanyskill/TegraExplorer/releases/latest | grep tag_name | cut -d '"' -f4)" >> $GITHUB_ENV
|
||||
- name: Update required payloads
|
||||
run: |
|
||||
mkdir payloads/temp && cd payloads/temp
|
||||
UPDATE=false
|
||||
|
||||
if [[ "$AMS_VERSION" -ne "AMS_LATEST" ]]
|
||||
then
|
||||
UPDATE=true
|
||||
rm ../ams-*.bin
|
||||
wget $(curl -s https://api.github.com/repos/Atmosphere-NX/Atmosphere/releases/latest | grep browser_download_url | grep fusee.bin | cut -d '"' -f4)
|
||||
mv fusee.bin ../ams-$AMS_LATEST.bin
|
||||
|
||||
jq --arg version "$AMS_LATEST" '.payloads[0].version |= $version' ../payloads.json | jq --arg path "payloads/ams-$AMS_LATEST.bin" '.payloads[0].path |= $path' > ../payloads_temp.json
|
||||
mv ../payloads_temp.json ../payloads.json
|
||||
fi
|
||||
|
||||
if [[ "$HKT_VERSION" -ne "HKT_LATEST" ]]
|
||||
then
|
||||
UPDATE=true
|
||||
rm ../hekate-*.bin
|
||||
wget $(curl -s https://api.github.com/repos/CTCaer/hekate/releases/latest | grep browser_download_url | grep "hekate_ctcaer_.*\.zip" | cut -d '"' -f4)
|
||||
unzip hekate_ctcaer_*.zip
|
||||
mv hekate_ctcaer_*.bin ../hekate-$HKT_LATEST.bin
|
||||
|
||||
jq --arg version "$HKT_LATEST" '.payloads[1].version |= $version' ../payloads.json | jq --arg path "payloads/hekate-$HKT_LATEST.bin" '.payloads[1].path |= $path' > ../payloads_temp.json
|
||||
mv ../payloads_temp.json ../payloads.json
|
||||
fi
|
||||
|
||||
if [[ "$TEX_VERSION" -ne "$TEX_LATEST" ]]
|
||||
then
|
||||
UPDATE=true
|
||||
rm ../tegraexplorer-*.bin
|
||||
wget $(curl -s https://api.github.com/repos/suchmememanyskill/TegraExplorer/releases/latest | grep browser_download_url | grep TegraExplorer.bin | cut -d '"' -f4)
|
||||
mv TegraExplorer.bin ../tegraexplorer-$TEX_LATEST.bin
|
||||
|
||||
jq --arg version "$TEX_LATEST" '.payloads[2].version |= $version' ../payloads.json | jq --arg path "payloads/hekate-$TEX_LATEST.bin" '.payloads[2].path |= $path' > ../payloads_temp.json
|
||||
mv ../payloads_temp.json ../payloads.json
|
||||
fi
|
||||
|
||||
echo "UPDATE=$UPDATE" >> $GITHUB_ENV
|
||||
cd ../.. && rm -r payloads/temp
|
||||
|
||||
- name: Commit changes if necessary
|
||||
run: |
|
||||
if [[ "$UPDATE" -eq true ]]
|
||||
then
|
||||
git config --global user.name 'GitHub Actions'
|
||||
git config --global user.email 'github-actions@users.noreply.github.com'
|
||||
git add --all
|
||||
git commit -am ":robot: Payloads updated automatically"
|
||||
git push
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -14,13 +14,7 @@ let deDE = {
|
|||
"liLaunch" :"Falls alles richtig läuft, sollte der Payload gesendet werden!",
|
||||
"labelContribute" :'Möchtest du helfen eine Übersetzung hinzuzufügen, zu verbessern oder einen Payload hinzuzufügen besuche <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">diese Seite</a>.',
|
||||
"h1SetupDelivery" :"Payload-Einstellungen",
|
||||
"h4SelectPayload" :"Wähle einen Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched Test Payload (fusee)",
|
||||
"optionUpload" :"Eigenen Payload hochladen",
|
||||
"h4SelectPayload" :"Wähle einen Payload:"
|
||||
"h3Log" :"Protokoll:",
|
||||
"h4GetByteArray" :"Erhalte den Payload Byte-Array (nicht senden)",
|
||||
"goButton" :"Payload senden!",
|
||||
|
|
|
@ -15,12 +15,6 @@ let duNL = {
|
|||
"labelContribute" :'Als je wilt helpen met vertalen of het bijwerken/toevoegen van een payload, kijk dan naar <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">dit</a>.',
|
||||
"h1SetupDelivery" :"Setup Payload Versturing",
|
||||
"h4SelectPayload" :"Selecteer Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS (All Versions)",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched test payload (fusee)",
|
||||
"optionUpload" :"Upload Payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Krijg payload byte reeks (Niet sploiten)",
|
||||
"goButton" :"Verstuur Payload!",
|
||||
|
|
|
@ -14,10 +14,6 @@ let enUS = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"Setup Payload Delivery",
|
||||
"h4SelectPayload" :"Select Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched test payload (fusee)",
|
||||
"optionUpload" :"Upload Payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
||||
"goButton" :"Deliver Payload!",
|
||||
|
|
|
@ -15,10 +15,6 @@ let esMX = {
|
|||
"labelContribute" :'Si te gustaría ayudar añadiendo otra traducción o actualizando/añadiendo un payload, revisa <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">esto</a>.',
|
||||
"h1SetupDelivery" :"Configurar Payload a Enviar",
|
||||
"h4SelectPayload" :"Seleccionar Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"Payload de prueba de (Re)Switched (fusee)",
|
||||
"optionUpload" :"Subir Payload",
|
||||
"h3Log" :"Registro:",
|
||||
"h4GetByteArray" :"Obtener matriz de bytes del payload (sin exploit)",
|
||||
"goButton" :"Enviar Payload!",
|
||||
|
|
|
@ -14,12 +14,6 @@ let frFR = {
|
|||
"liLaunch" :"Si tout est bon le Payload va démarrer!",
|
||||
"h1SetupDelivery" :"Configuration de l’envoi des Payloads",
|
||||
"h4SelectPayload" :"Sélectionnez le Payload:",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched test payload (fusee)",
|
||||
"optionAtmosphere":"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS (All Firmwares)",
|
||||
"optionReiNX" :"ReiNX (With SigPatches)",
|
||||
"optionUpload" :"Upload du Payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
||||
"goButton" :"Chargez le Payload!",
|
||||
|
|
|
@ -15,12 +15,6 @@ let itIT = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"Setup Payload Delivery",
|
||||
"h4SelectPayload" :"Select Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched payload di test (fusee)",
|
||||
"optionUpload" :"Carica payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Ottieni byte array del payload (no exploit)",
|
||||
"goButton" :"Avvia Payload!",
|
||||
|
|
|
@ -16,12 +16,6 @@ let plPL = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"Wybierz konfigurację payloadu",
|
||||
"h4SelectPayload" :"Wybierz Payload",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched testowy payload (fusee)",
|
||||
"optionUpload" :"Załaduj payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Uzyskaj ciąg bajtów payloadu (nie uruchamiaj)",
|
||||
"goButton" :"Dostarcz payload",
|
||||
|
|
|
@ -15,12 +15,6 @@ let ptBR = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"Configurar Entrega de Payload",
|
||||
"h4SelectPayload" :"Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"Payload de teste (Re)Switched (fusee)",
|
||||
"optionUpload" :"Carregar Payload",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Recuperar array de bytes do payload (favor não exploitar)",
|
||||
"goButton" :"Enviar Payload!",
|
||||
|
|
|
@ -15,12 +15,6 @@ let ruRU = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"Настройки отправки пейлоада",
|
||||
"h4SelectPayload" :"Выберите пейлоад:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"Тестовый пейлоад от (Re)Switched",
|
||||
"optionUpload" :"Загрузить свой пейлоад",
|
||||
"h3Log" :"Log:",
|
||||
"h4GetByteArray" :"Получить побайтовый вывод листинга пейлоада в лог (без отправки на консоль)",
|
||||
"goButton" :"Отправить пейлоад!",
|
||||
|
|
|
@ -15,12 +15,6 @@ let zhCN = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"部署 Payload",
|
||||
"h4SelectPayload" :"选择 Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched test payload (fusee)",
|
||||
"optionUpload" :"上传 Payload",
|
||||
"h4GetByteArray" :"获取Payload byte array (无Sploit)",
|
||||
"goButton" :"传递 Payload!",
|
||||
"clearlogsbutton" :"清除日志",
|
||||
|
|
|
@ -15,12 +15,6 @@ let zhTW = {
|
|||
"labelContribute" :'If you would like to help adding another translation or updating/adding a payload, check <a href="https://github.com/AtlasNX/web-cfw-loader/blob/master/CONTRIBUTING.md">this</a>.',
|
||||
"h1SetupDelivery" :"部署 Payload",
|
||||
"h4SelectPayload" :"選擇 Payload:",
|
||||
"optionAtmosphere" :"Atmosphère 1.3.2",
|
||||
"optionSXOS" :"SX OS",
|
||||
"optionReiNX" :"ReiNX 2.0",
|
||||
"optionCTCaerHekate" :"Hekate v5.8.0",
|
||||
"optionFusee" :"(Re)Switched test payload (fusee)",
|
||||
"optionUpload" :"上傳Payload",
|
||||
"h4GetByteArray" :"獲取Payload byte array (無Sploit)",
|
||||
"goButton" :"傳遞Payload!",
|
||||
"clearlogsbutton" :"清除日誌",
|
||||
|
|
|
@ -118,9 +118,6 @@
|
|||
|
||||
<div class="col-xs-6">
|
||||
<select class="pull-right" id="payloadSelect" onchange="onSelectChange()">
|
||||
<option value="Hekate" id="optionHekate" >Hekate 5.8.0</option>
|
||||
<option value="Atmosphere" id="optionFuseePrimary" >Atmosphère 1.3.2</option>
|
||||
<option value="uploaded" id="optionUpload" >Upload payload</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -161,9 +158,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="./payloads/hekate.js"></script>
|
||||
<script src="./payloads/fusee_ams.js"></script>
|
||||
<script src="./main.js"></script>
|
||||
</body>
|
||||
|
||||
|
|
89
main.js
89
main.js
|
@ -1,3 +1,53 @@
|
|||
function logOutput(...message) {
|
||||
document.getElementById("output").innerHTML = document.getElementById("output").innerHTML + message.join(" ") + "<br>";
|
||||
}
|
||||
|
||||
function clearLog() {
|
||||
document.getElementById("output").innerHTML = "";
|
||||
}
|
||||
|
||||
async function getPayloadList(){
|
||||
return fetch("payloads/payloads.json")
|
||||
.then((response) => {
|
||||
if(!response.ok)
|
||||
throw new Error(response.status);
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
return data.payloads;
|
||||
});
|
||||
}
|
||||
|
||||
(async () => {
|
||||
const payloadSelect = document.getElementById("payloadSelect");
|
||||
let payloadList;
|
||||
try {
|
||||
payloadList = await getPayloadList();
|
||||
|
||||
} catch (error) {
|
||||
logOutput("There was a problem retreiving the payload list. Error: " + error);
|
||||
return;
|
||||
}
|
||||
payloadList.forEach((payload) => {
|
||||
const payloadOption = document.createElement("option");
|
||||
|
||||
payloadOption.value = payload.path;
|
||||
payloadOption.innerHTML = payload.name + " " + payload.version;
|
||||
|
||||
payloadSelect.appendChild(payloadOption);
|
||||
});
|
||||
|
||||
})()
|
||||
|
||||
async function getPayload(payloadSrc){
|
||||
return fetch(payloadSrc)
|
||||
.then((response) => {
|
||||
if(!response.ok)
|
||||
throw new Error(response.status);
|
||||
return response.arrayBuffer();
|
||||
});
|
||||
}
|
||||
|
||||
const intermezzo = new Uint8Array([
|
||||
0x44, 0x00, 0x9F, 0xE5, 0x01, 0x11, 0xA0, 0xE3, 0x40, 0x20, 0x9F, 0xE5, 0x00, 0x20, 0x42, 0xE0,
|
||||
0x08, 0x00, 0x00, 0xEB, 0x01, 0x01, 0xA0, 0xE3, 0x10, 0xFF, 0x2F, 0xE1, 0x00, 0x00, 0xA0, 0xE1,
|
||||
|
@ -7,14 +57,10 @@ const intermezzo = new Uint8Array([
|
|||
0x5C, 0xF0, 0x01, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x01, 0x40
|
||||
]);
|
||||
|
||||
|
||||
|
||||
const RCM_PAYLOAD_ADDRESS = 0x40010000;
|
||||
const INTERMEZZO_LOCATION = 0x4001F000;
|
||||
const PAYLOAD_LOAD_BLOCK = 0x40020000;
|
||||
|
||||
|
||||
|
||||
function createRCMPayload(intermezzo, payload) {
|
||||
const rcmLength = 0x30298;
|
||||
|
||||
|
@ -78,24 +124,8 @@ function readFileAsArrayBuffer(file) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function logOutput(...message) {
|
||||
document.getElementById("output").innerHTML = document.getElementById("output").innerHTML + message.join(" ") + "<br>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearLog() {
|
||||
document.getElementById("output").innerHTML = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
let device;
|
||||
|
||||
|
||||
|
||||
async function launchPayload(payload) {
|
||||
await device.open();
|
||||
logOutput(`Connected to ${device.manufacturerName} ${device.productName}`);
|
||||
|
@ -135,7 +165,7 @@ async function launchPayload(payload) {
|
|||
document.getElementById("goButton").addEventListener("click", async () => {
|
||||
clearLog();
|
||||
var debugCheckbox = document.getElementById("shouldDebug");
|
||||
const payloadType = document.getElementById("payloadSelect").value;
|
||||
const payloadPath = document.getElementById("payloadSelect").value;
|
||||
|
||||
if(!debugCheckbox.checked) {
|
||||
|
||||
|
@ -150,13 +180,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||
}
|
||||
|
||||
let payload;
|
||||
if (payloadType === "Hekate") {
|
||||
payload = hekate;
|
||||
|
||||
} else if (payloadType === "Atmosphere") {
|
||||
payload = fusee_ams;
|
||||
|
||||
} else if (payloadType === "uploaded") {
|
||||
if (payloadPath === "uploaded") {
|
||||
const file = document.getElementById("payloadUpload").files[0];
|
||||
if (!file) {
|
||||
alert("You need to upload a file, to use an uploaded file.");
|
||||
|
@ -166,8 +190,12 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||
payload = new Uint8Array(await readFileAsArrayBuffer(file));
|
||||
|
||||
} else {
|
||||
logOutput("<span style='color:red'>You're trying to load a payload type that doesn't exist.</span>");
|
||||
return;
|
||||
try {
|
||||
payload = new Uint8Array(await getPayload(payloadPath));
|
||||
} catch (error) {
|
||||
logOutput("There was a problem retreiving the payload. Error: " + error)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(debugCheckbox.checked) {
|
||||
|
@ -179,7 +207,6 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||
}
|
||||
payloadToLog = payloadToLog;
|
||||
logOutput(payloadToLog);
|
||||
console.log(document.getElementById("payloadUpload").files[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"payloads": [
|
||||
{
|
||||
"name": "Atmosphère",
|
||||
"version": "1.5.3",
|
||||
"path": "payloads/ams-1.5.3.bin"
|
||||
},
|
||||
{
|
||||
"name": "Hekate",
|
||||
"version": "v6.0.4",
|
||||
"path": "payloads/hekate-v6.0.3.bin"
|
||||
},
|
||||
{
|
||||
"name": "TegraExplorer",
|
||||
"version": "4.0.1-hotfix4",
|
||||
"path": "payloads/tegraexplorer-4.0.1-hotfix4.bin"
|
||||
},
|
||||
{
|
||||
"name": "Upload payload",
|
||||
"version": "",
|
||||
"path": "uploaded"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue