mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-21 07:46:12 +08:00
Modified the flashing feedback text to include suggest steps
This commit is contained in:
parent
98e9ec6e54
commit
0073fc1a71
|
@ -403,9 +403,19 @@ static int wait_for_ack(PacketResponseNG *ack) {
|
|||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static bool g_printed_msg = false;
|
||||
static void flash_suggest_update_bootloader(void) {
|
||||
if (g_printed_msg)
|
||||
return;
|
||||
|
||||
PrintAndLogEx(ERR, _RED_("It is recommended that you first" _YELLOW_(" update your bootloader") _RED_(" alone,")));
|
||||
PrintAndLogEx(ERR, _RED_("reboot the Proxmark3 then only update the main firmware") "\n");
|
||||
PrintAndLogEx(ERR, "Follow these steps :");
|
||||
PrintAndLogEx(ERR, " 1) ./pm3-flash-bootrom");
|
||||
PrintAndLogEx(ERR, " 2) ./pm3-flash-flash-all");
|
||||
PrintAndLogEx(ERR, " 3) ./pm3");
|
||||
PrintAndLogEx(INFO, "--------------------------------------------------------");
|
||||
g_printed_msg = true;
|
||||
}
|
||||
|
||||
static void flash_suggest_update_flasher(void) {
|
||||
|
@ -532,6 +542,7 @@ const char ice[] =
|
|||
" !!: :!! !!: !!: !!: !!: !!! !!: !!!\n : :: :: : : :: ::: : : : : : :: : \n"
|
||||
_RED_(" . .. .. . . .. ... . . . . . .. . ")
|
||||
"\n...................................................................\n"
|
||||
"...................................................................\n"
|
||||
;
|
||||
|
||||
// Write a file's segments to Flash
|
||||
|
|
|
@ -673,6 +673,8 @@ static int flash_pm3(char *serial_port_name, uint8_t num_files, char *filenames[
|
|||
}
|
||||
|
||||
finish:
|
||||
if (ret != PM3_SUCCESS)
|
||||
PrintAndLogEx(INFO, "The flashing procedure failed, follow the suggested steps!");
|
||||
ret = flash_stop_flashing();
|
||||
CloseProxmark(session.current_device);
|
||||
finish2:
|
||||
|
@ -684,7 +686,7 @@ finish2:
|
|||
PrintAndLogEx(SUCCESS, _CYAN_("All done"));
|
||||
else
|
||||
PrintAndLogEx(ERR, "Aborted on error");
|
||||
PrintAndLogEx(NORMAL, "\nHave a nice day!");
|
||||
PrintAndLogEx(INFO, "\nHave a nice day!");
|
||||
return ret;
|
||||
}
|
||||
#endif //LIBPM3
|
||||
|
|
Loading…
Reference in a new issue