mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-30 03:28:32 -07:00
Started iclass emulator support on device side. Not functional yet
This commit is contained in:
parent
a4749080d9
commit
e80aeb9695
3 changed files with 17 additions and 0 deletions
|
@ -224,3 +224,16 @@ int LogTraceHitag(const uint8_t * btBytes, int iBits, int iSamples, uint32_t dwP
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
// Emulator memory
|
||||||
|
uint8_t emlSet(uint8_t *data, uint32_t offset, uint32_t length){
|
||||||
|
uint8_t* mem = BigBuf_get_EM_addr();
|
||||||
|
if(offset+length < CARD_MEMORY_SIZE)
|
||||||
|
{
|
||||||
|
memcpy(mem+offset, data, length);
|
||||||
|
return 0;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
Dbprintf("Error, trying to set memory outside of bounds! %d > %d", (offset+length), CARD_MEMORY_SIZE);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -34,4 +34,5 @@ void clear_trace();
|
||||||
void set_tracing(bool enable);
|
void set_tracing(bool enable);
|
||||||
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool readerToTag);
|
bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t iLen, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool readerToTag);
|
||||||
int LogTraceHitag(const uint8_t * btBytes, int iBits, int iSamples, uint32_t dwParity, int bReader);
|
int LogTraceHitag(const uint8_t * btBytes, int iBits, int iSamples, uint32_t dwParity, int bReader);
|
||||||
|
uint8_t emlSet(uint8_t *data, uint32_t offset, uint32_t length);
|
||||||
#endif /* __BIGBUF_H */
|
#endif /* __BIGBUF_H */
|
||||||
|
|
|
@ -900,6 +900,9 @@ void UsbPacketReceived(uint8_t *packet, int len)
|
||||||
case CMD_READER_ICLASS_REPLAY:
|
case CMD_READER_ICLASS_REPLAY:
|
||||||
ReaderIClass_Replay(c->arg[0], c->d.asBytes);
|
ReaderIClass_Replay(c->arg[0], c->d.asBytes);
|
||||||
break;
|
break;
|
||||||
|
case CMD_ICLASS_EML_MEMSET:
|
||||||
|
emlSet(c->d.asBytes,c->arg[0], c->arg[1]);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case CMD_SIMULATE_TAG_HF_LISTEN:
|
case CMD_SIMULATE_TAG_HF_LISTEN:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue