diff --git a/images/logo.png b/images/logo.png index 643d8a4..29020e5 100644 Binary files a/images/logo.png and b/images/logo.png differ diff --git a/src/m8/dfu.c b/src/m8/dfu.c index f714d51..002cd73 100644 --- a/src/m8/dfu.c +++ b/src/m8/dfu.c @@ -5,18 +5,12 @@ #include #include -int dfu_serial_number_get_cpid(char *serial) { +uint16_t dfu_serial_number_get_cpid(char *serial) { char *cpid = strstr(serial, "CPID:"); if (cpid == NULL) { return -1; } return strtol(cpid + 5, NULL, 16); } -int dfu_serial_number_get_bdid(char *serial) { - char *bdid = strstr(serial, "BDID:"); - if (bdid == NULL) { return -1; } - return strtol(bdid + 5, NULL, 16); -} - bool dfu_serial_number_is_in_dfu_mode(char *serial) { char *DFU = strstr(serial, "SRTG"); return DFU != NULL; @@ -31,8 +25,3 @@ bool dfu_serial_number_is_in_yolo_dfu(char *serial) { char *yolo = strstr(serial, "YOLO"); return yolo != NULL; } - -bool device_serial_number_is_in_pongo_os(char *serial) { - char *pongo = strstr(serial, "SRTG:[PongoOS"); - return pongo != NULL; -} diff --git a/src/m8/dfu.h b/src/m8/dfu.h index 5714178..4214b00 100644 --- a/src/m8/dfu.h +++ b/src/m8/dfu.h @@ -22,7 +22,7 @@ extern "C" { #endif -int dfu_serial_number_get_cpid(char *serial); +uint16_t dfu_serial_number_get_cpid(char *serial); bool dfu_serial_number_is_in_dfu_mode(char *serial); bool dfu_serial_number_is_pwned(char *serial); bool dfu_serial_number_is_in_yolo_dfu(char *serial); diff --git a/src/m8/payload.c b/src/m8/payload.c index dd32323..ad87785 100644 --- a/src/m8/payload.c +++ b/src/m8/payload.c @@ -15,7 +15,7 @@ #include "../gen/payloads/yolo_t8015.h" bool checkm8_find_device_configuration_for_cpid( - int cpid, + uint16_t cpid, struct DeviceConfiguration *config) { bool foundMatchingConfiguration = true; @@ -58,7 +58,7 @@ bool checkm8_find_device_configuration_for_cpid( } bool checkm8_find_payload_configuration_for_cpid( - int cpid, + uint16_t cpid, struct PayloadConfiguration *config) { bool foundMatchingConfiguration = true; @@ -258,4 +258,4 @@ void create_pongo_payload_for_device( } LOG("Failed to prepare payload for device with CPID 0x%x.", cpid); -} \ No newline at end of file +} diff --git a/src/m8/payload.h b/src/m8/payload.h index a561329..654f6ac 100644 --- a/src/m8/payload.h +++ b/src/m8/payload.h @@ -44,8 +44,8 @@ typedef struct { size_t len; } yolo_payload_t; -bool checkm8_find_device_configuration_for_cpid(int cpid, struct DeviceConfiguration *config); -bool checkm8_find_payload_configuration_for_cpid(int cpid, struct PayloadConfiguration *config); +bool checkm8_find_device_configuration_for_cpid(uint16_t cpid, struct DeviceConfiguration *config); +bool checkm8_find_payload_configuration_for_cpid(uint16_t cpid, struct PayloadConfiguration *config); void create_pongo_payload_for_device(uint16_t cpid, const uint8_t **payload, size_t *payloadSize); #endif // PAYLOAD_H diff --git a/src/m8/run.c b/src/m8/run.c index 8bfb9fe..418823c 100644 --- a/src/m8/run.c +++ b/src/m8/run.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "../utils.h" #include "../globals.h" diff --git a/src/main.cpp b/src/main.cpp index 31e66be..624fbe0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -128,6 +128,8 @@ void parse_arguments(int argc, char* argv[]) { } else { palerain_flags &= ~palerain_option_cli; palerain_flags |= palerain_option_gui; + // xcode doesn't know how to display colors + palerain_flags |= palerain_option_no_colors; } # endif #else diff --git a/src/utils.c b/src/utils.c index 9cbbd02..7400740 100644 --- a/src/utils.c +++ b/src/utils.c @@ -55,11 +55,11 @@ void log_write(log_level_t level, const char *fmt, ...) { snprintf(tag_buf, sizeof(tag_buf), "<%s>", level_name(level)); if (palerain_flags & palerain_option_no_colors) { - printf(" %s%-9s%s [%s%s%s] => ", + printf(" %s%9s%s [%s%s%s] => ", "", tag_buf, "", "", get_timestamp(), ""); } else { - printf(" %s%-9s%s [%s%s%s] => ", + printf(" %s%9s%s [%s%s%s] => ", level_color(level), tag_buf, RESET_COLOR, GRAY_COLOR, get_timestamp(), RESET_COLOR); } diff --git a/src/wx/DfuPanel.cpp b/src/wx/DfuPanel.cpp index 5f0948b..5fe7214 100644 --- a/src/wx/DfuPanel.cpp +++ b/src/wx/DfuPanel.cpp @@ -90,8 +90,8 @@ DfuPanel::DfuPanel(MainFrame* frame, wxWindow* parent) auto* bottomRow = new wxBoxSizer(wxHORIZONTAL); bottomRow->AddStretchSpacer(); - bottomRow->Add(m_backButton, 0, wxALL, 10); - bottomRow->Add(m_startButton, 0, wxALL, 10); + bottomRow->Add(m_backButton, 0, wxALL, 12); + bottomRow->Add(m_startButton, 0, wxALL, 12); root->Add(bottomRow, 0, wxEXPAND); diff --git a/src/wx/ExploitPanel.cpp b/src/wx/ExploitPanel.cpp index aef64d4..c39e372 100644 --- a/src/wx/ExploitPanel.cpp +++ b/src/wx/ExploitPanel.cpp @@ -67,7 +67,7 @@ ExploitPanel::ExploitPanel(MainFrame* frame, wxWindow* parent) root->Add(m_progressBar, 0, wxALL | wxEXPAND, 20); root->AddStretchSpacer(); - root->Add(m_backButton, 0, wxALL | wxALIGN_RIGHT, 10); + root->Add(m_backButton, 0, wxALL | wxALIGN_RIGHT, 12); SetSizer(root); } diff --git a/src/wx/MainPanel.cpp b/src/wx/MainPanel.cpp index 7716ce1..d70b27c 100644 --- a/src/wx/MainPanel.cpp +++ b/src/wx/MainPanel.cpp @@ -3,6 +3,7 @@ #include "MainPanel.hpp" #include +#include #include #include #include @@ -60,10 +61,46 @@ MainPanel::MainPanel(MainFrame* frame, wxWindow* parent) "Made by: asdfugil, kok3shidoll, C, mineek, nekohaxx, plooshi, staturnz\n\n" "Thanks to: llsc12, itsnebulalol, lrdsnow, kirb, ehilwyma opa334, 0x7ff,\n" "sbingner, nikias (libimobiledevice), Checkra1n (Siguza, axi0mx, littlelailo\n" - "et al.), Procursus (Hayden Seay, Cameron Katri, Keto et al.)\n\n" - "With <3 from C (claration)"); + "et al.), Procursus (Hayden Seay, Cameron Katri, Keto et al.)" + ); + + auto* credrow = new wxBoxSizer(wxHORIZONTAL); + auto* lovetext = new wxStaticText(this, wxID_ANY, + #ifdef __APPLE__ + "With 💖 from C (claration)" + #else + "With <3 from C (claration)" + #endif + ); + + auto* link1 = new wxStaticText(this, wxID_ANY, "@palera1n"); + auto* link2 = new wxStaticText(this, wxID_ANY, "https://palera.in"); + + link1->SetForegroundColour(wxColour(0, 120, 215)); + link2->SetForegroundColour(wxColour(0, 120, 215)); + + link1->SetCursor(wxCursor(wxCURSOR_HAND)); + link2->SetCursor(wxCursor(wxCURSOR_HAND)); + + link1->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent&) { + wxLaunchDefaultBrowser("https://twitter.com/intent/follow?screen_name=palera1n"); + }); + + link2->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent&) { + wxLaunchDefaultBrowser("https://palera.in"); + }); + + credrow->Add(lovetext, 0, wxALIGN_BOTTOM | wxLEFT, 0); + credrow->AddStretchSpacer(); + + auto* linkSizer = new wxBoxSizer(wxVERTICAL); + linkSizer->Add(link1, 0, wxALIGN_RIGHT | wxBOTTOM, 0); + linkSizer->Add(link2, 0, wxALIGN_RIGHT); + + credrow->Add(linkSizer, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxRIGHT, 0); root->Add(credtext, 0, wxLEFT | wxRIGHT, 10); + root->Add(credrow, 0, wxEXPAND | wxLEFT | wxRIGHT, 10); root->Add(new wxStaticLine(this), 0, wxEXPAND | wxALL, 10); @@ -119,8 +156,8 @@ MainPanel::MainPanel(MainFrame* frame, wxWindow* parent) auto* bottomRow = new wxBoxSizer(wxHORIZONTAL); bottomRow->AddStretchSpacer(); bottomRow->Add(quickMode, 0, wxRIGHT | wxTOP, 1); - bottomRow->Add(optionsButton, 0, wxRIGHT | wxLEFT | wxBOTTOM, 10); - bottomRow->Add(m_startButton, 0, wxRIGHT | wxLEFT | wxBOTTOM, 10); + bottomRow->Add(optionsButton, 0, wxRIGHT | wxLEFT | wxBOTTOM, 12); + bottomRow->Add(m_startButton, 0, wxRIGHT | wxLEFT | wxBOTTOM, 12); root->Add(bottomRow, 0, wxEXPAND); diff --git a/src/wx/RecoveryPanel.cpp b/src/wx/RecoveryPanel.cpp index fc456b1..bdfbe06 100644 --- a/src/wx/RecoveryPanel.cpp +++ b/src/wx/RecoveryPanel.cpp @@ -61,8 +61,8 @@ RecoveryPanel::RecoveryPanel(MainFrame* frame, wxWindow* parent) auto* bottomRow = new wxBoxSizer(wxHORIZONTAL); bottomRow->AddStretchSpacer(); - bottomRow->Add(m_backButton, 0, wxALL, 10); - bottomRow->Add(m_nextButton, 0, wxALL, 10); + bottomRow->Add(m_backButton, 0, wxALL, 12); + bottomRow->Add(m_nextButton, 0, wxALL, 12); root->AddStretchSpacer(); root->Add(bottomRow, 0, wxEXPAND); diff --git a/src/wx/SettingsPanel.cpp b/src/wx/SettingsPanel.cpp index 2c5d9ac..e450f92 100644 --- a/src/wx/SettingsPanel.cpp +++ b/src/wx/SettingsPanel.cpp @@ -95,7 +95,7 @@ SettingsPanel::SettingsPanel(MainFrame* frame, wxWindow* parent) auto* bottomRow = new wxBoxSizer(wxHORIZONTAL); bottomRow->AddStretchSpacer(); - bottomRow->Add(back, 0, wxALL, 10); + bottomRow->Add(back, 0, wxALL, 12); root->Add(bottomRow, 0, wxEXPAND);