mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
Added standalone mode for ISO15693 cards.
This commit is contained in:
parent
41259b8991
commit
4fd4256acd
7 changed files with 103 additions and 6 deletions
|
@ -68,13 +68,16 @@ define KNOWN_STANDALONE_DEFINITIONS
|
|||
| HF_TCPRST | IKEA Rothult read/sim/dump/emul |
|
||||
| | - Nick Draffen |
|
||||
+----------------------------------------------------------+
|
||||
| HF_TMUDFORD | Read and emulate 15 tags |
|
||||
| | - Tim Mudford |
|
||||
+----------------------------------------------------------+
|
||||
| HF_YOUNG | Mifare sniff/simulation |
|
||||
| | - Craig Young |
|
||||
+----------------------------------------------------------+
|
||||
endef
|
||||
|
||||
STANDALONE_MODES := LF_SKELETON LF_EM4100EMUL LF_EM4100RSWB LF_EM4100RWC LF_HIDBRUTE LF_ICEHID LF_PROXBRUTE LF_SAMYRUN LF_THAREXDE
|
||||
STANDALONE_MODES += HF_14ASNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MSDSAL HF_TCPRST HF_YOUNG
|
||||
STANDALONE_MODES += HF_14ASNIFF HF_AVEFUL HF_BOG HF_COLIN HF_CRAFTBYTE HF_ICECLASS HF_LEGIC HF_MATTYRUN HF_MSDSAL HF_TCPRST HF_TMUDFORD HF_YOUNG
|
||||
STANDALONE_MODES_REQ_SMARTCARD :=
|
||||
STANDALONE_MODES_REQ_FLASH := LF_ICEHID LF_THAREXDE HF_14ASNIFF HF_BOG HF_COLIN HF_ICECLASS
|
||||
ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES)),)
|
||||
|
|
|
@ -81,3 +81,7 @@ endif
|
|||
ifneq (,$(findstring WITH_STANDALONE_HF_CRAFTBYTE,$(APP_CFLAGS)))
|
||||
SRC_STANDALONE = hf_craftbyte.c
|
||||
endif
|
||||
# WITH_STANDALONE_HF_TMUDFORD
|
||||
ifneq (,$(findstring WITH_STANDALONE_HF_TMUDFORD,$(APP_CFLAGS)))
|
||||
SRC_STANDALONE = hf_tmudford.c
|
||||
endif
|
||||
|
|
83
armsrc/Standalone/hf_tmudford.c
Normal file
83
armsrc/Standalone/hf_tmudford.c
Normal file
|
@ -0,0 +1,83 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright 2021 Tim Mudford <tim.mudford1@gmail.com>
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// main code for hf_tmudford
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// `hf_tmudford` Continuously scans for ISO15693 card UID and then emulates it.
|
||||
//
|
||||
|
||||
#include "standalone.h"
|
||||
#include "proxmark3_arm.h"
|
||||
#include "appmain.h"
|
||||
#include "fpgaloader.h"
|
||||
#include "util.h"
|
||||
#include "dbprint.h"
|
||||
#include "ticks.h"
|
||||
|
||||
#include "iso15693.h"
|
||||
#include "iso15.h"
|
||||
|
||||
#define STATE_READ 0
|
||||
#define STATE_EMUL 1
|
||||
|
||||
void ModInfo(void) {
|
||||
DbpString("HF TMUDFORD mode - Scans and emulates ISO15693 UID (Tim Mudford)");
|
||||
}
|
||||
|
||||
void RunMod(void) {
|
||||
StandAloneMode();
|
||||
Dbprintf(_YELLOW_("HF TMUDFORD mode started"));
|
||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||
|
||||
for (;;) {
|
||||
WDT_HIT();
|
||||
if (data_available()) break;
|
||||
|
||||
SpinDelay(500);
|
||||
|
||||
// 0 = search, 1 = read, 2 = emul
|
||||
int state = STATE_READ;
|
||||
iso15_card_select_t card;
|
||||
|
||||
DbpString("Scanning...");
|
||||
int button_pressed = BUTTON_NO_CLICK;
|
||||
for (;;) {
|
||||
// Was our button held down or pressed?
|
||||
button_pressed = BUTTON_HELD(1000);
|
||||
|
||||
if (button_pressed != BUTTON_NO_CLICK || data_available())
|
||||
break;
|
||||
else if (state == STATE_READ) {
|
||||
Iso15693InitReader();
|
||||
ReaderIso15693(0, &card);
|
||||
|
||||
if (card.uidlen == 0) {
|
||||
LED_D_OFF();
|
||||
SpinDelay(500);
|
||||
continue;
|
||||
} else {
|
||||
Dbprintf("Found card with UID: ");
|
||||
Dbhexdump(card.uidlen, card.uid, 0);
|
||||
state = STATE_EMUL;
|
||||
}
|
||||
} else if (state == STATE_EMUL) {
|
||||
Iso15693InitTag();
|
||||
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state.");
|
||||
SimTagIso15693(card.uid);
|
||||
|
||||
state = STATE_READ;
|
||||
}
|
||||
}
|
||||
if (button_pressed == BUTTON_HOLD)
|
||||
break;
|
||||
}
|
||||
|
||||
Dbprintf("-=[ exit ]=-");
|
||||
LEDsoff();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue