X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2d4eae76177550984019fc7e9dbb6ee54b6e703e..5acd09bdfb9b3777585f3875190e942e259a98f0:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index d7f05d16..d3544861 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -186,7 +186,7 @@ int AvgAdc(int ch) // was static - merlok void MeasureAntennaTuning(void) { uint8_t *dest = (uint8_t *)BigBuf; - int i, ptr = 0, adcval = 0, peak = 0, peakv = 0, peakf = 0;; + int i, adcval = 0, peak = 0, peakv = 0, peakf = 0; //ptr = 0 int vLf125 = 0, vLf134 = 0, vHf = 0; // in mV UsbCommand c; @@ -217,7 +217,7 @@ void MeasureAntennaTuning(void) peakv = adcval; peak = dest[i]; peakf = i; - ptr = i; + //ptr = i; } } @@ -611,13 +611,13 @@ void UsbPacketReceived(uint8_t *packet, int len) ModThenAcquireRawAdcSamples125k(c->arg[0],c->arg[1],c->arg[2],c->d.asBytes); break; case CMD_HID_DEMOD_FSK: - CmdHIDdemodFSK(0, 0, 0, 1); // Demodulate HID tag + CmdHIDdemodFSK(0, 0, 0, 1); // Demodulate HID tag break; case CMD_HID_SIM_TAG: CmdHIDsimTAG(c->arg[0], c->arg[1], 1); // Simulate HID tag by ID break; case CMD_HID_CLONE_TAG: - CopyHIDtoT5567(c->arg[0], c->arg[1]); // Clone HID tag by ID to T55x7 + CopyHIDtoT55x7(c->arg[0], c->arg[1]); // Clone HID tag by ID to T55x7 break; case CMD_EM410X_WRITE_TAG: WriteEM410x(c->arg[0], c->arg[1], c->arg[2]); @@ -636,6 +636,12 @@ void UsbPacketReceived(uint8_t *packet, int len) case CMD_LF_SIMULATE_BIDIR: SimulateTagLowFrequencyBidir(c->arg[0], c->arg[1]); break; + case CMD_INDALA_CLONE_TAG: // Clone Indala 64-bit tag by UID to T55x7 + CopyIndala64toT55x7(c->arg[0], c->arg[1]); + break; + case CMD_INDALA_CLONE_TAG_L: // Clone Indala 224-bit tag by UID to T55x7 + CopyIndala224toT55x7(c->d.asDwords[0], c->d.asDwords[1], c->d.asDwords[2], c->d.asDwords[3], c->d.asDwords[4], c->d.asDwords[5], c->d.asDwords[6]); + break; #endif #ifdef WITH_ISO15693 @@ -700,13 +706,16 @@ void UsbPacketReceived(uint8_t *packet, int len) #ifdef WITH_ISO14443a case CMD_SNOOP_ISO_14443a: - SnoopIso14443a(); + SnoopIso14443a(c->arg[0]); break; case CMD_READER_ISO_14443a: ReaderIso14443a(c, &ack); break; case CMD_SIMULATE_TAG_ISO_14443a: - SimulateIso14443aTag(c->arg[0], c->arg[1]); // ## Simulate iso14443a tag - pass tag type & UID + SimulateIso14443aTag(c->arg[0], c->arg[1], c->arg[2]); // ## Simulate iso14443a tag - pass tag type & UID + break; + case CMD_EPA_PACE_COLLECT_NONCE: + EPA_PACE_Collect_Nonce(c, &ack); break; case CMD_READER_MIFARE: @@ -747,6 +756,19 @@ void UsbPacketReceived(uint8_t *packet, int len) case CMD_MIFARE_EML_CARDLOAD: MifareECardLoad(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes); break; + + // Work with "magic Chinese" card + case CMD_MIFARE_EML_CSETBLOCK: + MifareCSetBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes); + break; + case CMD_MIFARE_EML_CGETBLOCK: + MifareCGetBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes); + break; + + // mifare sniffer + case CMD_MIFARE_SNIFFER: + SniffMifare(c->arg[0]); + break; #endif #ifdef WITH_ICLASS @@ -754,6 +776,12 @@ void UsbPacketReceived(uint8_t *packet, int len) case CMD_SNOOP_ICLASS: SnoopIClass(); break; + case CMD_SIMULATE_TAG_ICLASS: + SimulateIClass(c->arg[0], c->d.asBytes); + break; + case CMD_READER_ICLASS: + ReaderIClass(c->arg[0]); + break; #endif case CMD_SIMULATE_TAG_HF_LISTEN: