]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifaresniff.c
Attempt to use raw writing capabilities via scripting engine. Not functional yet
[proxmark3-svn] / armsrc / mifaresniff.c
index fc5156fdad27e4cdb4045868e08ca30cb6b25aa8..f95ca3dfc5e0f919a325be7bcc2e4adde3bf2d24 100644 (file)
@@ -31,10 +31,11 @@ int MfSniffInit(void){
 }\r
 \r
 int MfSniffEnd(void){\r
-       UsbCommand ack = {CMD_ACK, {0, 0, 0}};\r
+//     UsbCommand ack = {CMD_ACK, {0, 0, 0}};\r
 \r
        LED_B_ON();\r
-       UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
+  cmd_send(CMD_ACK,0,0,0,0,0);\r
+//     UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
        LED_B_OFF();\r
 \r
        return 0;\r
@@ -166,23 +167,25 @@ int intMfSniffSend() {
        FpgaDisableSscDma();\r
 \r
        while (pckLen > 0) {\r
-               pckSize = min(32, pckLen);\r
-               UsbCommand ack = {CMD_ACK, {1, pckSize, pckNum}};\r
-               memcpy(ack.d.asBytes, trace + traceLen - pckLen, pckSize);\r
+               pckSize = MIN(32, pckLen);\r
+//             UsbCommand ack = {CMD_ACK, {1, pckSize, pckNum}};\r
+//             memcpy(ack.d.asBytes, trace + traceLen - pckLen, pckSize);\r
        \r
                LED_B_ON();\r
-               UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
-               SpinDelay(20);\r
+    cmd_send(CMD_ACK,1,pckSize,pckNum,trace + traceLen - pckLen,pckSize);\r
+//             UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
+//             SpinDelay(20);\r
                LED_B_OFF();\r
 \r
                pckLen -= pckSize;\r
                pckNum++;\r
        }\r
 \r
-       UsbCommand ack = {CMD_ACK, {2, 0, 0}};\r
+//     UsbCommand ack = {CMD_ACK, {2, 0, 0}};\r
 \r
        LED_B_ON();\r
-       UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
+  cmd_send(CMD_ACK,2,0,0,0,0);\r
+//     UsbSendPacket((uint8_t *)&ack, sizeof(UsbCommand));\r
        LED_B_OFF();\r
 \r
        traceLen = 0;\r
Impressum, Datenschutz