WIP - hitag sniff, eload, sim

This commit is contained in:
iceman1001 2021-04-04 17:06:48 +02:00
commit d012a879f2
3 changed files with 318 additions and 66 deletions

View file

@ -49,6 +49,7 @@
#include "commonutil.h"
#include "crc16.h"
#ifdef WITH_LCD
#include "LCD_disabled.h"
#endif
@ -1084,7 +1085,7 @@ static void PacketReceived(PacketCommandNG *packet) {
break;
}
case CMD_LF_HITAG_SIMULATE: { // Simulate Hitag tag, args = memory content
SimulateHitag2((bool)packet->oldarg[0], packet->data.asBytes);
SimulateHitag2();
break;
}
case CMD_LF_HITAG_READER: { // Reader for Hitag tags, args = type and function
@ -1111,6 +1112,18 @@ static void PacketReceived(PacketCommandNG *packet) {
}
break;
}
case CMD_LF_HITAG_ELOAD: {
/*
struct p {
uint16_t len;
uint8_t *data;
} PACKED;
struct p *payload = (struct p *) packet->data.asBytes;
uint8_t *mem = BigBuf_get_EM_addr();
memcpy((uint8_t *)mem.sectors, payload->data, payload->len);
*/
break;
}
#endif
#ifdef WITH_EM4x50