mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Fix mypy errors in parse_pcap_klap (#1214)
This commit is contained in:
parent
673a32258f
commit
1f1d50dd5c
@ -272,6 +272,7 @@ def main(
|
|||||||
case "/app/request":
|
case "/app/request":
|
||||||
if packet.ip.dst != device_ip:
|
if packet.ip.dst != device_ip:
|
||||||
continue
|
continue
|
||||||
|
assert isinstance(data, str) # noqa: S101
|
||||||
message = bytes.fromhex(data)
|
message = bytes.fromhex(data)
|
||||||
try:
|
try:
|
||||||
plaintext = operator.decrypt(message)
|
plaintext = operator.decrypt(message)
|
||||||
@ -284,6 +285,7 @@ def main(
|
|||||||
case "/app/handshake1":
|
case "/app/handshake1":
|
||||||
if packet.ip.dst != device_ip:
|
if packet.ip.dst != device_ip:
|
||||||
continue
|
continue
|
||||||
|
assert isinstance(data, str) # noqa: S101
|
||||||
message = bytes.fromhex(data)
|
message = bytes.fromhex(data)
|
||||||
operator.local_seed = message
|
operator.local_seed = message
|
||||||
response = None
|
response = None
|
||||||
|
Loading…
Reference in New Issue
Block a user