diff --git a/Makefile b/Makefile index d305e98..309c00c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Package metadata TITLE := Payload Guest -VERSION := 0.98 +VERSION := 0.99 TITLE_ID := AZIF00003 CONTENT_ID := IV0000-AZIF00003_00-PAYLOADGUEST0000 AUTHINFO := 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/assets/languages/00.json b/assets/languages/00.json index 487a4ee..f297bde 100644 --- a/assets/languages/00.json +++ b/assets/languages/00.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "セレクト", + "selectMira": "セレクト Mira", "refresh": "リフレッシュ", "credits": "クレジット", "return": "戻る", diff --git a/assets/languages/01.json b/assets/languages/01.json index beb3353..e6c7ecf 100644 --- a/assets/languages/01.json +++ b/assets/languages/01.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Select", + "selectMira": "Select Mira", "refresh": "Refresh", "credits": "Credits", "return": "Return", diff --git a/assets/languages/02.json b/assets/languages/02.json index 1029a4d..db0b44f 100644 --- a/assets/languages/02.json +++ b/assets/languages/02.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Sélectionner", + "selectMira": "Sélectionner Mira", "refresh": "Actualiser", "credits": "Crédits", "return": "Retour", diff --git a/assets/languages/03.json b/assets/languages/03.json index 5ce0a48..511c1f2 100644 --- a/assets/languages/03.json +++ b/assets/languages/03.json @@ -10,6 +10,7 @@ "ok": "ok", "select": "Seleccionar", + "selectMira": "Seleccionar Mira", "refresh": "Refrescar", "credits": "Créditos", "return": "Volver", diff --git a/assets/languages/04.json b/assets/languages/04.json index 1385fe2..76701c9 100644 --- a/assets/languages/04.json +++ b/assets/languages/04.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Auswählen", + "selectMira": "Auswählen Mira", "refresh": "Neu laden", "credits": "Credits", "return": "Zurück", diff --git a/assets/languages/05.json b/assets/languages/05.json index f7fa50d..43e7920 100644 --- a/assets/languages/05.json +++ b/assets/languages/05.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Seleziona", + "selectMira": "Seleziona Mira", "refresh": "Refresh", "credits": "Credits", "return": "Indietro", diff --git a/assets/languages/06.json b/assets/languages/06.json index 5c2af40..fee632c 100644 --- a/assets/languages/06.json +++ b/assets/languages/06.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Selecteer", + "selectMira": "Selecteer Mira", "refresh": "Herversen", "credits": "Credits", "return": "Terug", diff --git a/assets/languages/07.json b/assets/languages/07.json index 0378df4..688bcca 100644 --- a/assets/languages/07.json +++ b/assets/languages/07.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Selecionar", + "selectMira": "Selecionar Mira", "refresh": "Atualizar", "credits": "Créditos", "return": "Voltar", diff --git a/assets/languages/08.json b/assets/languages/08.json index 97e91a9..1904ee3 100644 --- a/assets/languages/08.json +++ b/assets/languages/08.json @@ -10,6 +10,7 @@ "ok": "ОК", "select": "Выбрать", + "selectMira": "Выбрать Mira", "refresh": "Обновить", "credits": "Авторы", "return": "Назад", diff --git a/assets/languages/09.json b/assets/languages/09.json index 3eb4be5..f4122fc 100644 --- a/assets/languages/09.json +++ b/assets/languages/09.json @@ -10,6 +10,7 @@ "ok": "확정", "select": "선택", + "selectMira": "선택 Mira", "refresh": "새로고침", "credits": "크레딧", "return": "돌아가기", diff --git a/assets/languages/10.json b/assets/languages/10.json index 43d3ee5..eacb4a4 100644 --- a/assets/languages/10.json +++ b/assets/languages/10.json @@ -10,6 +10,7 @@ "ok": "確認", "select": "選擇", + "selectMira": "選擇 Mira", "refresh": "刷新", "credits": "感謝", "return": "返回", diff --git a/assets/languages/11.json b/assets/languages/11.json index 3b90b0a..019cd93 100644 --- a/assets/languages/11.json +++ b/assets/languages/11.json @@ -10,6 +10,7 @@ "ok": "确定", "select": "选择", + "selectMira": "选择 Mira", "refresh": "刷新", "credits": "感谢", "return": "返回", diff --git a/assets/languages/16.json b/assets/languages/16.json index 01f06e9..a6f8e8f 100644 --- a/assets/languages/16.json +++ b/assets/languages/16.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Wybierz", + "selectMira": "Wybierz Mira", "refresh": "Odśwież", "credits": "Autorzy", "return": "Wstecz", diff --git a/assets/languages/17.json b/assets/languages/17.json index 01e2965..55fe388 100644 --- a/assets/languages/17.json +++ b/assets/languages/17.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Selecionar", + "selectMira": "Selecionar Mira", "refresh": "Atualizar", "credits": "Créditos", "return": "Voltar", diff --git a/assets/languages/19.json b/assets/languages/19.json index a0174ed..734ed48 100644 --- a/assets/languages/19.json +++ b/assets/languages/19.json @@ -10,6 +10,7 @@ "ok": "Tamam", "select": "Seç", + "selectMira": "Seç Mira", "refresh": "Yenile", "credits": "Katkısı Olanlar", "return": "Geri", diff --git a/assets/languages/20.json b/assets/languages/20.json index 1aa3a15..b2c8c19 100644 --- a/assets/languages/20.json +++ b/assets/languages/20.json @@ -10,6 +10,7 @@ "ok": "Aceptar", "select": "Seleccionar", + "selectMira": "Seleccionar Mira", "refresh": "Refrescar", "credits": "Créditos", "return": "Regresar", diff --git a/assets/languages/23.json b/assets/languages/23.json index bca4f26..7f8eeb7 100644 --- a/assets/languages/23.json +++ b/assets/languages/23.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Zvolit", + "selectMira": "Zvolit Mira", "refresh": "Obnovit", "credits": "Zásluhy", "return": "Zpět", diff --git a/assets/languages/24.json b/assets/languages/24.json index dc12629..c0c1c25 100644 --- a/assets/languages/24.json +++ b/assets/languages/24.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Választ", + "selectMira": "Választ Mira", "refresh": "Frissít", "credits": "Köszönetlista", "return": "Vissza", diff --git a/assets/languages/25.json b/assets/languages/25.json index 55c7fc7..8c99ed8 100644 --- a/assets/languages/25.json +++ b/assets/languages/25.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Επιλέξτε", + "selectMira": "Επιλέξτε Mira", "refresh": "Επαναφόρτωση", "credits": "Συντελεστές", "return": "Επιστροφή", diff --git a/assets/languages/26.json b/assets/languages/26.json index c8ea537..919371a 100644 --- a/assets/languages/26.json +++ b/assets/languages/26.json @@ -10,6 +10,7 @@ "ok": "Bine", "select": "Selectează", + "selectMira": "Selectează Mira", "refresh": "Reîncarcă", "credits": "Credite", "return": "Revenire", diff --git a/assets/languages/29.json b/assets/languages/29.json index dd02382..57f79af 100644 --- a/assets/languages/29.json +++ b/assets/languages/29.json @@ -10,6 +10,7 @@ "ok": "Ok", "select": "Pilih", + "selectMira": "Pilih Mira", "refresh": "Segarkan", "credits": "Penghargaan", "return": "Kembali", diff --git a/assets/languages/X21.json b/assets/languages/X21.json index 91b11fc..4807e5a 100644 --- a/assets/languages/X21.json +++ b/assets/languages/X21.json @@ -10,6 +10,7 @@ "ok": "موافق", "select": "إختيار", + "selectMira": "إختيار Mira", "refresh": "تحديث", "credits": "", "return": "رجوع", diff --git a/include/PayloadsView.h b/include/PayloadsView.h index badcd88..5b333f9 100644 --- a/include/PayloadsView.h +++ b/include/PayloadsView.h @@ -17,6 +17,7 @@ #include "Graphics.h" #include "Utility.h" #include "View.h" +#include "libLog.h" class Application; class PayloadsView; @@ -74,6 +75,24 @@ class PayloadsView : public View { void RefreshPayloadList(bool p_Reset); void CleanupPayloadList(bool p_Reset); + + bool sendPayloads(int port = 9020) { + if (m_Payloads.size() > 0) { + if (m_PayloadTimer == 0 || m_PayloadTimer + (5 * 1000000) < sceKernelGetProcessTime()) { + logKernel(LL_Debug, "Loading: %s", m_Payloads[m_PayloadSelected].location.c_str()); + // notifi(NULL, "Loading: %s", m_Payloads[m_PayloadSelected].location.c_str()); // Pop notification + if (!Utility::SendPayload(m_App, "127.0.0.1", port, m_Payloads[m_PayloadSelected].location)) { // Send to GoldHEN's loader + Utility::LaunchShellcode(m_App, m_Payloads[m_PayloadSelected].location); // Launch here + } + m_PayloadTimer = sceKernelGetProcessTime(); + return true; + } else { + logKernel(LL_Debug, "Skip loading due to timer: %s", m_Payloads[m_PayloadSelected].location.c_str()); + return false; + } + } + return false; + } }; #endif diff --git a/src/PayloadsView.cpp b/src/PayloadsView.cpp index 9921ebe..12190a1 100644 --- a/src/PayloadsView.cpp +++ b/src/PayloadsView.cpp @@ -314,18 +314,16 @@ int PayloadsView::Update() { } if (m_App->Ctrl->GetButtonPressed(ORBIS_PAD_BUTTON_CROSS)) { - if (m_Payloads.size() > 0) { - if (m_PayloadTimer == 0 || m_PayloadTimer + (5 * 1000000) < sceKernelGetProcessTime()) { - logKernel(LL_Debug, "Loading: %s", m_Payloads[m_PayloadSelected].location.c_str()); - // notifi(NULL, "Loading: %s", m_Payloads[m_PayloadSelected].location.c_str()); // Pop notification - if (!Utility::SendPayload(m_App, "127.0.0.1", 9090, m_Payloads[m_PayloadSelected].location)) { // Send to GoldHEN's loader - Utility::LaunchShellcode(m_App, m_Payloads[m_PayloadSelected].location); // Launch here - } - RefreshPayloadList(false); - m_PayloadTimer = sceKernelGetProcessTime(); - } else { - logKernel(LL_Debug, "Skip loading due to timer: %s", m_Payloads[m_PayloadSelected].location.c_str()); - } + bool is_payload_sent = sendPayloads(9020); + if (is_payload_sent) { + RefreshPayloadList(false); + } + } + + if (m_App->Ctrl->GetButtonPressed(ORBIS_PAD_BUTTON_CIRCLE)) { + bool is_payload_sent = sendPayloads(9021); + if (is_payload_sent) { + RefreshPayloadList(false); } } } @@ -489,20 +487,23 @@ int PayloadsView::Render() { m_App->Graph->DrawText(ok, m_App->Res->m_Typefaces, icon_x, text_y, m_TextColor, m_TextColor); } else { std::string select = m_App->Lang->Get("select"); + std::string selectMira = m_App->Lang->Get("selectMira"); std::string refresh = m_App->Lang->Get("refresh"); std::string credit = m_App->Lang->Get("credits"); FontSize selectSize; + FontSize selectMiraSize; FontSize refreshSize; FontSize creditSize; m_App->Graph->SetFontSize(m_App->Res->m_Typefaces, FOOTER_FONT_SIZE); m_App->Graph->GetTextSize(select, m_App->Res->m_Typefaces, &selectSize); + m_App->Graph->GetTextSize(selectMira, m_App->Res->m_Typefaces, &selectMiraSize); m_App->Graph->GetTextSize(refresh, m_App->Res->m_Typefaces, &refreshSize); m_App->Graph->GetTextSize(credit, m_App->Res->m_Typefaces, &creditSize); - int s_IconWidth = (selectSize.width + refreshSize.width + creditSize.width) + (4 * FOOTER_ICON_SIZE) + (4 * FOOTER_TEXT_BORDER); + int s_IconWidth = (selectSize.width + selectMiraSize.width + refreshSize.width + creditSize.width) + (4 * FOOTER_ICON_SIZE) + (4 * FOOTER_TEXT_BORDER); int s_IconX = (s_ScreenWidth - BORDER_X) - s_IconWidth; int s_IconY = (s_ScreenHeight - FOOTER_SIZE + 5) + FOOTER_BORDER_Y; int s_TextY = s_IconY + ((FOOTER_ICON_SIZE / 2) - (selectSize.height / 2)); @@ -516,6 +517,15 @@ int PayloadsView::Render() { m_App->Graph->DrawText(select, m_App->Res->m_Typefaces, s_IconX, s_TextY, m_TextColor, m_TextColor); s_IconX += selectSize.width + FOOTER_FONT_SIZE; + if (m_PayloadTimer == 0 || m_PayloadTimer + (5 * 1000000) < sceKernelGetProcessTime()) { + m_App->Graph->DrawSizedPNG(&m_App->Res->m_Circle, s_IconX, s_IconY, FOOTER_ICON_SIZE, FOOTER_ICON_SIZE); + } else { + m_App->Graph->DrawSizedPNG(&m_App->Res->m_Lock, s_IconX, s_IconY, FOOTER_ICON_SIZE, FOOTER_ICON_SIZE); + } + s_IconX += FOOTER_ICON_SIZE + FOOTER_TEXT_BORDER; + m_App->Graph->DrawText(selectMira, m_App->Res->m_Typefaces, s_IconX, s_TextY, m_TextColor, m_TextColor); + s_IconX += selectMiraSize.width + FOOTER_FONT_SIZE; + m_App->Graph->DrawSizedPNG(&m_App->Res->m_Square, s_IconX, s_IconY, FOOTER_ICON_SIZE, FOOTER_ICON_SIZE); s_IconX += FOOTER_ICON_SIZE + FOOTER_TEXT_BORDER; m_App->Graph->DrawText(refresh, m_App->Res->m_Typefaces, s_IconX, s_TextY, m_TextColor, m_TextColor);