mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Consider different behavior of some Gen4 cards. Should fix #1822
This commit is contained in:
parent
4e24d463e7
commit
2f4167ee74
3 changed files with 5 additions and 5 deletions
|
@ -2391,11 +2391,11 @@ void MifareCIdent(bool is_mfc) {
|
||||||
if (res == 2) {
|
if (res == 2) {
|
||||||
|
|
||||||
// Check for Magic Gen4 GTU with default password :
|
// Check for Magic Gen4 GTU with default password :
|
||||||
// Get config should return 30 bytes.
|
// Get config should return 30 or 32 bytes
|
||||||
AddCrc14A(gen4GetConf, sizeof(gen4GetConf) - 2);
|
AddCrc14A(gen4GetConf, sizeof(gen4GetConf) - 2);
|
||||||
ReaderTransmit(gen4GetConf, sizeof(gen4GetConf), NULL);
|
ReaderTransmit(gen4GetConf, sizeof(gen4GetConf), NULL);
|
||||||
res = ReaderReceive(buf, par);
|
res = ReaderReceive(buf, par);
|
||||||
if (res == 32) {
|
if (res == 32 || res == 34) {
|
||||||
isGen = MAGIC_GEN_4GTU;
|
isGen = MAGIC_GEN_4GTU;
|
||||||
goto OUT;
|
goto OUT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ local function read_config()
|
||||||
atqaf = atqa1..' '..atqa2
|
atqaf = atqa1..' '..atqa2
|
||||||
cardtype, cardprotocol, gtustr, atsstr = 'unknown', 'unknown', 'unknown', 'unknown'
|
cardtype, cardprotocol, gtustr, atsstr = 'unknown', 'unknown', 'unknown', 'unknown'
|
||||||
if magicconfig == nil then lib14a.disconnect(); return nil, "can't read configuration, "..err_lock end
|
if magicconfig == nil then lib14a.disconnect(); return nil, "can't read configuration, "..err_lock end
|
||||||
if #magicconfig ~= 64 then lib14a.disconnect(); return nil, "partial read of configuration, "..err_lock end
|
if #magicconfig ~= 64 and #magicconfig ~= 68 then lib14a.disconnect(); return nil, "partial read of configuration, "..err_lock end
|
||||||
if gtumode == '00' then gtustr = 'Pre-write/Shadow Mode'
|
if gtumode == '00' then gtustr = 'Pre-write/Shadow Mode'
|
||||||
elseif gtumode == '01' then gtustr = 'Restore Mode'
|
elseif gtumode == '01' then gtustr = 'Restore Mode'
|
||||||
elseif gtumode == '02' then gtustr = 'Disabled'
|
elseif gtumode == '02' then gtustr = 'Disabled'
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ The card will be identified only if the password is the default one. One can ide
|
||||||
```
|
```
|
||||||
hf 14a raw -s -c -t 1000 CF00000000C6
|
hf 14a raw -s -c -t 1000 CF00000000C6
|
||||||
```
|
```
|
||||||
If the card is an Ultimate Magic Card, it returns 30 bytes.
|
If the card is an Ultimate Magic Card, it returns 30 or 32 bytes.
|
||||||
### Magic commands
|
### Magic commands
|
||||||
^[Top](#top) ^^[Gen4](#g4top)
|
^[Top](#top) ^^[Gen4](#g4top)
|
||||||
|
|
||||||
|
@ -1133,7 +1133,7 @@ hf 14a raw -s -c -t 1000 CF00000000CE02
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
👉 **TODO** In Mifare Ultralight / NTAG mode, the special writes (option -s, -e, -r) do not apply. Use `script run hf_mf_ultimatecard` for UID and signature, and `hf mfu wrbl` for PWD and PACK.
|
👉 **TODO** In Mifare Ultralight / NTAG mode, the special writes (`hf mfu restore` option `-s`, `-e`, `-r`) do not apply. Use `script run hf_mf_ultimatecard` for UID and signature, and `hf mfu wrbl` for PWD and PACK.
|
||||||
|
|
||||||
### Change ATQA / SAK
|
### Change ATQA / SAK
|
||||||
^[Top](#top) ^^[Gen4](#g4top)
|
^[Top](#top) ^^[Gen4](#g4top)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue