This commit is contained in:
iceman1001 2020-05-08 16:43:31 +02:00
commit b78e060909
2 changed files with 9 additions and 9 deletions

View file

@ -240,7 +240,7 @@ int flash_load(flash_file_t *ctx, const char *name, int can_write_bl, int flash_
goto fail; goto fail;
} }
PrintAndLogEx(SUCCESS, _BLUE_("Loading ELF file") _YELLOW_(" %s"), name); PrintAndLogEx(SUCCESS, _CYAN_("Loading ELF file") _YELLOW_(" %s"), name);
if (fread(&ehdr, sizeof(ehdr), 1, fd) != 1) { if (fread(&ehdr, sizeof(ehdr), 1, fd) != 1) {
PrintAndLogEx(ERR, "Error while reading ELF file header"); PrintAndLogEx(ERR, "Error while reading ELF file header");
@ -356,7 +356,7 @@ static int enter_bootloader(char *serial_port_name) {
return PM3_SUCCESS; return PM3_SUCCESS;
if (state & DEVICE_INFO_FLAG_CURRENT_MODE_OS) { if (state & DEVICE_INFO_FLAG_CURRENT_MODE_OS) {
PrintAndLogEx(SUCCESS, _BLUE_("Entering bootloader...")); PrintAndLogEx(SUCCESS, _CYAN_("Entering bootloader..."));
if ((state & DEVICE_INFO_FLAG_BOOTROM_PRESENT) if ((state & DEVICE_INFO_FLAG_BOOTROM_PRESENT)
&& (state & DEVICE_INFO_FLAG_OSIMAGE_PRESENT)) { && (state & DEVICE_INFO_FLAG_OSIMAGE_PRESENT)) {
@ -375,7 +375,7 @@ static int enter_bootloader(char *serial_port_name) {
msleep(1000); msleep(1000);
if (OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED)) { if (OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED)) {
PrintAndLogEx(NORMAL, " " _GREEN_("Found")); PrintAndLogEx(NORMAL, _GREEN_(" found"));
return PM3_SUCCESS; return PM3_SUCCESS;
} else { } else {
PrintAndLogEx(ERR, _RED_("Error:") " Proxmark3 not found."); PrintAndLogEx(ERR, _RED_("Error:") " Proxmark3 not found.");

View file

@ -549,11 +549,11 @@ static int flash_pm3(char *serial_port_name, uint8_t num_files, char *filenames[
PrintAndLogEx(SUCCESS, "About to use the following file%s:", num_files > 1 ? "s" : ""); PrintAndLogEx(SUCCESS, "About to use the following file%s:", num_files > 1 ? "s" : "");
for (int i = 0 ; i < num_files; ++i) { for (int i = 0 ; i < num_files; ++i) {
PrintAndLogEx(SUCCESS, " %s", filepaths[i]); PrintAndLogEx(SUCCESS, " "_YELLOW_("%s"), filepaths[i]);
} }
if (OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED)) { if (OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED)) {
PrintAndLogEx(NORMAL, _GREEN_("Found")); PrintAndLogEx(NORMAL, _GREEN_(" found"));
} else { } else {
PrintAndLogEx(ERR, "Could not find Proxmark3 on " _RED_("%s") ".\n", serial_port_name); PrintAndLogEx(ERR, "Could not find Proxmark3 on " _RED_("%s") ".\n", serial_port_name);
ret = PM3_ETIMEOUT; ret = PM3_ETIMEOUT;
@ -577,7 +577,7 @@ static int flash_pm3(char *serial_port_name, uint8_t num_files, char *filenames[
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
} }
PrintAndLogEx(SUCCESS, "\n" _BLUE_("Flashing...")); PrintAndLogEx(SUCCESS, _CYAN_("Flashing..."));
for (int i = 0; i < num_files; i++) { for (int i = 0; i < num_files; i++) {
ret = flash_write(&files[i]); ret = flash_write(&files[i]);
@ -585,7 +585,7 @@ static int flash_pm3(char *serial_port_name, uint8_t num_files, char *filenames[
goto finish; goto finish;
} }
flash_free(&files[i]); flash_free(&files[i]);
PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(NORMAL, "");
} }
finish: finish:
@ -597,9 +597,9 @@ finish2:
free(filepaths[i]); free(filepaths[i]);
} }
if (ret == PM3_SUCCESS) if (ret == PM3_SUCCESS)
PrintAndLogEx(SUCCESS, _BLUE_("All done.")); PrintAndLogEx(SUCCESS, _CYAN_("All done"));
else else
PrintAndLogEx(ERR, "Aborted on error."); PrintAndLogEx(ERR, "Aborted on error");
PrintAndLogEx(NORMAL, "\nHave a nice day!"); PrintAndLogEx(NORMAL, "\nHave a nice day!");
return ret; return ret;
} }