RfidResearchGroup / ChameleonUltra

The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.
https://chameleonultra.com
GNU General Public License v3.0
922 stars 153 forks source link

Fix slot delete #76

Closed Foxushka closed 1 year ago

github-actions[bot] commented 1 year ago

You are welcome to add an entry to the CHANGELOG.md as well

doegox commented 1 year ago

can you show how the current main branch fails ? when I try it seems to work fine:

[USB] chameleon --> hw slot list
 - Slot 1 data:
   HF: Empty - Mifare Classic 1k
   LF: hello - EM410X
[USB] chameleon --> hw slot delete -h
  -st number, --sense_type number
                        1 = LF, 2 = HF,
[USB] chameleon --> hw slot delete -s 1 -st 2
[USB] chameleon --> hw slot list
 - Slot 1 data:
   HF: Empty - Unknown
   LF: hello - EM410X
Foxushka commented 1 year ago

Now try to delete LF dump, it won't allow you

doegox commented 1 year ago

yes you can't delete the last sensetype, delete works only when both sensetypes are available.

[USB] chameleon --> hw slot list
 - Slot 1 data:
   HF: Empty - Mifare Classic 1k
   LF: hello - EM410X
[USB] chameleon --> hw slot delete -s 1 -st 1
[USB] chameleon --> hw slot list
 - Slot 1 data:
   HF: Empty - Mifare Classic 1k
   LF: hello - Unknown
doegox commented 1 year ago

[USB] chameleon --> hw slot delete -h Delete sense type data for a specific slot. The slot needs to have the other sense type correctly configured, otherwise an error will be thrown.

Foxushka commented 1 year ago

I don't see any point of this restriction. How we can clean whole slot without factory reset?

doegox commented 1 year ago

No idea, feel free to change it, but your fix doesn't seem adequate, it's not about HF/LF inversion.

doegox commented 1 year ago

pinging @augustozanellato who made delete