mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
ADD: some felica defines
This commit is contained in:
parent
19c2e89ba6
commit
9757a8f078
2 changed files with 16 additions and 7 deletions
|
@ -13,10 +13,11 @@ static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
int usage_hf_felica_sim(void) {
|
int usage_hf_felica_sim(void) {
|
||||||
PrintAndLog("\n Emulating ISO/18092 FeliCa tag \n");
|
PrintAndLog("\n Emulating ISO/18092 FeliCa tag \n");
|
||||||
PrintAndLog("usage: hf 14a sim [h] t <type> u <uid> [v]");
|
PrintAndLog("usage: hf felica sim [h] t <type> u <uid> [v]");
|
||||||
PrintAndLog("options: ");
|
PrintAndLog("options: ");
|
||||||
PrintAndLog(" h : This help");
|
PrintAndLog(" h : This help");
|
||||||
PrintAndLog(" t : 1 = MIFARE Classic 1k");
|
PrintAndLog(" t : 1 = FeliCa");
|
||||||
|
PrintAndLog(" : 2 = FeliCaS");
|
||||||
PrintAndLog(" v : (Optional) Verbose");
|
PrintAndLog(" v : (Optional) Verbose");
|
||||||
PrintAndLog("samples:");
|
PrintAndLog("samples:");
|
||||||
PrintAndLog(" hf felica sim t 1 u 11223344556677");
|
PrintAndLog(" hf felica sim t 1 u 11223344556677");
|
||||||
|
@ -24,7 +25,7 @@ int usage_hf_felica_sim(void) {
|
||||||
}
|
}
|
||||||
int usage_hf_felica_sniff(void){
|
int usage_hf_felica_sniff(void){
|
||||||
PrintAndLog("It get data from the field and saves it into command buffer.");
|
PrintAndLog("It get data from the field and saves it into command buffer.");
|
||||||
PrintAndLog("Buffer accessible from command 'hf list 14a'");
|
PrintAndLog("Buffer accessible from command 'hf list felica'");
|
||||||
PrintAndLog("Usage: hf felica sniff [c][r]");
|
PrintAndLog("Usage: hf felica sniff [c][r]");
|
||||||
PrintAndLog("c - triggered by first data from card");
|
PrintAndLog("c - triggered by first data from card");
|
||||||
PrintAndLog("r - triggered by first 7-bit request from reader (REQ,WUP,...)");
|
PrintAndLog("r - triggered by first 7-bit request from reader (REQ,WUP,...)");
|
||||||
|
@ -143,7 +144,7 @@ int CmdHFFelicaSim(const char *Cmd) {
|
||||||
//Validations
|
//Validations
|
||||||
if (errors || cmdp == 0) return usage_hf_felica_sim();
|
if (errors || cmdp == 0) return usage_hf_felica_sim();
|
||||||
|
|
||||||
UsbCommand c = {CMD_SIMULATE_TAG_ISO_14443a,{ tagtype, flags, 0 }};
|
UsbCommand c = {CMD_FELICA_SIMULATE_TAG,{ tagtype, flags, 0 }};
|
||||||
memcpy(c.d.asBytes, uid, uidlen>>1);
|
memcpy(c.d.asBytes, uid, uidlen>>1);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
|
@ -168,14 +169,14 @@ int CmdHFFelicaSniff(const char *Cmd) {
|
||||||
if (ctmp == 'r' || ctmp == 'R') param |= 0x02;
|
if (ctmp == 'r' || ctmp == 'R') param |= 0x02;
|
||||||
}
|
}
|
||||||
|
|
||||||
UsbCommand c = {CMD_SNOOP_ISO_14443a, {param, 0, 0}};
|
UsbCommand c = {CMD_FELICA_SNOOP, {param, 0, 0}};
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHFFelicaCmdRaw(const char *cmd) {
|
int CmdHFFelicaCmdRaw(const char *cmd) {
|
||||||
UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}};
|
UsbCommand c = {CMD_FELICA_COMMAND, {0, 0, 0}};
|
||||||
bool reply = 1;
|
bool reply = 1;
|
||||||
bool crc = false;
|
bool crc = false;
|
||||||
bool power = false;
|
bool power = false;
|
||||||
|
@ -190,7 +191,7 @@ int CmdHFFelicaCmdRaw(const char *cmd) {
|
||||||
uint16_t datalen = 0;
|
uint16_t datalen = 0;
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
|
|
||||||
if (strlen(cmd) < 2) return usage_hf_14a_raw();
|
if (strlen(cmd) < 2) return usage_hf_felica_raw();
|
||||||
|
|
||||||
// strip
|
// strip
|
||||||
while (*cmd==' ' || *cmd=='\t') cmd++;
|
while (*cmd==' ' || *cmd=='\t') cmd++;
|
||||||
|
|
|
@ -137,9 +137,12 @@ typedef struct{
|
||||||
|
|
||||||
#define CMD_SIMULATE_TAG_ISO_14443B 0x0381
|
#define CMD_SIMULATE_TAG_ISO_14443B 0x0381
|
||||||
#define CMD_SNOOP_ISO_14443B 0x0382
|
#define CMD_SNOOP_ISO_14443B 0x0382
|
||||||
|
|
||||||
#define CMD_SNOOP_ISO_14443a 0x0383
|
#define CMD_SNOOP_ISO_14443a 0x0383
|
||||||
#define CMD_SIMULATE_TAG_ISO_14443a 0x0384
|
#define CMD_SIMULATE_TAG_ISO_14443a 0x0384
|
||||||
|
|
||||||
#define CMD_READER_ISO_14443a 0x0385
|
#define CMD_READER_ISO_14443a 0x0385
|
||||||
|
|
||||||
#define CMD_RAW_WRITER_LEGIC_RF 0x0386
|
#define CMD_RAW_WRITER_LEGIC_RF 0x0386
|
||||||
#define CMD_SIMULATE_TAG_LEGIC_RF 0x0387
|
#define CMD_SIMULATE_TAG_LEGIC_RF 0x0387
|
||||||
#define CMD_READER_LEGIC_RF 0x0388
|
#define CMD_READER_LEGIC_RF 0x0388
|
||||||
|
@ -164,6 +167,11 @@ typedef struct{
|
||||||
#define CMD_ICLASS_EML_MEMSET 0x0398
|
#define CMD_ICLASS_EML_MEMSET 0x0398
|
||||||
#define CMD_ICLASS_AUTHENTICATION 0x0399
|
#define CMD_ICLASS_AUTHENTICATION 0x0399
|
||||||
|
|
||||||
|
// For ISO1092 / FeliCa
|
||||||
|
#define CMD_FELICA_SIMULATE_TAG 0x03A0
|
||||||
|
#define CMD_FELICA_SNOOP 0x03A1
|
||||||
|
#define CMD_FELICA_COMMAND 0x03A2
|
||||||
|
|
||||||
// For measurements of the antenna tuning
|
// For measurements of the antenna tuning
|
||||||
#define CMD_MEASURE_ANTENNA_TUNING 0x0400
|
#define CMD_MEASURE_ANTENNA_TUNING 0x0400
|
||||||
#define CMD_MEASURE_ANTENNA_TUNING_HF 0x0401
|
#define CMD_MEASURE_ANTENNA_TUNING_HF 0x0401
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue