pyxcp 0.22.34__cp311-cp311-macosx_11_0_arm64.whl → 0.22.35__cp311-cp311-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyxcp might be problematic. Click here for more details.
- pyxcp/__init__.py +1 -1
- pyxcp/config/__init__.py +1 -0
- pyxcp/dllif.py +9 -4
- pyxcp/examples/xcphello.py +9 -10
- pyxcp/master/master.py +1 -0
- pyxcp/utils.py +3 -2
- {pyxcp-0.22.34.dist-info → pyxcp-0.22.35.dist-info}/METADATA +1 -1
- {pyxcp-0.22.34.dist-info → pyxcp-0.22.35.dist-info}/RECORD +11 -11
- {pyxcp-0.22.34.dist-info → pyxcp-0.22.35.dist-info}/LICENSE +0 -0
- {pyxcp-0.22.34.dist-info → pyxcp-0.22.35.dist-info}/WHEEL +0 -0
- {pyxcp-0.22.34.dist-info → pyxcp-0.22.35.dist-info}/entry_points.txt +0 -0
pyxcp/__init__.py
CHANGED
pyxcp/config/__init__.py
CHANGED
|
@@ -829,6 +829,7 @@ class General(Configurable):
|
|
|
829
829
|
)
|
|
830
830
|
seed_n_key_dll = Unicode("", allow_none=False, help="Dynamic library used for slave resource unlocking.").tag(config=True)
|
|
831
831
|
seed_n_key_dll_same_bit_width = Bool(False, help="").tag(config=True)
|
|
832
|
+
custom_dll_loader = Unicode(allow_none=True, default_value=None, help="Use an custom seed and key DLL loader.").tag(config=True)
|
|
832
833
|
seed_n_key_function = Callable(
|
|
833
834
|
default_value=None,
|
|
834
835
|
allow_none=True,
|
pyxcp/dllif.py
CHANGED
|
@@ -36,9 +36,14 @@ else:
|
|
|
36
36
|
raise RuntimeError(f"Platform {sys.platform!r} currently not supported.")
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def getKey(logger, dllName: str, privilege: int, seed: bytes, assume_same_bit_width: bool):
|
|
39
|
+
def getKey(logger, loader_cfg: str, dllName: str, privilege: int, seed: bytes, assume_same_bit_width: bool):
|
|
40
40
|
dllName = str(Path(dllName).absolute()) # Fix loader issues.
|
|
41
41
|
|
|
42
|
+
if loader_cfg is not None:
|
|
43
|
+
loader_exe = loader_cfg
|
|
44
|
+
else:
|
|
45
|
+
loader_exe = LOADER
|
|
46
|
+
|
|
42
47
|
use_ctypes: bool = False
|
|
43
48
|
if assume_same_bit_width:
|
|
44
49
|
use_ctypes = True
|
|
@@ -70,15 +75,15 @@ def getKey(logger, dllName: str, privilege: int, seed: bytes, assume_same_bit_wi
|
|
|
70
75
|
else:
|
|
71
76
|
try:
|
|
72
77
|
p0 = subprocess.Popen(
|
|
73
|
-
[
|
|
78
|
+
[loader_exe, dllName, str(privilege), binascii.hexlify(seed).decode("ascii")],
|
|
74
79
|
stdout=subprocess.PIPE,
|
|
75
80
|
shell=False,
|
|
76
81
|
) # nosec
|
|
77
82
|
except FileNotFoundError as exc:
|
|
78
|
-
logger.error(f"Could not find executable {
|
|
83
|
+
logger.error(f"Could not find executable {loader_exe!r} -- {exc}")
|
|
79
84
|
return (SeedNKeyResult.ERR_COULD_NOT_LOAD_DLL, None)
|
|
80
85
|
except OSError as exc:
|
|
81
|
-
logger.error(f"Cannot execute {
|
|
86
|
+
logger.error(f"Cannot execute {loader_exe!r} -- {exc}")
|
|
82
87
|
return (SeedNKeyResult.ERR_COULD_NOT_LOAD_DLL, None)
|
|
83
88
|
key: bytes = b""
|
|
84
89
|
if p0.stdout:
|
pyxcp/examples/xcphello.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
|
-
"""Very basic hello-world example.
|
|
3
|
-
"""
|
|
2
|
+
"""Very basic hello-world example."""
|
|
4
3
|
from pprint import pprint
|
|
5
4
|
|
|
6
5
|
from pyxcp.cmdline import ArgumentParser
|
|
@@ -17,14 +16,14 @@ def callout(master, args):
|
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
ap = ArgumentParser(description="pyXCP hello world.", callout=callout)
|
|
20
|
-
ap.parser.add_argument(
|
|
21
|
-
"-d",
|
|
22
|
-
"--daq-info",
|
|
23
|
-
dest="daq_info",
|
|
24
|
-
help="Display DAQ-info",
|
|
25
|
-
default=False,
|
|
26
|
-
action="store_true",
|
|
27
|
-
)
|
|
19
|
+
# ap.parser.add_argument(
|
|
20
|
+
# "-d",
|
|
21
|
+
# "--daq-info",
|
|
22
|
+
# dest="daq_info",
|
|
23
|
+
# help="Display DAQ-info",
|
|
24
|
+
# default=False,
|
|
25
|
+
# action="store_true",
|
|
26
|
+
# )
|
|
28
27
|
|
|
29
28
|
with ap.run() as x:
|
|
30
29
|
x.connect()
|
pyxcp/master/master.py
CHANGED
pyxcp/utils.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
import datetime
|
|
3
|
-
from enum import IntEnum
|
|
4
3
|
import functools
|
|
5
4
|
import operator
|
|
6
5
|
import sys
|
|
7
6
|
from binascii import hexlify
|
|
7
|
+
from enum import IntEnum
|
|
8
8
|
from time import perf_counter, sleep
|
|
9
|
+
from typing import Any, List, Optional, Union
|
|
9
10
|
|
|
10
11
|
import chardet
|
|
11
12
|
import pytz
|
|
@@ -13,7 +14,7 @@ import pytz
|
|
|
13
14
|
from pyxcp.cpp_ext.cpp_ext import TimestampInfo
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
def hexDump(arr):
|
|
17
|
+
def hexDump(arr: Union[bytes | bytearray]):
|
|
17
18
|
if isinstance(arr, (bytes, bytearray)):
|
|
18
19
|
size = len(arr)
|
|
19
20
|
try:
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
pyxcp-0.22.
|
|
2
|
-
pyxcp-0.22.
|
|
3
|
-
pyxcp-0.22.
|
|
4
|
-
pyxcp-0.22.
|
|
5
|
-
pyxcp-0.22.
|
|
6
|
-
pyxcp/dllif.py,sha256=
|
|
1
|
+
pyxcp-0.22.35.dist-info/RECORD,,
|
|
2
|
+
pyxcp-0.22.35.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
3
|
+
pyxcp-0.22.35.dist-info/WHEEL,sha256=X6-NY9fCWtbM4tHMrme4ihtrUdAQgjDgPOLr1IYsKV8,134
|
|
4
|
+
pyxcp-0.22.35.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
|
|
5
|
+
pyxcp-0.22.35.dist-info/METADATA,sha256=1FG4ObUxb7QK7YO8yFEUJioWfGLPbX0gDB5apo2Hz3Q,4085
|
|
6
|
+
pyxcp/dllif.py,sha256=m4e-_dgDLCD6COU5W2LdeYUlib_Xxyxbh977bbS-VAU,3344
|
|
7
7
|
pyxcp/checksum.py,sha256=aveS0z4vthLXABEFhTqELqFNi7LM6ZzDzq7dD5Xe9oo,11167
|
|
8
8
|
pyxcp/asamkeydll.sh,sha256=iema12sub6qNE0xAuzwGtx0FmkdaaOKoXalhrtWVaa8,57
|
|
9
9
|
pyxcp/asamkeydll.c,sha256=l5RHYcEPY_Q07G-W5IjCq0xci8YfUR-3uYt84OOkOJI,2836
|
|
10
10
|
pyxcp/constants.py,sha256=Yemk_Gi_m78EEU0v-sdGCAodb9dv_vqP969IU3izA2M,1113
|
|
11
11
|
pyxcp/cmdline.py,sha256=lNg_wedKShu_37RhuTIGlINGLSMrg6UqJmYpqQnJbQI,1477
|
|
12
|
-
pyxcp/__init__.py,sha256=
|
|
12
|
+
pyxcp/__init__.py,sha256=Syqs7GgVi938EmpSl12H_YqMJl5dUAfsPZfuDDc-HtE,528
|
|
13
13
|
pyxcp/types.py,sha256=XJxJUh9bK5Urfia8IHVLJ-NFgQACYBd_n73L-AaeZts,25158
|
|
14
14
|
pyxcp/timing.py,sha256=hzeQZ3P7ij_bfskoVMi10Iv5S4i_6TQYfnB8PXTX6c4,1645
|
|
15
|
-
pyxcp/utils.py,sha256=
|
|
15
|
+
pyxcp/utils.py,sha256=Ax3TNT4OotRdJs_MVz83i7gTinpbOWwPnNVIL9WYTW4,3402
|
|
16
16
|
pyxcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
pyxcp/errormatrix.py,sha256=cYcsJ11Qm39DPuaR4BJ9fMpS3Hkphd_ezIQOKjI-pQE,44586
|
|
18
18
|
pyxcp/asam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -36,7 +36,7 @@ pyxcp/transport/usb_transport.py,sha256=27c19S67BMq1Eup6ViX-SiYpEq93bMTwe031RsE4
|
|
|
36
36
|
pyxcp/transport/can.py,sha256=bzKV9Lh5suKdZ5dm3ZEz1osOqkRZNlxrVAW7vr38JSM,14485
|
|
37
37
|
pyxcp/transport/base.py,sha256=i9VdWqGNqx5LMdFkD8SmmMQSRoDDXAjMRS3p6KD1A8E,15912
|
|
38
38
|
pyxcp/config/legacy.py,sha256=Uhu_6bp_W8yGmZ2s3TFzf8-5mGwLdeTss56BMYWpsZY,5100
|
|
39
|
-
pyxcp/config/__init__.py,sha256=
|
|
39
|
+
pyxcp/config/__init__.py,sha256=vIYPtzzNI4kUmevpOsSFgbfuBXPq7e2bhIIwWcqPcqQ,41835
|
|
40
40
|
pyxcp/tests/test_utils.py,sha256=gqv3bhhWfKKdKDkqnELqsOHCfpRRZwlReEy87Ya4Z2w,850
|
|
41
41
|
pyxcp/tests/test_master.py,sha256=a_Q8Fa49y_3vnrp-VFZ-22cHWjq58RC2daF6EcfbhZc,69434
|
|
42
42
|
pyxcp/tests/test_daq.py,sha256=mThMsweEwxzIFRQQ88BNz_60OQ-xmC5OamIxHx9VWis,5358
|
|
@@ -61,7 +61,7 @@ pyxcp/aml/XCPonUSB.aml,sha256=rPGduH-PE8-tBeELSm3vfkbf62uhlVP6gvJL0OvMclc,4847
|
|
|
61
61
|
pyxcp/aml/ifdata_SxI.a2l,sha256=8rAB6HTTAuNlFSrkFpR7fUA702yN4rTTNkw-xspZNV0,303
|
|
62
62
|
pyxcp/aml/XCPonFlx.aml,sha256=z58FMu6ZF4hVun8WBCuxvDrq6FZ_gj3tZM15G7E8Uvw,4647
|
|
63
63
|
pyxcp/master/__init__.py,sha256=o3XB9GDwLiqh-KRFC9YTOd0EvxJXDpyrcVxebiwT934,309
|
|
64
|
-
pyxcp/master/master.py,sha256=
|
|
64
|
+
pyxcp/master/master.py,sha256=RHw-1OT_dxsAeyChqnimqNRWEDKGP__Mw822D-7lKsY,76388
|
|
65
65
|
pyxcp/master/errorhandler.py,sha256=C3T0nvn3L5QCE1AD-7dJp-D16YxfcS2OZOb9SwXySuM,14917
|
|
66
66
|
pyxcp/examples/xcp_read_benchmark.py,sha256=Hl0hrjV3FE-ivswvYOh0MsKiHnk03z7w8lQDYnvfeM8,918
|
|
67
67
|
pyxcp/examples/conf_eth.toml,sha256=b6bKN-K07gMQHNj7yiyB-HKrkVtZREgPXS4ByQueBs4,190
|
|
@@ -73,7 +73,7 @@ pyxcp/examples/conf_can_user.toml,sha256=BqCID-GvaNbA6pbqRbyRMuzKAsJaYVube0ql4Cv
|
|
|
73
73
|
pyxcp/examples/xcp_user_supplied_driver.py,sha256=TD8Ggzdb2T9o6Z-VMvuJMREMpzufI5u27ThaadCxhDg,1024
|
|
74
74
|
pyxcp/examples/xcp_skel.py,sha256=F2g2C79jiYZl0cpRHfzWusfn1ZvodOS_r1Az6aknZL4,1110
|
|
75
75
|
pyxcp/examples/xcp_unlock.py,sha256=vl2Zv7Z6EuBxI2ZxbGQK6-0tZBVqd72FZllsvIfuJ5w,652
|
|
76
|
-
pyxcp/examples/xcphello.py,sha256=
|
|
76
|
+
pyxcp/examples/xcphello.py,sha256=yB1YEpxCLuCnjvN5pjZbB3obfSMEEdtfrER57KQ8KE4,2560
|
|
77
77
|
pyxcp/examples/run_daq.py,sha256=JObp9HtjJphwr5sVQ4Jj3Q5GZHGNCK12tYTfR-6qcr4,5461
|
|
78
78
|
pyxcp/examples/conf_socket_can.toml,sha256=JB9zHHaya2mDXf0zPY7zEKiBDX2chzBBRxt7h3LxxDk,257
|
|
79
79
|
pyxcp/examples/conf_sxi.toml,sha256=r81OD0mCLk_h7vrN5MBJk0HFbiWi3bQZtFgFVrW6qcM,118
|
|
File without changes
|
|
File without changes
|
|
File without changes
|