feat(hf): rename mfc -> mf (MIFARE Classic), add mfu (Ultralight/NTAG)
hf.mfc renamed to hf.mf to match the C client's 'hf mf'. New hf.mfu (HFMFUCommands) provides rdbl/wrbl/dump over the dedicated CMD_HF_MIFAREU_READBL/WRITEBL using the firmware mful_readblock_t / mful_writeblock_t structs; a READ returns 4 pages (16 bytes) and the firmware replies them directly. keytype selects auth (0=none, 1=UL-C, 2=EV1/NTAG pwd, 3=UL-AES). Wire formats verified against firmware structs; needs a bench pass for the auth/write-length paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ from .hf import HFCommands
|
||||
from .hf_iso14a import HF14ACommands
|
||||
from .hf_iso15 import HF15Commands
|
||||
from .hf_mfc import HFMFCommands
|
||||
from .hf_mfu import HFMFUCommands
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -71,7 +72,8 @@ class Proxmark3:
|
||||
self.hf = HFCommands(self._transport)
|
||||
self.hf.iso14a = HF14ACommands(self._transport)
|
||||
self.hf.iso15 = HF15Commands(self._transport)
|
||||
self.hf.mfc = HFMFCommands(self._transport)
|
||||
self.hf.mf = HFMFCommands(self._transport)
|
||||
self.hf.mfu = HFMFUCommands(self._transport)
|
||||
self.firmware = FirmwareInfo()
|
||||
|
||||
async def connect(self) -> None:
|
||||
@@ -156,7 +158,8 @@ class _SyncProxy:
|
||||
def __getattr__(self, name):
|
||||
attr = getattr(self._target, name)
|
||||
if isinstance(attr, (HWCommands, LFCommands, HFCommands,
|
||||
HF14ACommands, HF15Commands, HFMFCommands)):
|
||||
HF14ACommands, HF15Commands, HFMFCommands,
|
||||
HFMFUCommands)):
|
||||
return _SyncProxy(attr, self._loop)
|
||||
# Sub-modules attached dynamically (e.g. hf.iso14a, hf.mfc)
|
||||
if hasattr(attr, '_t'):
|
||||
|
||||
Reference in New Issue
Block a user