From 6da950eaaf6f794dbfdb568dbf30d0b024043acd Mon Sep 17 00:00:00 2001 From: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:04:16 +0300 Subject: [PATCH] Print new magic tag values Rename tags. Tell apart UMC 03a0 (old) and 06a0 (new). Add new tags (TID, SID, furui supercard) No longer call QL88 magic. There are ripoff EV1s in China which go by the name of "SAK88-IC". Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> --- client/src/mifare/mifarehost.c | 47 ++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 13d925fddf5..8caf4437e69 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1361,37 +1361,50 @@ int detect_mf_magic(bool is_mfc) { switch (isGeneration) { case MAGIC_GEN_1A: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 1a")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Gen 1a")); break; case MAGIC_GEN_1B: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 1b")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Gen 1b")); break; case MAGIC_GEN_2: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 2 / CUID")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Gen 2 / CUID")); break; case MAGIC_GEN_3: - PrintAndLogEx(SUCCESS, "Magic capabilities : possibly " _GREEN_("Gen 3 / APDU")); + PrintAndLogEx(SUCCESS, "Magic capabilities: possibly " _GREEN_("Gen 3 / APDU")); break; - case MAGIC_GEN_4GTU: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 4 GTU")); + case MAGIC_GEN_4UMC3: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Ultimate Magic (old)")); break; - case MAGIC_GEN_4GDM: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 4 GDM")); + case MAGIC_GEN_4UMC6: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Ultimate Magic (new)")); + break; + case MAGIC_GEN_4USC: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("USCUID")); break; case MAGIC_GEN_UNFUSED: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Write Once / FUID")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Write Once / FUID")); break; case MAGIC_SUPER_GEN1: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Super card (") _CYAN_("Gen 1") _GREEN_(")")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Super card (") _CYAN_("Gen 1") _GREEN_(")")); break; case MAGIC_SUPER_GEN2: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Super card (") _CYAN_("Gen 2") _GREEN_(")")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Super card (") _CYAN_("Gen 2") _GREEN_(")")); + break; + case MAGIC_SUPER_FURUI: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("Super card (") _CYAN_("Furui") _GREEN_(")")); break; case MAGIC_NTAG21X: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("NTAG21x")); + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("NTAG21x")); break; case MAGIC_QL88: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("QL88")); + PrintAndLogEx(SUCCESS, "Potentially " _GREEN_("SAK88-IC")); + break; + case MAGIC_TID: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("TID")); + break; + case MAGIC_SID: + PrintAndLogEx(SUCCESS, "Magic capabilities: " _GREEN_("SID")); + break; default: break; } @@ -1558,10 +1571,10 @@ int vigik_verify(mfc_vigik_t *d) { /* if v is even and - ⎯ if J* mod 8 = 1, then f* = n–J*. - ⎯ if J* mod 8 = 4, then f* = J*, - ⎯ if J* mod 8 = 6, then f* = 2J*, - ⎯ if J* mod 8 = 7, then f* = 2(n–J*), + вЋЇ if J* mod 8 = 1, then f* = n–J*. + вЋЇ if J* mod 8 = 4, then f* = J*, + вЋЇ if J* mod 8 = 6, then f* = 2J*, + вЋЇ if J* mod 8 = 7, then f* = 2(n–J*), */ uint8_t b2 = mbedtls_mpi_get_bit(&sqr, 2); uint8_t b1 = mbedtls_mpi_get_bit(&sqr, 1);