This commit is contained in:
iceman1001 2019-12-11 15:56:36 +01:00
commit 64d08de6a6
2 changed files with 13 additions and 16 deletions

View file

@ -86,7 +86,7 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) {
char asBuff[120]; char asBuff[120];
memset(asBuff, 0, sizeof(asBuff)); memset(asBuff, 0, sizeof(asBuff));
uint32_t mem_avail = 0; uint32_t mem_avail = 0;
PrintAndLogEx(NORMAL, "\n [ Hardware ] "); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ Hardware ]"));
switch (iChipID) { switch (iChipID) {
case 0x270B0A40: case 0x270B0A40:
@ -447,13 +447,13 @@ static int CmdSetDivisor(const char *Cmd) {
uint8_t arg = param_get8ex(Cmd, 0, 95, 10); uint8_t arg = param_get8ex(Cmd, 0, 95, 10);
if (arg < 19) { if (arg < 19) {
PrintAndLogEx(ERR, "divisor must be between 19 and 255"); PrintAndLogEx(ERR, "divisor must be between" _YELLOW_("19") " and " _YELLOW_("255") );
return PM3_EINVARG; return PM3_EINVARG;
} }
// 12 000 000 (12MHz) // 12 000 000 (12MHz)
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_LF_SET_DIVISOR, (uint8_t *)&arg, sizeof(arg)); SendCommandNG(CMD_LF_SET_DIVISOR, (uint8_t *)&arg, sizeof(arg));
PrintAndLogEx(SUCCESS, "Divisor set, expected %.1f kHz", ((double)12000 / (arg + 1))); PrintAndLogEx(SUCCESS, "Divisor set, expected " _YELLOW_("%.1f")" kHz", ((double)12000 / (arg + 1)));
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -514,11 +514,11 @@ static int CmdStatus(const char *Cmd) {
static int CmdTia(const char *Cmd) { static int CmdTia(const char *Cmd) {
(void)Cmd; // Cmd is not used so far (void)Cmd; // Cmd is not used so far
clearCommandBuffer(); clearCommandBuffer();
PrintAndLogEx(INFO, "Triggering new Timing Interval Acquisition..."); PrintAndLogEx(INFO, "Triggering new Timing Interval Acquisition (TIA)...");
PacketResponseNG resp; PacketResponseNG resp;
SendCommandNG(CMD_TIA, NULL, 0); SendCommandNG(CMD_TIA, NULL, 0);
if (WaitForResponseTimeout(CMD_TIA, &resp, 2000) == false) if (WaitForResponseTimeout(CMD_TIA, &resp, 2000) == false)
PrintAndLogEx(WARNING, "Tia command failed. You probably need to unplug the Proxmark3."); PrintAndLogEx(WARNING, "TIA command failed. You probably need to unplug the Proxmark3.");
PrintAndLogEx(INFO, "TIA done."); PrintAndLogEx(INFO, "TIA done.");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
@ -528,7 +528,7 @@ static int CmdPing(const char *Cmd) {
if (len > PM3_CMD_DATA_SIZE) if (len > PM3_CMD_DATA_SIZE)
len = PM3_CMD_DATA_SIZE; len = PM3_CMD_DATA_SIZE;
if (len) { if (len) {
PrintAndLogEx(INFO, "Ping sent with payload len=%d", len); PrintAndLogEx(INFO, "Ping sent with payload len = %d", len);
} else { } else {
PrintAndLogEx(INFO, "Ping sent"); PrintAndLogEx(INFO, "Ping sent");
} }
@ -702,26 +702,24 @@ void pm3_version(bool verbose, bool oneliner) {
SendCommandNG(CMD_VERSION, NULL, 0); SendCommandNG(CMD_VERSION, NULL, 0);
if (WaitForResponseTimeout(CMD_VERSION, &resp, 1000)) { if (WaitForResponseTimeout(CMD_VERSION, &resp, 1000)) {
PrintAndLogEx(NORMAL, "\n" _BLUE_(" [ Proxmark3 RFID instrument ]") "\n"); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ Proxmark3 RFID instrument ]"));
PrintAndLogEx(NORMAL, "\n [ CLIENT ]"); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ CLIENT ]"));
PrintAndLogEx(NORMAL, " client: RRG/Iceman"); // TODO version info? PrintAndLogEx(NORMAL, " client: RRG/Iceman"); // TODO version info?
PrintAndLogEx(NORMAL, " compiled with " PM3CLIENTCOMPILER __VERSION__ PM3HOSTOS PM3HOSTARCH); PrintAndLogEx(NORMAL, " compiled with " PM3CLIENTCOMPILER __VERSION__ PM3HOSTOS PM3HOSTARCH);
//#if PLATFORM == PM3RDV4
if (IfPm3Flash() == false && IfPm3Smartcard() == false && IfPm3FpcUsartHost() == false) { if (IfPm3Flash() == false && IfPm3Smartcard() == false && IfPm3FpcUsartHost() == false) {
PrintAndLogEx(NORMAL, "\n [ PROXMARK3 ]"); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ PROXMARK3 ]"));
} else { } else {
PrintAndLogEx(NORMAL, "\n [ PROXMARK3 RDV4 ]"); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ PROXMARK3 RDV4 ]"));
PrintAndLogEx(NORMAL, " external flash: %s", IfPm3Flash() ? _GREEN_("present") : _YELLOW_("absent")); PrintAndLogEx(NORMAL, " external flash: %s", IfPm3Flash() ? _GREEN_("present") : _YELLOW_("absent"));
PrintAndLogEx(NORMAL, " smartcard reader: %s", IfPm3Smartcard() ? _GREEN_("present") : _YELLOW_("absent")); PrintAndLogEx(NORMAL, " smartcard reader: %s", IfPm3Smartcard() ? _GREEN_("present") : _YELLOW_("absent"));
PrintAndLogEx(NORMAL, "\n [ PROXMARK3 RDV4 Extras ]"); PrintAndLogEx(NORMAL, "\n " _YELLOW_("[ PROXMARK3 RDV4 Extras ]"));
PrintAndLogEx(NORMAL, " FPC USART for BT add-on support: %s", IfPm3FpcUsartHost() ? _GREEN_("present") : _YELLOW_("absent")); PrintAndLogEx(NORMAL, " FPC USART for BT add-on support: %s", IfPm3FpcUsartHost() ? _GREEN_("present") : _YELLOW_("absent"));
if (IfPm3FpcUsartDevFromUsb()) { if (IfPm3FpcUsartDevFromUsb()) {
PrintAndLogEx(NORMAL, " FPC USART for developer support: %s", _GREEN_("present")); PrintAndLogEx(NORMAL, " FPC USART for developer support: %s", _GREEN_("present"));
} }
} }
//#endif
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");

View file

@ -33,14 +33,14 @@ static void showBanner(void) {
PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(NORMAL, "\n");
#if defined(__linux__) || (__APPLE__) || (_WIN32) #if defined(__linux__) || (__APPLE__) || (_WIN32)
PrintAndLogEx(NORMAL, " " _BLUE_("██████╗ ███╗ ███╗ ████╗ ") " ...iceman repo"); PrintAndLogEx(NORMAL, " " _BLUE_("██████╗ ███╗ ███╗ ████╗ "));
PrintAndLogEx(NORMAL, " " _BLUE_("██╔══██╗████╗ ████║ ══█║")); PrintAndLogEx(NORMAL, " " _BLUE_("██╔══██╗████╗ ████║ ══█║"));
PrintAndLogEx(NORMAL, " " _BLUE_("██████╔╝██╔████╔██║ ████╔╝")); PrintAndLogEx(NORMAL, " " _BLUE_("██████╔╝██╔████╔██║ ████╔╝"));
PrintAndLogEx(NORMAL, " " _BLUE_("██╔═══╝ ██║╚██╔╝██║ ══█║") " iceman@icesql.net"); PrintAndLogEx(NORMAL, " " _BLUE_("██╔═══╝ ██║╚██╔╝██║ ══█║") " iceman@icesql.net");
PrintAndLogEx(NORMAL, " " _BLUE_("██║ ██║ ╚═╝ ██║ ████╔╝") " https://github.com/rfidresearchgroup/proxmark3/"); PrintAndLogEx(NORMAL, " " _BLUE_("██║ ██║ ╚═╝ ██║ ████╔╝") " https://github.com/rfidresearchgroup/proxmark3/");
PrintAndLogEx(NORMAL, " " _BLUE_("╚═╝ ╚═╝ ╚═╝ ╚═══╝ ") "pre-release v4.0"); PrintAndLogEx(NORMAL, " " _BLUE_("╚═╝ ╚═╝ ╚═╝ ╚═══╝ ") "pre-release v4.0");
#else #else
PrintAndLogEx(NORMAL, " ======. ===. ===. ====. ...iceman repo"); PrintAndLogEx(NORMAL, " ======. ===. ===. ====.");
PrintAndLogEx(NORMAL, " ==...==.====. ====. ..=."); PrintAndLogEx(NORMAL, " ==...==.====. ====. ..=.");
PrintAndLogEx(NORMAL, " ======..==.====.==. ====.."); PrintAndLogEx(NORMAL, " ======..==.====.==. ====..");
PrintAndLogEx(NORMAL, " ==..... ==..==..==. ..=. iceman@icesql.net"); PrintAndLogEx(NORMAL, " ==..... ==..==..==. ..=. iceman@icesql.net");
@ -52,7 +52,6 @@ static void showBanner(void) {
// printf("\nMonero: 43mNJLpgBVaTvyZmX9ajcohpvVkaRy1kbZPm8tqAb7itZgfuYecgkRF36rXrKFUkwEGeZedPsASRxgv4HPBHvJwyJdyvQuP"); // printf("\nMonero: 43mNJLpgBVaTvyZmX9ajcohpvVkaRy1kbZPm8tqAb7itZgfuYecgkRF36rXrKFUkwEGeZedPsASRxgv4HPBHvJwyJdyvQuP");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
fflush(stdout); fflush(stdout);
g_printAndLog = PRINTANDLOG_PRINT | PRINTANDLOG_LOG; g_printAndLog = PRINTANDLOG_PRINT | PRINTANDLOG_LOG;
} }