Merge branch 'refactor/core-package' into master
Merges the package refactor (core/ sub-package, normalized naming, scaffolded sub-packages) while preserving all in-progress sniff infrastructure. Git rename detection carried WIP changes to new paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""pm3py - Python wire protocol library for Proxmark3."""
|
||||
from .client import Proxmark3
|
||||
from .transport import PM3Error, PM3Response
|
||||
from .protocol import PM3Status, Cmd
|
||||
from .core.client import Proxmark3
|
||||
from .core.transport import PM3Error, PM3Response
|
||||
from .core.protocol import PM3Status, Cmd
|
||||
|
||||
__all__ = ["Proxmark3", "PM3Error", "PM3Response", "PM3Status", "Cmd"]
|
||||
|
||||
10
pm3py/core/__init__.py
Normal file
10
pm3py/core/__init__.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""pm3py.core — Wire protocol, transport, and device commands."""
|
||||
from .client import Proxmark3, FirmwareInfo
|
||||
from .transport import PM3Transport, PM3Error, PM3Response
|
||||
from .protocol import PM3Status, Cmd
|
||||
|
||||
__all__ = [
|
||||
"Proxmark3", "FirmwareInfo",
|
||||
"PM3Transport", "PM3Error", "PM3Response",
|
||||
"PM3Status", "Cmd",
|
||||
]
|
||||
@@ -10,9 +10,9 @@ from .transport import PM3Transport, PM3Response, PM3Error, ProgressCallback
|
||||
from .hw import HWCommands
|
||||
from .lf import LFCommands
|
||||
from .hf import HFCommands
|
||||
from .hf_14a import HF14ACommands
|
||||
from .hf_15 import HF15Commands
|
||||
from .hf_mf import HFMFCommands
|
||||
from .hf_iso14a import HF14ACommands
|
||||
from .hf_iso15 import HF15Commands
|
||||
from .hf_mfc import HFMFCommands
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -68,9 +68,9 @@ class Proxmark3:
|
||||
self.hw = HWCommands(self._transport)
|
||||
self.lf = LFCommands(self._transport)
|
||||
self.hf = HFCommands(self._transport)
|
||||
self.hf.a14 = HF14ACommands(self._transport)
|
||||
self.hf.iso14a = HF14ACommands(self._transport)
|
||||
self.hf.iso15 = HF15Commands(self._transport)
|
||||
self.hf.mf = HFMFCommands(self._transport)
|
||||
self.hf.mfc = HFMFCommands(self._transport)
|
||||
self.firmware = FirmwareInfo()
|
||||
|
||||
async def connect(self) -> None:
|
||||
@@ -157,7 +157,7 @@ class _SyncProxy:
|
||||
if isinstance(attr, (HWCommands, LFCommands, HFCommands,
|
||||
HF14ACommands, HF15Commands, HFMFCommands)):
|
||||
return _SyncProxy(attr, self._loop)
|
||||
# Sub-modules attached dynamically (e.g. hf.a14, hf.mf)
|
||||
# Sub-modules attached dynamically (e.g. hf.iso14a, hf.mfc)
|
||||
if hasattr(attr, '_t'):
|
||||
return _SyncProxy(attr, self._loop)
|
||||
if callable(attr) and inspect.iscoroutinefunction(attr):
|
||||
@@ -11,9 +11,9 @@ class HFCommands:
|
||||
def __init__(self, transport: PM3Transport):
|
||||
self._t = transport
|
||||
# Sub-modules attached by client.py
|
||||
self.a14 = None # type: ignore
|
||||
self.iso14a = None # type: ignore
|
||||
self.iso15 = None # type: ignore
|
||||
self.mf = None # type: ignore
|
||||
self.mfc = None # type: ignore
|
||||
|
||||
async def tune(self, on_progress: ProgressCallback = None) -> dict:
|
||||
"""Measure HF antenna voltage."""
|
||||
@@ -38,9 +38,9 @@ class HFCommands:
|
||||
if asyncio.iscoroutine(ret):
|
||||
await ret
|
||||
|
||||
if self.a14:
|
||||
if self.iso14a:
|
||||
try:
|
||||
card = await self.a14.scan()
|
||||
card = await self.iso14a.scan()
|
||||
if card.get("uid"):
|
||||
results["iso14443a"] = card
|
||||
except PM3Error:
|
||||
1
pm3py/reader/__init__.py
Normal file
1
pm3py/reader/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""pm3py.reader — Higher-level reader modes composing core commands."""
|
||||
1
pm3py/reader/hf/__init__.py
Normal file
1
pm3py/reader/hf/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""HF reader modes organized by reader IC manufacturer."""
|
||||
1
pm3py/reader/hf/nxp/__init__.py
Normal file
1
pm3py/reader/hf/nxp/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""NXP reader ICs (CLRC663, PN5xx)."""
|
||||
1
pm3py/reader/hf/st/__init__.py
Normal file
1
pm3py/reader/hf/st/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""ST Microelectronics reader ICs."""
|
||||
1
pm3py/reader/lf/__init__.py
Normal file
1
pm3py/reader/lf/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""LF reader modes."""
|
||||
1
pm3py/reader/modes/__init__.py
Normal file
1
pm3py/reader/modes/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Reader workflow modes — inventory, programming, access control."""
|
||||
1
pm3py/sim/__init__.py
Normal file
1
pm3py/sim/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""pm3py.sim — Card simulation sessions, table compiler, relay."""
|
||||
1
pm3py/sniff/__init__.py
Normal file
1
pm3py/sniff/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""pm3py.sniff — Sniff sessions, trace parsing, protocol decoders, formatting."""
|
||||
1
pm3py/transponders/__init__.py
Normal file
1
pm3py/transponders/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""pm3py.transponders — Tag/transponder models independent of hardware."""
|
||||
1
pm3py/transponders/hf/__init__.py
Normal file
1
pm3py/transponders/hf/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""HF transponder models organized by ISO standard, then manufacturer."""
|
||||
1
pm3py/transponders/hf/iso14443a3/__init__.py
Normal file
1
pm3py/transponders/hf/iso14443a3/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""ISO 14443-A Layer 3 transponders (MIFARE Classic, Ultralight, NTAG)."""
|
||||
1
pm3py/transponders/hf/iso14443a3/nxp/__init__.py
Normal file
1
pm3py/transponders/hf/iso14443a3/nxp/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""NXP ISO 14443-A Layer 3 transponders."""
|
||||
1
pm3py/transponders/hf/iso14443a4/__init__.py
Normal file
1
pm3py/transponders/hf/iso14443a4/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""ISO 14443-A Layer 4 (ISO-DEP) transponders (DESFire, NTAG 5 via -4)."""
|
||||
1
pm3py/transponders/hf/iso14443a4/nxp/__init__.py
Normal file
1
pm3py/transponders/hf/iso14443a4/nxp/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""NXP ISO 14443-A Layer 4 transponders."""
|
||||
1
pm3py/transponders/hf/iso15693/__init__.py
Normal file
1
pm3py/transponders/hf/iso15693/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""ISO 15693 transponder models and NFC Forum Type 5 NDEF."""
|
||||
1
pm3py/transponders/hf/iso15693/nxp/__init__.py
Normal file
1
pm3py/transponders/hf/iso15693/nxp/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""NXP ICODE / NTAG 5 ISO 15693 transponders."""
|
||||
1
pm3py/transponders/hf/iso15693/st/__init__.py
Normal file
1
pm3py/transponders/hf/iso15693/st/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""ST Microelectronics ISO 15693 transponders."""
|
||||
1
pm3py/transponders/lf/__init__.py
Normal file
1
pm3py/transponders/lf/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""LF transponder models organized by manufacturer."""
|
||||
1
pm3py/transponders/lf/atmel/__init__.py
Normal file
1
pm3py/transponders/lf/atmel/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Atmel/Microchip LF transponders (T55xx)."""
|
||||
1
pm3py/transponders/lf/em/__init__.py
Normal file
1
pm3py/transponders/lf/em/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""EM Microelectronic LF transponders (EM4100, EM4x05)."""
|
||||
Reference in New Issue
Block a user