This commit is contained in:
iceman1001 2019-08-05 12:01:11 -04:00
parent be6e46e4ea
commit 25748b0746
2 changed files with 57 additions and 57 deletions

View file

@ -888,8 +888,8 @@ void RAMFUNC SniffIClass(void) {
for (;;) {
WDT_HIT();
if ( checked == 1000 ) {
if (BUTTON_PRESS() || data_available() ) break;
if (checked == 1000) {
if (BUTTON_PRESS() || data_available()) break;
checked = 0;
} else {
checked++;
@ -1009,8 +1009,8 @@ static bool GetIClassCommandFromReader(uint8_t *received, int *len, int maxLen)
WDT_HIT();
if ( checked == 1000 ) {
if( BUTTON_PRESS() || data_available() ) return false;
if (checked == 1000) {
if (BUTTON_PRESS() || data_available()) return false;
checked = 0;
} else {
checked++;
@ -1665,8 +1665,8 @@ static int SendIClassAnswer(uint8_t *resp, int respLen, uint16_t delay) {
uint16_t checked = 0;
for (;;) {
if ( checked == 1000 ) {
if ( BUTTON_PRESS() || data_available()) return 0;
if (checked == 1000) {
if (BUTTON_PRESS() || data_available()) return 0;
checked = 0;
} else {
checked++;
@ -1842,7 +1842,7 @@ static int GetIClassAnswer(uint8_t *receivedResponse, int maxLen, int *samples,
for (;;) {
WDT_HIT();
if ( checked == 1000 ) {
if (checked == 1000) {
if (BUTTON_PRESS() || data_available()) return false;
checked = 0;
} else {
@ -2140,7 +2140,7 @@ void ReaderIClass(uint8_t arg0) {
}
LED_B_OFF();
if ( checked == 1000 ) {
if (checked == 1000) {
userCancelled = BUTTON_PRESS() || data_available();
checked = 0;
} else {
@ -2344,7 +2344,7 @@ void iClass_Authentication_fast(uint64_t arg0, uint64_t arg1, uint8_t *datain) {
uint8_t startup_limit = 10;
while (read_status != 2) {
if ( checked == 1000 ) {
if (checked == 1000) {
if (BUTTON_PRESS() || !data_available()) goto out;
checked = 0;
} else {
@ -2364,7 +2364,7 @@ void iClass_Authentication_fast(uint64_t arg0, uint64_t arg1, uint8_t *datain) {
for (i = 0; i < keyCount; i++) {
// Allow button press / usb cmd to interrupt device
if ( checked == 1000 ) {
if (checked == 1000) {
if (BUTTON_PRESS() || !data_available()) goto out;
checked = 0;
} else {

View file

@ -156,7 +156,7 @@ static int CmdLFNedapDemod(const char *Cmd) {
subtype = (data[1] & 0x1e) >> 1;
customerCode = ((data[1] & 0x01) << 11) | (data[2] << 3) | ((data[3] & 0xe0) >> 5);
if ( isValid == false ) {
if (isValid == false) {
PrintAndLogEx(ERR, "Checksum : %s (calc 0x%04X != 0x%04X)", _RED_("failed"), checksum, *(uint16_t *)(buffer + 5));
ret = PM3_ESOFT;
}
@ -178,8 +178,8 @@ static int CmdLFNedapDemod(const char *Cmd) {
badgeId = r1 * 10000 + r2 * 1000 + r3 * 100 + r4 * 10 + r5;
PrintAndLogEx(SUCCESS, "NEDAP Tag Found: Card ID "_YELLOW_("%05u")" subtype: "_YELLOW_("%1u")" customer code: "_YELLOW_("%03x"), badgeId, subtype, customerCode);
PrintAndLogEx(SUCCESS, "Checksum is %s (0x%04X)", _GREEN_("OK"), checksum );
PrintAndLogEx(SUCCESS, "Raw: %s", sprint_hex(data, size/8));
PrintAndLogEx(SUCCESS, "Checksum is %s (0x%04X)", _GREEN_("OK"), checksum);
PrintAndLogEx(SUCCESS, "Raw: %s", sprint_hex(data, size / 8));
} else {
PrintAndLogEx(ERR, "Invalid idx (1:%02x - 2:%02x - 3:%02x - 4:%02x - 5:%02x)", idxC1, idxC2, idxC3, idxC4, idxC5);
ret = PM3_ESOFT;
@ -195,7 +195,7 @@ static int CmdLFNedapDemod(const char *Cmd) {
}
// validation
if ( (data[8] & 0x80)
if ((data[8] & 0x80)
&& (data[9] & 0x40)
&& (data[10] & 0x20)
&& (data[11] & 0x10)
@ -479,7 +479,7 @@ int CmdLFNedapClone(const char *Cmd) {
}
// TODO info correct?
PrintAndLogEx(INFO, "The block 0 was changed (eXtended) which can be hard to detect. Configure it manually with");
PrintAndLogEx(INFO, _YELLOW_("`lf t55xx config b 64 d BI i 1 o 32`") );
PrintAndLogEx(INFO, _YELLOW_("`lf t55xx config b 64 d BI i 1 o 32`"));
return PM3_SUCCESS;
}