mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
Make style.
This commit is contained in:
parent
b422b79679
commit
42fd13985f
4 changed files with 13 additions and 13 deletions
|
@ -418,7 +418,7 @@ bool WaitForFelicaReply(uint16_t maxbytes) {
|
||||||
Process18092Byte(b);
|
Process18092Byte(b);
|
||||||
if (FelicaFrame.state == STATE_FULL) {
|
if (FelicaFrame.state == STATE_FULL) {
|
||||||
felica_nexttransfertime = MAX(felica_nexttransfertime,
|
felica_nexttransfertime = MAX(felica_nexttransfertime,
|
||||||
(GetCountSspClk() & 0xfffffff8) - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER) / 16 + FELICA_FRAME_DELAY_TIME);
|
(GetCountSspClk() & 0xfffffff8) - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER) / 16 + FELICA_FRAME_DELAY_TIME);
|
||||||
|
|
||||||
LogTrace(
|
LogTrace(
|
||||||
FelicaFrame.framebytes,
|
FelicaFrame.framebytes,
|
||||||
|
@ -593,13 +593,13 @@ void felica_sniff(uint32_t samplesToSkip, uint32_t triggersToSkip) {
|
||||||
if (FelicaFrame.state == STATE_FULL) {
|
if (FelicaFrame.state == STATE_FULL) {
|
||||||
//Dbprintf("Sniffing - Got Felica Frame! Sample remaining %i", remFrames);
|
//Dbprintf("Sniffing - Got Felica Frame! Sample remaining %i", remFrames);
|
||||||
remFrames--;
|
remFrames--;
|
||||||
if (remFrames <= 0){
|
if (remFrames <= 0) {
|
||||||
Dbprintf("Stop Sniffing - samplesToSkip reached!");
|
Dbprintf("Stop Sniffing - samplesToSkip reached!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if((FelicaFrame.framebytes[3] % 2) == 0){
|
if ((FelicaFrame.framebytes[3] % 2) == 0) {
|
||||||
isTagFrame = false; // All Reader Frames are even and all Tag frames are odd
|
isTagFrame = false; // All Reader Frames are even and all Tag frames are odd
|
||||||
} else{
|
} else {
|
||||||
isTagFrame = true;
|
isTagFrame = true;
|
||||||
}
|
}
|
||||||
LogTrace(FelicaFrame.framebytes,
|
LogTrace(FelicaFrame.framebytes,
|
||||||
|
@ -608,7 +608,7 @@ void felica_sniff(uint32_t samplesToSkip, uint32_t triggersToSkip) {
|
||||||
((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER,
|
((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER,
|
||||||
NULL,
|
NULL,
|
||||||
isTagFrame
|
isTagFrame
|
||||||
);
|
);
|
||||||
numbts += FelicaFrame.len;
|
numbts += FelicaFrame.len;
|
||||||
FelicaFrameReset();
|
FelicaFrameReset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -795,7 +795,7 @@ static int CmdHFFelicaSniff(const char *Cmd) {
|
||||||
paramCount++;
|
paramCount++;
|
||||||
if (param_getlength(Cmd, paramCount) < 5) {
|
if (param_getlength(Cmd, paramCount) < 5) {
|
||||||
samples2skip = param_get32ex(Cmd, paramCount++, 0, 10);
|
samples2skip = param_get32ex(Cmd, paramCount++, 0, 10);
|
||||||
}else{
|
} else {
|
||||||
PrintAndLogEx(ERR, "Invalid samples number!");
|
PrintAndLogEx(ERR, "Invalid samples number!");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
@ -805,7 +805,7 @@ static int CmdHFFelicaSniff(const char *Cmd) {
|
||||||
paramCount++;
|
paramCount++;
|
||||||
if (param_getlength(Cmd, paramCount) < 5) {
|
if (param_getlength(Cmd, paramCount) < 5) {
|
||||||
triggers2skip = param_get32ex(Cmd, paramCount++, 0, 10);
|
triggers2skip = param_get32ex(Cmd, paramCount++, 0, 10);
|
||||||
}else{
|
} else {
|
||||||
PrintAndLogEx(ERR, "Invalid triggers number!");
|
PrintAndLogEx(ERR, "Invalid triggers number!");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
@ -818,11 +818,11 @@ static int CmdHFFelicaSniff(const char *Cmd) {
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if(samples2skip <= 0){
|
if (samples2skip <= 0) {
|
||||||
samples2skip = 10;
|
samples2skip = 10;
|
||||||
PrintAndLogEx(INFO, "Set default samples2skip: %i", samples2skip);
|
PrintAndLogEx(INFO, "Set default samples2skip: %i", samples2skip);
|
||||||
}
|
}
|
||||||
if(triggers2skip <= 0){
|
if (triggers2skip <= 0) {
|
||||||
triggers2skip = 5000;
|
triggers2skip = 5000;
|
||||||
PrintAndLogEx(INFO, "Set default triggers2skip: %i", triggers2skip);
|
PrintAndLogEx(INFO, "Set default triggers2skip: %i", triggers2skip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ static int CmdFdxDemod(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t c[] = {0, 0};
|
uint8_t c[] = {0, 0};
|
||||||
compute_crc(CRC_11784, raw, sizeof(raw), &c[0], &c[1]);
|
compute_crc(CRC_11784, raw, sizeof(raw), &c[0], &c[1]);
|
||||||
PrintAndLogEx(SUCCESS, "CRC-16 0x%04X [ %s] ", crc, (crc == (c[1] << 8 | c[0]) ) ? _GREEN_("OK") : _RED_("Fail"));
|
PrintAndLogEx(SUCCESS, "CRC-16 0x%04X [ %s] ", crc, (crc == (c[1] << 8 | c[0])) ? _GREEN_("OK") : _RED_("Fail"));
|
||||||
|
|
||||||
if (g_debugMode) {
|
if (g_debugMode) {
|
||||||
PrintAndLogEx(DEBUG, "Start marker %d; Size %zu", preambleIndex, size);
|
PrintAndLogEx(DEBUG, "Start marker %d; Size %zu", preambleIndex, size);
|
||||||
|
@ -313,7 +313,7 @@ static int CmdFdxSim(const char *Cmd) {
|
||||||
|
|
||||||
countryid = param_get32ex(Cmd, 0, 0, 10);
|
countryid = param_get32ex(Cmd, 0, 0, 10);
|
||||||
animalid = param_get64ex(Cmd, 1, 0, 10);
|
animalid = param_get64ex(Cmd, 1, 0, 10);
|
||||||
extended = param_get32ex(Cmd, 2, 0 , 10);
|
extended = param_get32ex(Cmd, 2, 0, 10);
|
||||||
|
|
||||||
verify_values(&animalid, &countryid);
|
verify_values(&animalid, &countryid);
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
case ISO_14443B:
|
case ISO_14443B:
|
||||||
case TOPAZ:
|
case TOPAZ:
|
||||||
case FELICA:
|
case FELICA:
|
||||||
crcStatus = !felica_CRC_check(frame+2, data_len-4);
|
crcStatus = !felica_CRC_check(frame + 2, data_len - 4);
|
||||||
break;
|
break;
|
||||||
case PROTO_MIFARE:
|
case PROTO_MIFARE:
|
||||||
crcStatus = mifare_CRC_check(isResponse, frame, data_len);
|
crcStatus = mifare_CRC_check(isResponse, frame, data_len);
|
||||||
|
@ -350,7 +350,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
if (protocol == PROTO_MIFARE)
|
if (protocol == PROTO_MIFARE)
|
||||||
annotateMifare(explanation, sizeof(explanation), frame, data_len, parityBytes, parity_len, isResponse);
|
annotateMifare(explanation, sizeof(explanation), frame, data_len, parityBytes, parity_len, isResponse);
|
||||||
|
|
||||||
if(protocol == FELICA)
|
if (protocol == FELICA)
|
||||||
annotateFelica(explanation, sizeof(explanation), frame, data_len);
|
annotateFelica(explanation, sizeof(explanation), frame, data_len);
|
||||||
|
|
||||||
if (!isResponse) {
|
if (!isResponse) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue