X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4401050bcc877a9f1137dc6241f0895d0ca09d98..86fdf240e08493c3fc6cb92900ebc7bcb3a5ee84:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index e457f438..bcff7476 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -9,6 +9,7 @@ // The main application code. This is the first thing called after start.c // executes. //----------------------------------------------------------------------------- +#include #include "usb_cdc.h" #include "proxmark3.h" #include "apps.h" @@ -1005,10 +1006,10 @@ void UsbPacketReceived(uint8_t *packet, int len) WritePCF7931(c->d.asBytes[0],c->d.asBytes[1],c->d.asBytes[2],c->d.asBytes[3],c->d.asBytes[4],c->d.asBytes[5],c->d.asBytes[6], c->d.asBytes[9], c->d.asBytes[7]-128,c->d.asBytes[8]-128, c->arg[0], c->arg[1], c->arg[2]); break; case CMD_EM4X_READ_WORD: - EM4xReadWord(c->arg[1], c->arg[2],c->d.asBytes[0]); + EM4xReadWord(c->arg[0], c->arg[1], c->arg[2]); break; case CMD_EM4X_WRITE_WORD: - EM4xWriteWord(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes[0]); + EM4xWriteWord(c->arg[0], c->arg[1], c->arg[2]); break; case CMD_AWID_DEMOD_FSK: // Set realtime AWID demodulation CmdAWIDdemodFSK(c->arg[0], 0, 0, 1); @@ -1017,7 +1018,7 @@ void UsbPacketReceived(uint8_t *packet, int len) CopyVikingtoT55xx(c->arg[0], c->arg[1], c->arg[2]); break; case CMD_COTAG: - Cotag(); + Cotag(c->arg[0]); break; #endif @@ -1228,6 +1229,24 @@ void UsbPacketReceived(uint8_t *packet, int len) break; case CMD_EMV_DUMP_CARD: EMVdumpcard(); + break; +/* + case CMD_EMV_READ_RECORD: + EMVReadRecord(c->arg[0], c->arg[1], NULL); + break; + case CMD_EMV_CLONE: + EMVClone(c->arg[0], c->arg[1]); + break; + case CMD_EMV_SIM: + EMVSim(); + break; + case CMD_EMV_TEST: + EMVTest(); + break; + case CMD_EMV_FUZZ_RATS: + EMVFuzz_RATS(c->arg[0],c->d.asBytes); + break; + */ #endif #ifdef WITH_ICLASS // Makes use of ISO14443a FPGA Firmware @@ -1302,7 +1321,7 @@ void UsbPacketReceived(uint8_t *packet, int len) // arg0 = startindex // arg1 = length bytes to transfer // arg2 = RFU - //Dbprintf("transfer to client parameters: %llu | %llu | %llu", c->arg[0], c->arg[1], c->arg[2]); + //Dbprintf("transfer to client parameters: %" PRIu64 " | %" PRIu64 " | %" PRIu64, c->arg[0], c->arg[1], c->arg[2]); for(size_t i = 0; i < c->arg[1]; i += USB_CMD_DATA_SIZE) { len = MIN( (c->arg[1] - i), USB_CMD_DATA_SIZE);