X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/823ad2e186601e91359de071ac303d3464ba39d1..a0a61c91ccefed75187e810cca0e3bcb319ecdcf:/client/cmdhf14a.c diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index fe308746..abb786f4 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -64,7 +64,7 @@ const manufactureName manufactureMapping[] = { { 0x17, "KSW Microtec GmbH Germany" }, { 0x18, "ZMD AG Germany" }, { 0x19, "XICOR, Inc. USA" }, - { 0x1A, "Sony Corporation Japan Identifier Company Country" }, + { 0x1A, "Sony Corporation Japan" }, { 0x1B, "Malaysia Microelectronic Solutions Sdn. Bhd Malaysia" }, { 0x1C, "Emosyn USA" }, { 0x1D, "Shanghai Fudan Microelectronics Co. Ltd. P.R. China" }, @@ -94,7 +94,7 @@ const manufactureName manufactureMapping[] = { { 0x35, "Fraunhofer Institute for Photonic Microsystems Germany" }, { 0x36, "IDS Microchip AG Switzerland" }, { 0x37, "Kovio USA" }, - { 0x38, "HMT Microelectronic Ltd Switzerland Identifier Company Country" }, + { 0x38, "HMT Microelectronic Ltd Switzerland" }, { 0x39, "Silicon Craft Technology Thailand" }, { 0x3A, "Advanced Film Device Inc. Japan" }, { 0x3B, "Nitecrest Ltd UK" }, @@ -106,7 +106,7 @@ const manufactureName manufactureMapping[] = { { 0x41, "Renesas Electronics Corporation Japan" }, { 0x42, "3Alogics Inc Korea" }, { 0x43, "Top TroniQ Asia Limited Hong Kong" }, - { 0x44, "Gentag Inc (USA) USA" }, + { 0x44, "Gentag Inc. USA" }, { 0x00, "no tag-info available" } // must be the last entry }; @@ -143,6 +143,7 @@ int usage_hf_14a_sim(void) { // PrintAndLog(" u : 4, 7 or 10 byte UID"); PrintAndLog(" u : 4, 7 byte UID"); PrintAndLog(" x : (Optional) performs the 'reader attack', nr/ar attack against a legitimate reader"); + PrintAndLog(" v : (Optional) show maths used for cracking reader. Useful for debugging."); PrintAndLog("\n sample : hf 14a sim t 1 u 11223344 x"); PrintAndLog(" : hf 14a sim t 1 u 11223344"); PrintAndLog(" : hf 14a sim t 1 u 11223344556677"); @@ -184,7 +185,7 @@ int CmdHF14AReader(const char *Cmd) { clearCommandBuffer(); SendCommand(&c); UsbCommand resp; - WaitForResponse(CMD_ACK,&resp); + WaitForResponse(CMD_ACK, &resp); iso14a_card_select_t card; memcpy(&card, (iso14a_card_select_t *)resp.d.asBytes, sizeof(iso14a_card_select_t)); @@ -447,6 +448,7 @@ int CmdHF14ASim(const char *Cmd) { uint8_t uid[10] = {0,0,0,0,0,0,0,0,0,0}; int uidlen = 0; bool useUIDfromEML = TRUE; + bool verbose = false; while(param_getchar(Cmd, cmdp) != 0x00) { switch(param_getchar(Cmd, cmdp)) { @@ -477,6 +479,11 @@ int CmdHF14ASim(const char *Cmd) { } cmdp += 2; break; + case 'v': + case 'V': + verbose = true; + cmdp++; + break; case 'x': case 'X': flags |= FLAG_NR_AR_ATTACK; @@ -513,7 +520,7 @@ int CmdHF14ASim(const char *Cmd) { if ( (resp.arg[0] & 0xffff) != CMD_SIMULATE_MIFARE_CARD ) break; memcpy( data, resp.d.asBytes, sizeof(data) ); - readerAttack(data, TRUE); + readerAttack(data, TRUE, verbose); } return 0; } @@ -655,14 +662,17 @@ int CmdHF14ACmdRaw(const char *cmd) { c.arg[2] = 13560000 / 1000 / (8*16) * timeout; // timeout in ETUs (time to transfer 1 bit, approx. 9.4 us) } - if(power) + if(power) { c.arg[0] |= ISO14A_NO_DISCONNECT; - - if(datalen>0) + } + + if(datalen>0) { c.arg[0] |= ISO14A_RAW; - - if(topazmode) + } + + if(topazmode) { c.arg[0] |= ISO14A_TOPAZMODE; + } // Max buffer is USB_CMD_DATA_SIZE datalen = (datalen > USB_CMD_DATA_SIZE) ? USB_CMD_DATA_SIZE : datalen;