wyzeapy 0.5.30__py3-none-any.whl → 0.5.31__py3-none-any.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.
wyzeapy/utils.py CHANGED
@@ -81,8 +81,13 @@ def wyze_decrypt_cbc(key: str, enc_hex_str: str) -> str:
81
81
 
82
82
  Returns:
83
83
  The decrypted plaintext string.
84
+
85
+ Note:
86
+ MD5 is used here because it is required by Wyze's proprietary API protocol.
87
+ This is not a security vulnerability - it's mandatory for API compatibility.
84
88
  """
85
- key_hash = hashlib.md5(key.encode("utf-8")).digest()
89
+ # MD5 is required by Wyze's API protocol - not a security choice but API compatibility
90
+ key_hash = hashlib.md5(key.encode("utf-8")).digest() # nosec B324
86
91
 
87
92
  iv = b"0123456789ABCDEF"
88
93
  cipher = AES.new(key_hash, AES.MODE_CBC, iv)
@@ -104,10 +109,15 @@ def create_password(password: str) -> str:
104
109
 
105
110
  Returns:
106
111
  The hashed password as a hex string.
112
+
113
+ Note:
114
+ Triple MD5 is mandated by Wyze's authentication API. This cannot be changed
115
+ without breaking compatibility with Wyze's servers.
107
116
  """
108
- hex1 = hashlib.md5(password.encode()).hexdigest()
109
- hex2 = hashlib.md5(hex1.encode()).hexdigest()
110
- return hashlib.md5(hex2.encode()).hexdigest()
117
+ # MD5 is required by Wyze's authentication protocol - not a security choice
118
+ hex1 = hashlib.md5(password.encode()).hexdigest() # nosec B324
119
+ hex2 = hashlib.md5(hex1.encode()).hexdigest() # nosec B324
120
+ return hashlib.md5(hex2.encode()).hexdigest() # nosec B324
111
121
 
112
122
 
113
123
  def check_for_errors_standard(service, response_json: Dict[str, Any]) -> None:
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wyzeapy
3
- Version: 0.5.30
3
+ Version: 0.5.31
4
4
  Summary: A library for interacting with Wyze devices
5
5
  Author-email: Katie Mulliken <katie@mulliken.net>
6
6
  License: GPL-3.0-only
7
7
  Requires-Python: >=3.11.0
8
- Requires-Dist: aiodns<4.0.0,>=3.2.0
8
+ Requires-Dist: aiodns<5.0.0,>=3.2.0
9
9
  Requires-Dist: aiohttp<4.0.0,>=3.11.12
10
10
  Requires-Dist: pycryptodome<4.0.0,>=3.21.0
11
11
  Provides-Extra: dev
12
- Requires-Dist: pdoc<16.0.0,>=15.0.3; extra == 'dev'
13
- Requires-Dist: pytest<9.0.0,>=7.0.0; extra == 'dev'
12
+ Requires-Dist: pdoc<17.0.0,>=15.0.3; extra == 'dev'
13
+ Requires-Dist: pytest<10.0.0,>=7.0.0; extra == 'dev'
@@ -1,24 +1,24 @@
1
- wyzeapy/__init__.py,sha256=QckgsDmJxrQFPdVT4rheUqi3cCBSN-jkEWD-6hHmrqk,17248
1
+ wyzeapy/__init__.py,sha256=4peDFw5zdEc9T6iR2NxZ1mwhcG3ShW91gceBJqcWZy8,17244
2
2
  wyzeapy/const.py,sha256=3PV2Uq7wDD1X0ZmJBg8GWXYGHrpJvszyr9FuvwjHyus,1249
3
3
  wyzeapy/crypto.py,sha256=ApzPL0hrrd0D4k2jB5psNatJvUSzx1Kxui6_l4NJGO8,2057
4
4
  wyzeapy/exceptions.py,sha256=uKVWooofK22DZ3o9kwxnlJXnhk0VMJXnp-26pNavAis,1136
5
- wyzeapy/payload_factory.py,sha256=D37H0rTFakqnhmYrYjBAhFvRSquujINA7b8UyhRUjl0,20547
5
+ wyzeapy/payload_factory.py,sha256=1QUEgqSSDwEjKv1ew-jQYoXcFk0uf5B4gODw83ep2zg,20638
6
6
  wyzeapy/types.py,sha256=LPLc86FkEy8rUoPMwG8xB73NCTVRkJ1O5w7uSfDydLQ,6785
7
- wyzeapy/utils.py,sha256=EXnsZFBxgI3LsIh9Ttg4gq3Aq1VMLOxBUPCspWJX9IQ,7407
7
+ wyzeapy/utils.py,sha256=_aoP9H7RXuND3nCMP3gJRLBxX6Dsxag81RLm83G5Pu4,7969
8
8
  wyzeapy/wyze_auth_lib.py,sha256=CiWdl_UAzYxKLS8yCfjXxEI87gStJede2eS4g7KlnjE,18273
9
9
  wyzeapy/services/__init__.py,sha256=hbdyglbWQjM4XlNqPIACOEbspdsEEm4k5VXZ1hI0gc8,77
10
- wyzeapy/services/base_service.py,sha256=HUIU2uugHhY0KiGvc5ALYQn4NnsFMNZzECLJgqPHR9Q,34573
11
- wyzeapy/services/bulb_service.py,sha256=DNuT9PBmFhXpaD9rcjoYZMt-TLWWEAC3o0Yyvw_itHA,7825
10
+ wyzeapy/services/base_service.py,sha256=3FsbZHm6ndc6pSGCwrwh6SRgGb7HDK_L5lzuSjaLgO0,35547
11
+ wyzeapy/services/bulb_service.py,sha256=4Z_rX40OGqzRuKz_fgyWGb4di7jtyJSB_ZvFFCDlcCo,8821
12
12
  wyzeapy/services/camera_service.py,sha256=vaJIChKDMg3zWcoC_JqITDBjw4sgFdyUEkl3_w2ML8I,11170
13
13
  wyzeapy/services/hms_service.py,sha256=lQojRASz9AlwqkRfj7W7gOKXpLHrHHVwBGMw5WJ23Nc,2450
14
- wyzeapy/services/irrigation_service.py,sha256=lzQoUT2COlIMF1oTTDsvb-7H7zkra96i_Cxr4zkfYzs,7110
14
+ wyzeapy/services/irrigation_service.py,sha256=6HzwFRTjZcM4-Y9exSn5EmS2DZbl1gF_uaiMpK2Kd6c,8670
15
15
  wyzeapy/services/lock_service.py,sha256=NBjlr7pL5zJqdJaH33v1i6BbLHb7TXCkoCql4hCr8J8,2234
16
16
  wyzeapy/services/sensor_service.py,sha256=WSNz0OOLoZKru4d1ZwZ80-pdJ321HssUnwEgVfwX2zM,3578
17
17
  wyzeapy/services/switch_service.py,sha256=2O3J8-hP3vOgGVi0cKiKG_3j71zI6rHiqQd3u7CEKcE,2244
18
18
  wyzeapy/services/thermostat_service.py,sha256=_d-UbD65JArhwsslawvwpTmfVC4tMksY-L1Uu7HW0m4,5360
19
19
  wyzeapy/services/update_manager.py,sha256=5pZJmnyN4rlYJwMtEY13NlPBssnRLhtlLLmXr9t990Q,6770
20
20
  wyzeapy/services/wall_switch_service.py,sha256=cBKmnB2InHKIuoPwQ47t1rDtDplyOyGQYvnfX4fXFcc,4339
21
- wyzeapy/tests/test_irrigation_service.py,sha256=6rknfL0FzkptHs4CcYBamBTMD4pHcG0RyYNe3OgYBI8,21270
22
- wyzeapy-0.5.30.dist-info/METADATA,sha256=7OVSrLycTNIfh3zcmTI-38EZ0xt4NZExNKamzuTT61I,445
23
- wyzeapy-0.5.30.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
- wyzeapy-0.5.30.dist-info/RECORD,,
21
+ wyzeapy/tests/test_irrigation_service.py,sha256=ui3ZlqLUkoLb-uebK8Q1A83d9lAV9WIuHGbIrqPLyqg,28926
22
+ wyzeapy-0.5.31.dist-info/METADATA,sha256=ps5g5kCz_rY2XLNeVS31nSuX4ZXp1xVQmNJTrCLsTOw,446
23
+ wyzeapy-0.5.31.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
+ wyzeapy-0.5.31.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any