mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
rearranged banner output and messages
This commit is contained in:
parent
74ece72b26
commit
2639de23c6
2 changed files with 11 additions and 12 deletions
|
@ -342,17 +342,16 @@ bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if we can communicate with Pm3
|
||||||
int TestProxmark(void) {
|
int TestProxmark(void) {
|
||||||
// check if we can communicate with Pm3
|
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
UsbCommand c = {CMD_PING, {0, 0, 0}, {{0}}};
|
UsbCommand c = {CMD_PING, {0, 0, 0}, {{0}}};
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
if (WaitForResponseTimeout(CMD_ACK, &resp, 5000)) {
|
||||||
PrintAndLogEx(INFO, "Ping successful, communicating with PM3 over %s.", resp.arg[0] == 1 ? "FPC" : "USB");
|
PrintAndLogEx(INFO, "Communicating with PM3 over %s.", resp.arg[0] == 1 ? "FPC" : "USB");
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(WARNING, _RED_("Ping failed"));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +359,6 @@ int TestProxmark(void) {
|
||||||
void CloseProxmark(void) {
|
void CloseProxmark(void) {
|
||||||
conn.run = false;
|
conn.run = false;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __BIONIC__
|
#ifdef __BIONIC__
|
||||||
if (USB_communication_thread != 0) {
|
if (USB_communication_thread != 0) {
|
||||||
pthread_join(USB_communication_thread, NULL);
|
pthread_join(USB_communication_thread, NULL);
|
||||||
|
@ -421,8 +419,8 @@ bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand *response, size_t ms_timeo
|
||||||
|
|
||||||
if (msclock() - start_time > 3000 && show_warning) {
|
if (msclock() - start_time > 3000 && show_warning) {
|
||||||
// 3 seconds elapsed (but this doesn't mean the timeout was exceeded)
|
// 3 seconds elapsed (but this doesn't mean the timeout was exceeded)
|
||||||
PrintAndLogEx(NORMAL, "Waiting for a response from the proxmark...");
|
PrintAndLogEx(INFO, "Waiting for a response from the proxmark...");
|
||||||
PrintAndLogEx(NORMAL, "You can cancel this operation by pressing the pm3 button");
|
PrintAndLogEx(INFO, "You can cancel this operation by pressing the pm3 button");
|
||||||
show_warning = false;
|
show_warning = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,6 +420,12 @@ int main(int argc, char *argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ascii art
|
||||||
|
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
||||||
|
if (!script_cmds_file && !stdinOnPipe)
|
||||||
|
showBanner();
|
||||||
|
|
||||||
|
|
||||||
// default speed for USB 460800, USART(FPC serial) 115200 baud
|
// default speed for USB 460800, USART(FPC serial) 115200 baud
|
||||||
if (speed == 0)
|
if (speed == 0)
|
||||||
#ifdef WITH_FPC_HOST
|
#ifdef WITH_FPC_HOST
|
||||||
|
@ -454,11 +460,6 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ascii art
|
|
||||||
bool stdinOnPipe = !isatty(STDIN_FILENO);
|
|
||||||
if (!script_cmds_file && !stdinOnPipe)
|
|
||||||
showBanner();
|
|
||||||
|
|
||||||
// set global variables
|
// set global variables
|
||||||
set_my_executable_path();
|
set_my_executable_path();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue