mirror of
https://github.com/lordfriky/web-cfw-loader.git
synced 2024-12-26 15:11:55 +00:00
Merge branch 'master' of https://github.com/lordfriky/web-cfw-loader
This commit is contained in:
commit
7d966a189f
83
.github/workflows/update-payloads.yml
vendored
Normal file
83
.github/workflows/update-payloads.yml
vendored
Normal file
@ -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!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Payload-Einstellungen",
|
||||||
"h4SelectPayload" :"Wähle einen Payload:",
|
"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",
|
|
||||||
"h3Log" :"Protokoll:",
|
"h3Log" :"Protokoll:",
|
||||||
"h4GetByteArray" :"Erhalte den Payload Byte-Array (nicht senden)",
|
"h4GetByteArray" :"Erhalte den Payload Byte-Array (nicht senden)",
|
||||||
"goButton" :"Payload 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>.',
|
"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",
|
"h1SetupDelivery" :"Setup Payload Versturing",
|
||||||
"h4SelectPayload" :"Selecteer Payload:",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Krijg payload byte reeks (Niet sploiten)",
|
"h4GetByteArray" :"Krijg payload byte reeks (Niet sploiten)",
|
||||||
"goButton" :"Verstuur Payload!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Setup Payload Delivery",
|
||||||
"h4SelectPayload" :"Select Payload:",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
||||||
"goButton" :"Deliver Payload!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Configurar Payload a Enviar",
|
||||||
"h4SelectPayload" :"Seleccionar Payload:",
|
"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:",
|
"h3Log" :"Registro:",
|
||||||
"h4GetByteArray" :"Obtener matriz de bytes del payload (sin exploit)",
|
"h4GetByteArray" :"Obtener matriz de bytes del payload (sin exploit)",
|
||||||
"goButton" :"Enviar Payload!",
|
"goButton" :"Enviar Payload!",
|
||||||
|
@ -14,12 +14,6 @@ let frFR = {
|
|||||||
"liLaunch" :"Si tout est bon le Payload va démarrer!",
|
"liLaunch" :"Si tout est bon le Payload va démarrer!",
|
||||||
"h1SetupDelivery" :"Configuration de l’envoi des Payloads",
|
"h1SetupDelivery" :"Configuration de l’envoi des Payloads",
|
||||||
"h4SelectPayload" :"Sélectionnez le Payload:",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
"h4GetByteArray" :"Get payload byte array (don't sploit)",
|
||||||
"goButton" :"Chargez le Payload!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Setup Payload Delivery",
|
||||||
"h4SelectPayload" :"Select Payload:",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Ottieni byte array del payload (no exploit)",
|
"h4GetByteArray" :"Ottieni byte array del payload (no exploit)",
|
||||||
"goButton" :"Avvia Payload!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Wybierz konfigurację payloadu",
|
||||||
"h4SelectPayload" :"Wybierz Payload",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Uzyskaj ciąg bajtów payloadu (nie uruchamiaj)",
|
"h4GetByteArray" :"Uzyskaj ciąg bajtów payloadu (nie uruchamiaj)",
|
||||||
"goButton" :"Dostarcz payload",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"Configurar Entrega de Payload",
|
||||||
"h4SelectPayload" :"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Recuperar array de bytes do payload (favor não exploitar)",
|
"h4GetByteArray" :"Recuperar array de bytes do payload (favor não exploitar)",
|
||||||
"goButton" :"Enviar Payload!",
|
"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>.',
|
"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" :"Настройки отправки пейлоада",
|
"h1SetupDelivery" :"Настройки отправки пейлоада",
|
||||||
"h4SelectPayload" :"Выберите пейлоад:",
|
"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:",
|
"h3Log" :"Log:",
|
||||||
"h4GetByteArray" :"Получить побайтовый вывод листинга пейлоада в лог (без отправки на консоль)",
|
"h4GetByteArray" :"Получить побайтовый вывод листинга пейлоада в лог (без отправки на консоль)",
|
||||||
"goButton" :"Отправить пейлоад!",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"部署 Payload",
|
||||||
"h4SelectPayload" :"选择 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)",
|
"h4GetByteArray" :"获取Payload byte array (无Sploit)",
|
||||||
"goButton" :"传递 Payload!",
|
"goButton" :"传递 Payload!",
|
||||||
"clearlogsbutton" :"清除日志",
|
"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>.',
|
"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",
|
"h1SetupDelivery" :"部署 Payload",
|
||||||
"h4SelectPayload" :"選擇 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)",
|
"h4GetByteArray" :"獲取Payload byte array (無Sploit)",
|
||||||
"goButton" :"傳遞Payload!",
|
"goButton" :"傳遞Payload!",
|
||||||
"clearlogsbutton" :"清除日誌",
|
"clearlogsbutton" :"清除日誌",
|
||||||
|
@ -118,9 +118,6 @@
|
|||||||
|
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<select class="pull-right" id="payloadSelect" onchange="onSelectChange()">
|
<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>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -161,9 +158,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="./payloads/hekate.js"></script>
|
|
||||||
<script src="./payloads/fusee_ams.js"></script>
|
|
||||||
<script src="./main.js"></script>
|
<script src="./main.js"></script>
|
||||||
</body>
|
</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([
|
const intermezzo = new Uint8Array([
|
||||||
0x44, 0x00, 0x9F, 0xE5, 0x01, 0x11, 0xA0, 0xE3, 0x40, 0x20, 0x9F, 0xE5, 0x00, 0x20, 0x42, 0xE0,
|
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,
|
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
|
0x5C, 0xF0, 0x01, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x01, 0x40
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const RCM_PAYLOAD_ADDRESS = 0x40010000;
|
const RCM_PAYLOAD_ADDRESS = 0x40010000;
|
||||||
const INTERMEZZO_LOCATION = 0x4001F000;
|
const INTERMEZZO_LOCATION = 0x4001F000;
|
||||||
const PAYLOAD_LOAD_BLOCK = 0x40020000;
|
const PAYLOAD_LOAD_BLOCK = 0x40020000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function createRCMPayload(intermezzo, payload) {
|
function createRCMPayload(intermezzo, payload) {
|
||||||
const rcmLength = 0x30298;
|
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;
|
let device;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function launchPayload(payload) {
|
async function launchPayload(payload) {
|
||||||
await device.open();
|
await device.open();
|
||||||
logOutput(`Connected to ${device.manufacturerName} ${device.productName}`);
|
logOutput(`Connected to ${device.manufacturerName} ${device.productName}`);
|
||||||
@ -135,7 +165,7 @@ async function launchPayload(payload) {
|
|||||||
document.getElementById("goButton").addEventListener("click", async () => {
|
document.getElementById("goButton").addEventListener("click", async () => {
|
||||||
clearLog();
|
clearLog();
|
||||||
var debugCheckbox = document.getElementById("shouldDebug");
|
var debugCheckbox = document.getElementById("shouldDebug");
|
||||||
const payloadType = document.getElementById("payloadSelect").value;
|
const payloadPath = document.getElementById("payloadSelect").value;
|
||||||
|
|
||||||
if(!debugCheckbox.checked) {
|
if(!debugCheckbox.checked) {
|
||||||
|
|
||||||
@ -150,13 +180,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let payload;
|
let payload;
|
||||||
if (payloadType === "Hekate") {
|
if (payloadPath === "uploaded") {
|
||||||
payload = hekate;
|
|
||||||
|
|
||||||
} else if (payloadType === "Atmosphere") {
|
|
||||||
payload = fusee_ams;
|
|
||||||
|
|
||||||
} else if (payloadType === "uploaded") {
|
|
||||||
const file = document.getElementById("payloadUpload").files[0];
|
const file = document.getElementById("payloadUpload").files[0];
|
||||||
if (!file) {
|
if (!file) {
|
||||||
alert("You need to upload a file, to use an uploaded 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));
|
payload = new Uint8Array(await readFileAsArrayBuffer(file));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logOutput("<span style='color:red'>You're trying to load a payload type that doesn't exist.</span>");
|
try {
|
||||||
return;
|
payload = new Uint8Array(await getPayload(payloadPath));
|
||||||
|
} catch (error) {
|
||||||
|
logOutput("There was a problem retreiving the payload. Error: " + error)
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(debugCheckbox.checked) {
|
if(debugCheckbox.checked) {
|
||||||
@ -179,7 +207,6 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||||||
}
|
}
|
||||||
payloadToLog = payloadToLog;
|
payloadToLog = payloadToLog;
|
||||||
logOutput(payloadToLog);
|
logOutput(payloadToLog);
|
||||||
console.log(document.getElementById("payloadUpload").files[0]);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
payloads/ams-1.5.3.bin
Normal file
BIN
payloads/ams-1.5.3.bin
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
payloads/hekate-v6.0.4.bin
Executable file
BIN
payloads/hekate-v6.0.4.bin
Executable file
Binary file not shown.
File diff suppressed because one or more lines are too long
25
payloads/payloads.json
Normal file
25
payloads/payloads.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
BIN
payloads/tegraexplorer-4.0.1-hotfix4.bin
Normal file
BIN
payloads/tegraexplorer-4.0.1-hotfix4.bin
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user