UsbCommand resp;
UsbCommand c = {CMD_ISO_14443B_COMMAND, {0, 0, 0}};
clearCommandBuffer();
SendCommand(&c);
UsbCommand resp;
UsbCommand c = {CMD_ISO_14443B_COMMAND, {0, 0, 0}};
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK,&resp,1000)) {
- PrintAndLog("Command time-out");
- return 1;
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
+ if ( verbose ) PrintAndLog("Command time-out");
+ return 0;
}
int HF14BCmdRaw(bool reply, bool *crc, bool power, uint8_t *data, uint8_t *datalen, bool verbose){
}
int HF14BCmdRaw(bool reply, bool *crc, bool power, uint8_t *data, uint8_t *datalen, bool verbose){
//05 00 00 = find one tag in field
//1d xx xx xx xx 00 08 01 00 = attrib xx=UID (resp 10 [f9 e0])
//a3 = ? (resp 03 [e2 c2])
//05 00 00 = find one tag in field
//1d xx xx xx xx 00 08 01 00 = attrib xx=UID (resp 10 [f9 e0])
//a3 = ? (resp 03 [e2 c2])
- if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawClose();
+ if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawCloseEx(verbose);
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog (" UID: %s", sprint_hex(data+1,4));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog (" UID: %s", sprint_hex(data+1,4));
- if (HF14BCmdRaw(true, &crc2, true, cmd2, &cmdLen, false)==0) return rawClose();
+ if (HF14BCmdRaw(true, &crc2, true, cmd2, &cmdLen, false)==0) rawCloseEx(verbose);
-int HF14BStdInfo(uint8_t *data, uint8_t *datalen){
- if (!HF14BStdReader(data,datalen)) return 0;
+int HF14BStdInfo(uint8_t *data, uint8_t *datalen, bool verbose){
+ if (!HF14BStdReader(data,datalen, verbose)) return 0;
-int HF14B_ST_Reader(uint8_t *data, uint8_t *datalen, bool closeCon){
+int HF14B_ST_Reader(uint8_t *data, uint8_t *datalen, bool closeCon, bool verbose){
- if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawClose();
+ if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawCloseEx(verbose);
- if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawClose();
+ if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawCloseEx(verbose);
- if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawClose();
+ if (HF14BCmdRaw(true, &crc, true, data, datalen, false)==0) return rawCloseEx(verbose);
-int HF14B_ST_Info(uint8_t *data, uint8_t *datalen){
- if (!HF14B_ST_Reader(data, datalen, false)) return 0;
+int HF14B_ST_Info(uint8_t *data, uint8_t *datalen, bool verbose){
+ if (!HF14B_ST_Reader(data, datalen, false, verbose)) return 0;
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x000b3f80 command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x000b3f80 command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x0A command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x0A command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x0C command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
PrintAndLog ("\n14443-3b tag found:");
PrintAndLog ("Unknown tag type answered to a 0x0C command ans:");
PrintAndLog ("%s",sprint_hex(data,*datalen));
// try unknown 14b read commands (to be identified later)
// could be read of calypso, CEPAS, moneo, or pico pass.
// try unknown 14b read commands (to be identified later)
// could be read of calypso, CEPAS, moneo, or pico pass.
- if (HF14B_ST_Reader(data, &datalen, true)) return 1;
+ if (HF14B_ST_Reader(data, &datalen, true, verbose)) return 1;
// try unknown 14b read commands (to be identified later)
// could be read of calypso, CEPAS, moneo, or pico pass.
// try unknown 14b read commands (to be identified later)
// could be read of calypso, CEPAS, moneo, or pico pass.
- temp[0] = (Crumb(value, 22) << 4 | Crumb(value, 14 ) << 2 | Crumb(value, 6)) << 4;
- temp[0] |= Crumb(value, 20) << 4 | Crumb(value, 12 ) << 2 | Crumb(value, 4);
- temp[1] = (Crumb(value, 18) << 4 | Crumb(value, 10 ) << 2 | Crumb(value, 2)) << 4;
- temp[1] |= Crumb(value, 16) << 4 | Crumb(value, 8 ) << 2 | Crumb(value, 0);
+ temp[0] = (CRUMB(value, 22) << 4 | CRUMB(value, 14 ) << 2 | CRUMB(value, 6)) << 4;
+ temp[0] |= CRUMB(value, 20) << 4 | CRUMB(value, 12 ) << 2 | CRUMB(value, 4);
+ temp[1] = (CRUMB(value, 18) << 4 | CRUMB(value, 10 ) << 2 | CRUMB(value, 2)) << 4;
+ temp[1] |= CRUMB(value, 16) << 4 | CRUMB(value, 8 ) << 2 | CRUMB(value, 0);
SwapEndian64ex(v , 8, 4, v_ptr);
// ENCRYPTION KEY:
SwapEndian64ex(v , 8, 4, v_ptr);
// ENCRYPTION KEY:
-
- uint8_t key[16] = {0x00};
+ uint8_t key[16] = {0x55,0xFE,0xF6,0x30,0x62,0xBF,0x0B,0xC1,0xC9,0xB3,0x7C,0x34,0x97,0x3E,0x29,0xFB };
uint8_t keyle[16];
uint8_t* key_ptr = keyle;
SwapEndian64ex(key , sizeof(key), 4, key_ptr);
uint8_t keyle[16];
uint8_t* key_ptr = keyle;
SwapEndian64ex(key , sizeof(key), 4, key_ptr);