mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
chg: easier debug printing
This commit is contained in:
parent
7064a2dd71
commit
e29503b368
2 changed files with 6 additions and 8 deletions
|
@ -409,9 +409,7 @@ int CmdLFSim(const char *Cmd) {
|
||||||
// convert to bitstream if necessary
|
// convert to bitstream if necessary
|
||||||
ChkBitstream(Cmd);
|
ChkBitstream(Cmd);
|
||||||
|
|
||||||
if (g_debugMode)
|
PrintAndLogEx(DEBUG, "DEBUG: Sending [%d bytes]\n", GraphTraceLen);
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: Sending [%d bytes]\n", GraphTraceLen);
|
|
||||||
|
|
||||||
|
|
||||||
//can send only 512 bits at a time (1 byte sent per bit...)
|
//can send only 512 bits at a time (1 byte sent per bit...)
|
||||||
for (uint16_t i = 0; i < GraphTraceLen; i += USB_CMD_DATA_SIZE) {
|
for (uint16_t i = 0; i < GraphTraceLen; i += USB_CMD_DATA_SIZE) {
|
||||||
|
|
|
@ -86,16 +86,16 @@ int usage_lf_awid_brute(void){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sendPing(void){
|
static bool sendPing(void){
|
||||||
UsbCommand ping = {CMD_PING, {1, 2, 3}};
|
UsbCommand ping = {CMD_PING, {1, 2, 3}};
|
||||||
SendCommand(&ping);
|
SendCommand(&ping);
|
||||||
SendCommand(&ping);
|
SendCommand(&ping);
|
||||||
SendCommand(&ping);
|
SendCommand(&ping);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
UsbCommand resp;
|
UsbCommand resp;
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
||||||
return 0;
|
return false;
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, uint8_t *bits, size_t bs_len, bool verbose){
|
static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, uint8_t *bits, size_t bs_len, bool verbose){
|
||||||
|
@ -291,7 +291,7 @@ int CmdAWIDDemod(const char *Cmd) {
|
||||||
|
|
||||||
size = removeParity(bits, idx+8, 4, 1, 88);
|
size = removeParity(bits, idx+8, 4, 1, 88);
|
||||||
if (size != 66){
|
if (size != 66){
|
||||||
if (g_debugMode) PrintAndLogEx(DEBUG, "DEBUG: Error - AWID at parity check-tag size does not match AWID format");
|
PrintAndLogEx(DEBUG, "DEBUG: Error - AWID at parity check-tag size does not match AWID format");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// ok valid card found!
|
// ok valid card found!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue