pyxcp 0.22.34__cp310-cp310-win_amd64.whl → 0.22.35__cp310-cp310-win_amd64.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 CHANGED
@@ -17,4 +17,4 @@ tb_install(show_locals=True, max_frames=3) # Install custom exception handler.
17
17
 
18
18
  # if you update this manually, do not forget to update
19
19
  # .bumpversion.cfg and pyproject.toml.
20
- __version__ = "0.22.34"
20
+ __version__ = "0.22.35"
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,
Binary file
Binary file
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
- [LOADER, dllName, str(privilege), binascii.hexlify(seed).decode("ascii")],
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 {LOADER!r} -- {exc}")
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 {LOADER!r} -- {exc}")
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:
@@ -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
@@ -1840,6 +1840,7 @@ class Master:
1840
1840
  self.logger.debug(f"Using seed and key DLL {self.seed_n_key_dll!r}.")
1841
1841
  result, key = getKey(
1842
1842
  self.logger,
1843
+ self.config.custom_dll_loader,
1843
1844
  self.seed_n_key_dll,
1844
1845
  resource_value,
1845
1846
  bytes(seed),
Binary file
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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyxcp
3
- Version: 0.22.34
3
+ Version: 0.22.35
4
4
  Summary: Universal Calibration Protocol for Python
5
5
  License: LGPLv3
6
6
  Keywords: automotive,ecu,xcp,asam,autosar
@@ -1,4 +1,4 @@
1
- pyxcp/__init__.py,sha256=09oAKcV-9xwWVtsoNOfZm6fy7G7IbHcs7L7jm270W2Y,548
1
+ pyxcp/__init__.py,sha256=cCzCFYz2VXdbLl-oeEcA066T-ZfWBKS32tHhx2YcVag,548
2
2
  pyxcp/aml/EtasCANMonitoring.a2l,sha256=EJYwe3Z3H24vyWAa6lUgcdKnQY8pwFxjyCN6ZU1ST8w,1509
3
3
  pyxcp/aml/EtasCANMonitoring.aml,sha256=xl0DdyeiIaLW0mmmJNAyJS0CQdOLSxt9dxfgrdSlU8Y,2405
4
4
  pyxcp/aml/ifdata_CAN.a2l,sha256=NCUnCUEEgRbZYSLGtUGwL2e7zJ8hrp0SbmLHGv8uY58,612
@@ -18,13 +18,13 @@ pyxcp/asamkeydll.c,sha256=dVEvU0S1kgIo62S0La-T8xHSw668LM_DYc_fiQ0No6g,2952
18
18
  pyxcp/asamkeydll.sh,sha256=DC2NKUMwvi39OQgJ6514Chr4wc1LYbTmQHmMq9jAHHs,59
19
19
  pyxcp/checksum.py,sha256=hO2JW_eiO9I0A4eiqovMV9d_y5oidq_w8jKdAE4FeOo,11899
20
20
  pyxcp/cmdline.py,sha256=na3ZbWQ-5ezsi1MrkuxMTCAXonUF3X6-LutoneyE3dU,1529
21
- pyxcp/config/__init__.py,sha256=nToBy_zPFQZmCUgRZ1RUjlw-OulCcvoFuGFvPw242z8,41701
21
+ pyxcp/config/__init__.py,sha256=vIYPtzzNI4kUmevpOsSFgbfuBXPq7e2bhIIwWcqPcqQ,41835
22
22
  pyxcp/config/legacy.py,sha256=4QdDheX8DbBKv5JVT72_C_cjCgKvZmhN3tJ6hsvBEtI,5220
23
23
  pyxcp/constants.py,sha256=9yGfujC0ImTYQWfn41wyw8pluJTSrhMGWIVeIZTgsLg,1160
24
24
  pyxcp/cpp_ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  pyxcp/cpp_ext/bin.hpp,sha256=PwJloZek21la-RBSda2Hc0u_6gID0sfTduPeplaAyR4,2561
26
26
  pyxcp/cpp_ext/blockmem.hpp,sha256=ysaJwmTWGTfE54Outk3gJYOfAVFd_QaonBMtXLcXwCc,1242
27
- pyxcp/cpp_ext/cpp_ext.cp310-win_amd64.pyd,sha256=NZXoyV2cwEujIfqTW2tAVcX0P01Ep6-nI2u1Q9zWtg4,285184
27
+ pyxcp/cpp_ext/cpp_ext.cp310-win_amd64.pyd,sha256=X1rZXoHpHAprFWKGpSA55a-diCAzV1hCDxulqR5BtOE,285184
28
28
  pyxcp/cpp_ext/daqlist.hpp,sha256=g2hlxgoQorAGKHedZFZ0c2FQh1APMIA9sVB6M6hD_n8,7277
29
29
  pyxcp/cpp_ext/event.hpp,sha256=Z-1yxsEKsr81NnLVEWJ2ANA8FV7YsM7EbNxaw-elheE,1200
30
30
  pyxcp/cpp_ext/extension_wrapper.cpp,sha256=xFs3IcrvHPHA82-n11WPzt8HATGqcks02p84SjQ2BKM,4855
@@ -36,11 +36,11 @@ pyxcp/daq_stim/optimize/__init__.py,sha256=FUWK0GkNpNT-sUlhibp7xa2aSYpm6Flh5yA2w
36
36
  pyxcp/daq_stim/optimize/binpacking.py,sha256=Iltho5diKlJG-ltbmx053U2vOFRlCISolXK61T14l_I,1257
37
37
  pyxcp/daq_stim/scheduler.cpp,sha256=a7VK7kP2Hs8yMlcDAkXwJ0bH88lr_yz156sphcHS7Z4,715
38
38
  pyxcp/daq_stim/scheduler.hpp,sha256=U_6tUbebmzX5vVZS0EFSgTaPsyxMg6yRXHG_aPWA0x4,1884
39
- pyxcp/daq_stim/stim.cp310-win_amd64.pyd,sha256=H94qsRryFW2jK6Uy48Hmainy0W3gzx7xzYORTz3yuVA,204288
39
+ pyxcp/daq_stim/stim.cp310-win_amd64.pyd,sha256=AI-gVCR1lauZUYplnGqeX-c7oX9pHa8liWW7nKeVYOo,204288
40
40
  pyxcp/daq_stim/stim.cpp,sha256=F2OG67W4KKwTTiUCxm-9egIv3TLFdOkRunX6xf7YOtc,177
41
41
  pyxcp/daq_stim/stim.hpp,sha256=U-uInRrA6OCdMl1l1SWbQ_KEPpnNYrWut924IvbW6R0,18508
42
42
  pyxcp/daq_stim/stim_wrapper.cpp,sha256=iT2yxJ3LRG7HoYC1bwhM3tCAxF9X_HHierBNsLRmTJg,1995
43
- pyxcp/dllif.py,sha256=nXzD5toh_z9Zjj3x3trigURfwE98fYaL4RmUlI7FaqY,3308
43
+ pyxcp/dllif.py,sha256=qeo7quKQ-_7TjRh_umTD-g0utBcCJd1q4GBRl2m93-M,3444
44
44
  pyxcp/errormatrix.py,sha256=iY3VlAem7pNfpK4scD_087wxMlLxNuidB7bbpiUiAyc,45464
45
45
  pyxcp/examples/conf_can.toml,sha256=4o-M4xmh7pCzuQLfXnIOLIXqx5aZjMAZ6jtjYJ8hLBQ,370
46
46
  pyxcp/examples/conf_can_user.toml,sha256=IJhcc60tKMDgNhviYtHr2OjEl_ID4CsfMKchDeMFdJs,314
@@ -57,11 +57,11 @@ pyxcp/examples/xcp_read_benchmark.py,sha256=zOG0Yrji10vA0vhHa27KK7zgc3JDpzXzXsFn
57
57
  pyxcp/examples/xcp_skel.py,sha256=YXLQC8nn8aAwYSVuBGhr1dvmdMBjmO1Ee1w3e5sy16s,1159
58
58
  pyxcp/examples/xcp_unlock.py,sha256=5F7oW17MboxKO3REYrGyhYX4Oc0Dg1oD3EQ3fQXB2Is,690
59
59
  pyxcp/examples/xcp_user_supplied_driver.py,sha256=bL-6HDvPjgRErvYVdaRL_Pg1GDxu02Jt_GG9LpXXP4c,1078
60
- pyxcp/examples/xcphello.py,sha256=xbcWq8StRJyUZBLUvknsXv7VkEBD5SU0SJjlZTHsSzs,2630
60
+ pyxcp/examples/xcphello.py,sha256=ZNfnk0nyz6qiY2i5L0lFFng42RwZdREwevIJW7C5QCA,2638
61
61
  pyxcp/examples/xcphello_recorder.py,sha256=QHWJsq5h5CI9t5qEmMSorZyzirTpoXz4nzuKTMzbZCA,3409
62
62
  pyxcp/master/__init__.py,sha256=QQbkUJM1WQ-5p2MiNFYxLAmHhNsCQLzDp-S4aoOFxoA,318
63
63
  pyxcp/master/errorhandler.py,sha256=ulL6WiraZbVZnM2pfR8S9vlWAAP5UXwXqmbjjxH9rgc,15359
64
- pyxcp/master/master.py,sha256=LYUrdFXvi01_QW0cR3bb48MbnHQ1WEkV95pKRLBW9Wc,78383
64
+ pyxcp/master/master.py,sha256=FIYCWCh9948cNmQ-D1DcjNcpb4mlXZ8UdCxTFH9Ti4g,78435
65
65
  pyxcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
66
  pyxcp/recorder/__init__.py,sha256=jeTmKvfjIenxHxt7zn6HMjnDpuPQU0d9SdnYK_t3gdE,2850
67
67
  pyxcp/recorder/build_clang.cmd,sha256=JvFngSnb28XcBGXxC6MGrcOCGYfahOIvHpgRpqbA6HQ,175
@@ -78,7 +78,7 @@ pyxcp/recorder/mio.hpp,sha256=5ASJLKSEykH0deAQD5uak-_yAgd5p2n8t06315GSGrg,63346
78
78
  pyxcp/recorder/reader.hpp,sha256=rr9XZ_ciL6eF2_xEqyt9XYNqTIze9ytAsnf8uYukO9U,5201
79
79
  pyxcp/recorder/reco.py,sha256=6N6FIwfCEVMpi5dr3eUOQa1lowcg2LCnS_sy_-b-UiQ,8725
80
80
  pyxcp/recorder/recorder.rst,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
- pyxcp/recorder/rekorder.cp310-win_amd64.pyd,sha256=sj-_OgXRKkMqsLTucycI4EieUDvwDHf8nElr9ZY11J8,385536
81
+ pyxcp/recorder/rekorder.cp310-win_amd64.pyd,sha256=1epHArm46oNuEuUM_PqKtjEBjRCRsYVP-HO-b91juK0,385536
82
82
  pyxcp/recorder/rekorder.cpp,sha256=U0LMyk8pZXx9emgS_WPVthvn_9IpgE7JGrh4kg-8CX4,1900
83
83
  pyxcp/recorder/rekorder.hpp,sha256=sWvRch9bVt6mmgrFHp5mwWhap7HoFG4geeb7UqEIzio,7638
84
84
  pyxcp/recorder/setup.py,sha256=_99XFPQAd5V4LcJaSGJwdnbxgxJ7kl8DEXfHsnKO1Yg,998
@@ -115,11 +115,11 @@ pyxcp/transport/sxi.py,sha256=kWB9x5M1pS7GBtBW6R65KBX7zDI9zcRRZhFM8frmzU0,4760
115
115
  pyxcp/transport/transport_wrapper.cpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
116
  pyxcp/transport/usb_transport.py,sha256=JuYrwkWsUdibdVNA57LBEQT3a3ykOgWPdWcfqj96nDE,8343
117
117
  pyxcp/types.py,sha256=mjp3FhsTTbS3D5VuC-dfdbMql0lJwEfbZjf8a2pHi1o,26158
118
- pyxcp/utils.py,sha256=gVIhPSvZs-y4o6QB35iJQd0VK_Z9sa3UtCDI3dYQeyo,3457
118
+ pyxcp/utils.py,sha256=_ag2QMt0IxVhiCLG5BIO8JzIGt-rdqYrY7DRAPQ4AtA,3530
119
119
  pyxcp/vector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  pyxcp/vector/map.py,sha256=7Gnhvr79geMeqqGVIJPxODXGwABdNDinnqzhpooN5TE,2306
121
- pyxcp-0.22.34.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
122
- pyxcp-0.22.34.dist-info/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
123
- pyxcp-0.22.34.dist-info/METADATA,sha256=P5fVBGrcQlz5CQ2IQOdA0nhGH7TDU_w8QA_8aA0ycss,4085
124
- pyxcp-0.22.34.dist-info/WHEEL,sha256=o8axJuAMfp9HzdvPbN5KaulfU2ylxvJG0Bzz2VsvQHE,98
125
- pyxcp-0.22.34.dist-info/RECORD,,
121
+ pyxcp-0.22.35.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
122
+ pyxcp-0.22.35.dist-info/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
123
+ pyxcp-0.22.35.dist-info/METADATA,sha256=1FG4ObUxb7QK7YO8yFEUJioWfGLPbX0gDB5apo2Hz3Q,4085
124
+ pyxcp-0.22.35.dist-info/WHEEL,sha256=o8axJuAMfp9HzdvPbN5KaulfU2ylxvJG0Bzz2VsvQHE,98
125
+ pyxcp-0.22.35.dist-info/RECORD,,